{"_id":"56326e9edf556c0d00cd08da","parentDoc":null,"category":{"_id":"56326e9ddf556c0d00cd08cd","pages":["56326e9edf556c0d00cd08da","56326e9edf556c0d00cd08db","56326e9edf556c0d00cd08dc","56326e9edf556c0d00cd08dd","56326e9edf556c0d00cd08de","56326e9edf556c0d00cd08df","5632e61862c48a0d00334ddc","5637210ec75f5d0d00ec5d4a","563750380704070d00f06c4b","56ecf98c7f94882900591955"],"version":"56326e9cdf556c0d00cd08ca","__v":5,"project":"544fc17e698ab40800b4f891","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-05-01T09:13:02.297Z","from_sync":false,"order":2,"slug":"tutorials","title":"Tutorials"},"__v":2,"user":"544fc065698ab40800b4f888","version":{"_id":"56326e9cdf556c0d00cd08ca","project":"544fc17e698ab40800b4f891","__v":2,"createdAt":"2015-10-29T19:08:12.724Z","releaseDate":"2015-10-29T19:08:12.724Z","categories":["56326e9ddf556c0d00cd08cb","56326e9ddf556c0d00cd08cc","56326e9ddf556c0d00cd08cd","56326e9ddf556c0d00cd08ce","56326e9ddf556c0d00cd08cf","56326e9ddf556c0d00cd08d0","56326e9ddf556c0d00cd08d1","56326e9ddf556c0d00cd08d2","56326e9ddf556c0d00cd08d3","56326e9ddf556c0d00cd08d4","56d942ac337fd11300d6a251"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"collector","version_clean":"2.1.0","version":"2.1"},"project":"544fc17e698ab40800b4f891","updates":["57d964c3ed63190e0022d33a","57d996d6da17c30e003897d3"],"next":{"pages":[],"description":""},"createdAt":"2015-05-13T05:00:17.201Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"## Wallet account\n\nAccounts group wallets into their source currency. Every user can have one or more accounts, depending on which currencies they would like to use.\n\n## Authentication\n\nIn 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](doc:hmac). \n\n## Getting your accounts\n\nThe following example shows how you could get the list of your [accounts](doc:crypto-accounts).\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"import requests\\nimport hmac_example\\n\\nurl = 'https://coins.ph/api/v3/crypto-accounts/'\\nnonce = hmac_example.get_nonce()\\nsignature = hmac_example.sign_request(url, nonce)\\n\\nheaders = {\\n    'ACCESS_SIGNATURE': signature,\\n    'ACCESS_KEY': hmac_example.API_KEY,\\n    'ACCESS_NONCE': nonce,\\n    'Content-Type': 'application/json',\\n    'Accept': 'application/json'\\n}\\n\\nrequests.get(url, headers=headers)\",\n      \"language\": \"python\"\n    }\n  ]\n}\n[/block]\nThe response from the previous request should look like the following example. Let's take note of the `id`.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n   \\\"crypto-accounts\\\":[\\n      {\\n         \\\"id\\\":\\\"2r45ab4\\\",\\n         \\\"name\\\":\\\"Default Account\\\",\\n         \\\"currency\\\":\\\"BTC\\\",\\n         \\\"balance\\\":\\\"1.5\\\",\\n         \\\"pending_balance\\\":\\\"0.00000000\\\",\\n         \\\"default_address\\\":\\\"1a2a3c4b\\\"\\n      }\\n   ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"checking-your-account-balance","type":"basic","title":"Checking your account balance"}

Checking your account balance


## 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](doc:hmac). ## Getting your accounts The following example shows how you could get the list of your [accounts](doc:crypto-accounts). [block:code] { "codes": [ { "code": "import requests\nimport hmac_example\n\nurl = 'https://coins.ph/api/v3/crypto-accounts/'\nnonce = hmac_example.get_nonce()\nsignature = hmac_example.sign_request(url, nonce)\n\nheaders = {\n 'ACCESS_SIGNATURE': signature,\n 'ACCESS_KEY': hmac_example.API_KEY,\n 'ACCESS_NONCE': nonce,\n 'Content-Type': 'application/json',\n 'Accept': 'application/json'\n}\n\nrequests.get(url, headers=headers)", "language": "python" } ] } [/block] The response from the previous request should look like the following example. Let's take note of the `id`. [block:code] { "codes": [ { "code": "{\n \"crypto-accounts\":[\n {\n \"id\":\"2r45ab4\",\n \"name\":\"Default Account\",\n \"currency\":\"BTC\",\n \"balance\":\"1.5\",\n \"pending_balance\":\"0.00000000\",\n \"default_address\":\"1a2a3c4b\"\n }\n ]\n}", "language": "json" } ] } [/block]