bitbankapi class : Assets() method
Description
Gets information of user's assets.
Syntax
bitbankapiInstance.Assets()
Arguments
None.
Return value
Class | Description |
bitbankres | Response to request, with JSON-text. |
Sample code
1: | string apiKey = "3622c294-zs5m-587w-vv7j-sdf454h1sdbl"; |
2: | string secretKey = "4be789k3-dd7r-9d23-jy45-qng4c83hjk1g"; |
3: | bitbankapi bitbankapiIns = new bitbankapi(apiKey, secretKey); |
4: | bitbankres bitbankresIns = bitbankapiIns.Assets(); |
5: | string jsonStr = bitbankresIns.Result; |
Example for JSON-text
{"success":1,"data":{"assets":[{"asset":"jpy","amount_precision":4,"onhand_amount":"10367.2200","locked_amount":"0.0000","free_amount":"10367.2200","stop_deposit":false,"stop_withdrawal":false,"withdrawal_fee":{"threshold":"30000.0000","under":"550.0000","over":"770.0000"}},{"asset":"btc","amount_precision":8,"onhand_amount":"0.00000000","locked_amount":"0.00000000","free_amount":"0.00000000","stop_deposit":false,"stop_withdrawal":false,"withdrawal_fee":"0.00100000"},{"asset":"ltc","amount_precision":8,"onhand_amount":"0.00000000","locked_amount":"0.00000000","free_amount":"0.00000000","stop_deposit":false,"stop_withdrawal":false,"withdrawal_fee":"0.00100000"},{"asset":"xrp","amount_precision":6,"onhand_amount":"0.000000","locked_amount":"0.000000","free_amount":"0.000000","stop_deposit":false,"stop_withdrawal":false,"withdrawal_fee":"0.150000"},{"asset":"eth","amount_precision":8,"onhand_amount":"0.00000000","locked_amount":"0.00000000","free_amount":"0.00000000","stop_deposit":false,"stop_withdrawal":false,"withdrawal_fee":"0.00500000"},{"asset":"mona","amount_precision":8,"onhand_amount":"0.00000000","locked_amount":"0.00000000","free_amount":"0.00000000","stop_deposit":false,"stop_withdrawal":false,"withdrawal_fee":"0.00100000"},{"asset":"bcc","amount_precision":8,"onhand_amount":"0.00000000","locked_amount":"0.00000000","free_amount":"0.00000000","stop_deposit":false,"stop_withdrawal":false,"withdrawal_fee":"0.00100000"}]}} |
Notes
Private API. API key and secret key are necessary.
An instance of the bitbankres class is returned as the response to the request. This instance holds the JSON-text of the result of the response.
If an HTTP error occurs, the following JSON-text will be returned.
{"success": -1000,"error": { "statuscode" : 404, "message": "Not Found"}}
"statuscode" and "message" are different for each HTTP error.
If the request times out, the following JSON-text is returned.
{"success": -1001,"error": { "typename" : "TaskCanceledException", "message": "A task was cancelled."}}
If the request fails due to other exceptions, the following JSON-text will be returned.
{"success": -1002,"error": { "typename" : "...", "message": "..."}}
"typename" and "message" are different for each exception.