bitbankapi クラス : Assets() メソッド

説明

保有資産の情報を取得します。

構文

bitbankapiInstance.Assets()

引数

無し。

返り値

クラス説明
bitbankres要求に対する応答、JSON文字列を持つ。

サンプルコード

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;

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"}]}}

注意

非公開APIです。API キーと、秘密キーを設定しなければ情報を取得できません。

要求に対する応答として bitbankres クラスのインスタンスが返ります。このインスタンスが応答の結果の JSON-text を保持しています。

HTTP エラーが発生した場合、以下の様な JSON-text が返ります。

{"success": -1000,"error": { "statuscode" : 404, "message": "Not Found"}}

"statuscode" と "message" は、それぞれの HTTP エラーで異なります。

要求がタイムアウトした場合、以下の JSON-text が返ります。

{"success": -1001,"error": { "typename" : "TaskCanceledException", "message": "タスクが取り消されました。"}}

その他の例外が発生して要求が失敗した場合、以下の様な JSON-text が返ります。

{"success": -1002,"error": { "typename" : "...", "message": "..."}}

"typename" と "message" は、それぞれの例外で異なります。

参照リンク

Copyright © Cooker All rights reserved.