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.
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
Functions
Specs:
- api_key(pid) :: binary
Returns the API key
Specs:
- api_secret(pid) :: binary
Returns the API secret
Specs:
- configuration(pid) :: Coinbase.Config.t
Returns the Coinbase config struct
Specs:
- new :: {Coinbase.status, pid}
Creates a Coinbase process, reading the key and secret from config or environment variables
Specs:
- new(binary, binary) :: {Coinbase.status, pid}
Creates a new Coinbase process