Wallet account
Accounts group wallets into their source currency. Every user can have one or more accounts, depending on which currencies they would like to use.
Authentication
In this example, we'll be using HMAC as the authentication method. The functions get_nonce and sign_request are further explained in the HMAC authentication tutorial.
Getting your accounts
The following example shows how you could get the list of your accounts.
import requests
import hmac_example
url = 'https://api.coins.asia/v3/crypto-accounts/'
nonce = hmac_example.get_nonce()
signature = hmac_example.sign_request(url, nonce)
headers = {
'ACCESS_SIGNATURE': signature,
'ACCESS_KEY': hmac_example.API_KEY,
'ACCESS_NONCE': nonce,
'Content-Type': 'application/json',
'Accept': 'application/json'
}
requests.get(url, headers=headers)
The response from the previous request should look like the following example. Let's take note of the id
.
{
"crypto-accounts":[
{
"id":"2r45ab4",
"name":"Default Account",
"currency":"BTC",
"balance":"1.5",
"pending_balance":"0.00000000",
"default_address":"1a2a3c4b"
}
]
}