bitbankapi class : ActiveOrders(string,long,long,long,long,long) method

Description

Get active orders information.

Syntax

bitbankapiInstance.ActiveOrders(string currencyPair, long count, long fromId, long endId, long since, long end)

Arguments

ClassNameDescription
stringcurrencyPairCurrency pair.
longcountAmount to get.
longfromIdOrder id to start getting.
longendIdOrder id to end getting.
longsinceUNIX timestamp to start getting.
longendUNIX timestamp to end getting.

Return value

ClassDescription
bitbankresResponse 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.ActiveOrders("btc_jpy", 0L, 0L, 0L, 0L, 0L);

5:

string jsonStr = bitbankresIns.Result;

Example for JSON-text

{"success":1,"data":{"orders":[{"order_id":39917305,"pair":"btc_jpy","side":"buy","type":"limit","start_amount":"0.0001","remaining_amount":"0.0001","executed_amount":"0.0000","price":"50000","average_price":"0","ordered_at":1582847142657,"status":"UNFILLED"},{"order_id":39917306,"pair":"btc_jpy","side":"buy","type":"limit","start_amount":"0.0001","remaining_amount":"0.0001","executed_amount":"0.0000","price":"50000","average_price":"0","ordered_at":1582847116840,"status":"UNFILLED"}]}}

Notes

Private API. API key and secret key are necessary.

Valid first argument : btc_jpy, xrp_jpy, ltc_btc, eth_btc, mona_jpy, mona_btc, bcc_jpy, bcc_btc

To get all active orders information for the currency pair, specify a number less than or equal to zero for the second argument.

If any argument from the third to sixth is unnecessary, specify a number less than or equal to zero, and the argument will be ignored.

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 the argument is incorrect, the following JSON-text will be returned.

{"success":0,"data":{"code":xxxxx}}

The "code" is a different number for each error.

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.

Links for reference

Copyright © Cooker All rights reserved.