Coinbase.API.Accounts
SourceSummary↑
create(coinbase, name, optionals \\ %{}) | Create an account (supports multisig) |
create_address(coinbase, account_id, optionals \\ %{}) | Create a new bitcoin address for an account |
delete(coinbase, id) | Delete an account (only non-primary accounts with zero balance) |
get(coinbase, id) | Gets an account |
get_address(coinbase, id) | Get an accounts bitcoin address |
get_balance(coinbase, id) | Get an account’s balance |
list(coinbase, optionals \\ %{}) | Gets a list of accounts |
set_primary(coinbase, id) | Set account as primary |
update(coinbase, id, account) | Updates a account |
Functions
Specs:
- create(pid, binary, %{}) :: Coinbase.response
Create an account (supports multisig)
Optional params: account[type] (string): Type of account. If creating a HDM (multisig) account, specify multisig. account[m] (string): Number of required signatures to spend from HDM multisig account. account[xpubkeys] (array): Array of extended public keys of BIP32 wallets. Length of array must be greater or equal than ‘m’ to create a complete account.
Specs:
- create_address(pid, binary, %{}) :: Coinbase.response
Create a new bitcoin address for an account
Specs:
- delete(pid, binary) :: Coinbase.response
Delete an account (only non-primary accounts with zero balance)
Specs:
- get(pid, binary) :: Coinbase.response
Gets an account
Specs:
- get_address(pid, binary) :: Coinbase.response
Get an accounts bitcoin address
Specs:
- get_balance(pid, binary) :: Coinbase.response
Get an account’s balance
Specs:
- list(pid, %{}) :: Coinbase.response
Gets a list of accounts
Optional params: page (integer): Can be used to page through results. Default value is 1. limit (integer): Number of records to return. Maximum is 1000. Default value is 25. all_accounts (integer): Set this to true to also list inactive accounts.
Specs:
- set_primary(pid, binary) :: Coinbase.response
Set account as primary
Specs:
- update(pid, binary, %{}) :: Coinbase.response
Updates a account