For each cryptocurrency a Customer trades in, they will need an account.
For each cryptocurrency a Customer trades in, they will need an account. For example, to execute trades for both Bitcoin (BTC) and Ethereum (ETH), you’ll need to create a BTC account and an ETH account for the Customer.
Head on over to the /api/accounts POST call, expand it, and click Try it out. You’ll see a JSON request body that we need to fill in with the Customer GUID, the Asset type, and a friendly Name for the account.
If you want to see a list of which assets are supported, execute the /api/assets GET call.
Go ahead and enter your Customer GUID, enter an Asset, such as BTC, and give the account a name. If successful, you should receive a 201 response, with the new account details, similar to below:
"name": "Bitcoin Account",
Note that accounts have a state property, that will be storing after the account creation call, and created once the account is fully provisioned. In the sandbox environment provisioning is instantaneous, however in the production environment there are additional provisioning steps which may add a short delay between the storing and created states. When planning production integrations, be sure to engineer for these two possible states.
With a BTC Account now created, and attached to the customer, we are prepared to generate a quote and execute a trade.