Coinbase

This module defines the Coinbase API.

This module is based off of balanced-elixir. Most of the coding style mimics bryanjos’ implementation of his API.

Documentation for the API can be found here… https://www.coinbase.com/docs/api/overview

Looks for application variables in the :coinbase app named :api_key and :api_secret.

{:ok, coinbase} = Coinbase.new

#alternatively, you can pass in the key and secret

{:ok, coinbase} = Coinbase.new({"my_key", "my_secret"})

#then pass in the coinbase pid when calling functions

{status, response} = Coinbase.Users.Self.get(coinbase)

status is either :ok or :error

response is a Map converted from the json response from Coinbase.

Source

Summary

api_key(coinbase)

Returns the API key

api_secret(coinbase)

Returns the API secret

configuration(coinbase)

Returns the Coinbase config struct

new()

Creates a Coinbase process, reading the key and secret from config or environment variables

new(api_key, api_secret)

Creates a new Coinbase process

start_link(config)

Types

status :: :ok | :error

response :: {status, %{}}

Functions

api_key(coinbase)

Specs:

  • api_key(pid) :: binary

Returns the API key

Source
api_secret(coinbase)

Specs:

  • api_secret(pid) :: binary

Returns the API secret

Source
configuration(coinbase)

Specs:

Returns the Coinbase config struct

Source
new()

Specs:

Creates a Coinbase process, reading the key and secret from config or environment variables

Source
new(api_key, api_secret)

Specs:

Creates a new Coinbase process

Source
start_link(config)
Source