{"_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"},"githubsync":"","__v":5,"user":"544fc065698ab40800b4f888","version":{"_id":"56326e9cdf556c0d00cd08ca","project":"544fc17e698ab40800b4f891","__v":22,"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","5ab2fcf66a1d77001230b47e","5afc2943bd2ef4000330bca7","5d1d87419a969a00141c6b4c","5d1d8948ef26b2002c6468d1","5d1d8afe7b2b24005bec7de0","5d1d8b24f5cfcb00201490bb","5d1d8bb82d46d1004a02581f","5d1d8de1e4edb0019ed63acd","5d1d8f6b613fb90050d0d3e0","5d1d934ed377870191039d28","5d1d99810b2e4600500eb5ff","5d1da14e613fb90050d0d491","5d229a846cf323005a7fa998","5d229a8c8abf65001cc4768d","5d229a9494b856002e26b6e1","5d229a9bf77bb900507ccb04","5d229aa88abf65001cc4768e","5d24310a9ca8c80054786177","5d24359101cc3a00508e7482","5d24418fa791b20050733b32"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"collector","version_clean":"2.1.0","version":"2.1"},"project":"544fc17e698ab40800b4f891","updatedAt":"2019-07-04T07:56:23.194Z","updates":["57d964c3ed63190e0022d33a","57d996d6da17c30e003897d3","5c02a2a1b0e94d000d634fbc","5c50935c0c1719034c4f71c7","5c509595e679ae003fd99ae3"],"next":{"pages":[],"description":""},"createdAt":"2015-05-13T05:00:17.201Z","link_external":false,"link_url":"","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]