zaifapi class : Depth(string,string) method

Description

Gets the depth information of order books.

Syntax

zaifapiInstance.Depth(string groupId, string currencyPair)

Arguments

ClassNameDescription
stringgroupIdA group identifier.
stringcurrencyPairA currency pair.

Return value

ClassDescription
zaifresA response to the request which have a JSON-text.

Sample code

1:

zaifapi zaifapiIns = new zaifapi();

2:

zaifres zaifresIns = zaifapiIns.Depth("1", "btc_jpy");

3:

string jsonStr = zaifresIns.Result;

Example for JSON-text

groupId : "1" currencyPair : "btc_jpy"
{"asks": [[806000.0, 0.4452], [806795.0, 0.8276], [806800.0, 1.8], [806900.0, 0.008], [807000.0, 0.1], [807495.0, 20.2318], [807500.0, 1.25], [807900.0, 0.008], [808000.0, 2.2363], [808750.0, 2.8928], [808755.0, 0.05], [809000.0, 0.227], [809300.0, 0.008], [809400.0, 10.0], [809490.0, 3.2701], [809790.0, 0.2363], [809895.0, 0.125], [809985.0, 1.0], [809995.0, 4.0], [810000.0, 5.6443], [810100.0, 0.9774], [810995.0, 0.125], [811000.0, 17.0], [811005.0, 0.0994], [811120.0, 0.07], [811250.0, 0.35], [811350.0, 0.1455], [811850.0, 0.35], [811855.0, 0.25], [812000.0, 0.7128], [812005.0, 0.05], [812110.0, 0.031], [812510.0, 0.6848], [813000.0, 0.3531], [813250.0, 0.2], [813295.0, 0.25], [813350.0, 0.0054], [813400.0, 0.2726], [813580.0, 0.05], [813780.0, 1.0], [814000.0, 0.6501], [814400.0, 0.001], [814950.0, 10.0], [815000.0, 8.2048], [815340.0, 20.59], [815500.0, 1.0], [815900.0, 0.0791], [816000.0, 0.01], [816540.0, 1.24], [816800.0, 0.3], [817200.0, 3.0], [817580.0, 0.05], [817800.0, 0.1655], [818000.0, 14.1811], [818500.0, 4.0772], [818690.0, 1.0], [819000.0, 2.9925], [819200.0, 0.05], [819490.0, 20.59], [819555.0, 5.0], [819800.0, 0.0345], [819940.0, 3.0], [820000.0, 15.691], [820120.0, 1.0], [820400.0, 0.0174], [821010.0, 0.3869], [821050.0, 0.1], [822000.0, 2.41], [822010.0, 0.0954], [822100.0, 0.1935], [822200.0, 0.0788], [823000.0, 0.2179], [824000.0, 0.551], [824500.0, 0.1249], [825000.0, 0.6118], [827000.0, 0.0326], [827360.0, 0.71], [827500.0, 0.0189], [828000.0, 2.0], [829000.0, 8.0], [830000.0, 6.3207], [832000.0, 2.3], [832500.0, 0.0682], [833000.0, 0.016], [833995.0, 1.63], [834000.0, 7.1], [834430.0, 0.2], [834905.0, 0.5], [835000.0, 0.8768], [836000.0, 0.1], [837000.0, 0.2], [838000.0, 1.0764], [838500.0, 0.1982], [838600.0, 1.24], [839370.0, 8.0], [839800.0, 0.3], [840000.0, 6.2374], [840900.0, 1.0931], [841000.0, 4.0], [841200.0, 0.188], [841450.0, 0.1], [841500.0, 0.35], [842000.0, 0.54], [843450.0, 3.0], [843480.0, 1.0], [843900.0, 20.0], [845000.0, 1.3], [846000.0, 0.279], [848000.0, 0.03], [849000.0, 0.25], [849500.0, 1.0], [849600.0, 0.53], [850000.0, 4.7155], [854400.0, 0.216], [854900.0, 0.03], [855000.0, 1.1985], [857000.0, 0.0352], [858000.0, 0.025], [859800.0, 0.3], [860000.0, 2.3003], [861015.0, 0.0465], [862000.0, 0.9], [866000.0, 0.5], [867000.0, 1.0], [870000.0, 5.839], [875000.0, 0.2595], [878780.0, 2.0], [878950.0, 3.1576], [879005.0, 0.0227], [879920.0, 0.1279], [880000.0, 3.6115], [883000.0, 0.01], [886000.0, 0.5], [886900.0, 0.02], [888000.0, 0.04], [888080.0, 1.0], [890000.0, 2.6742], [892000.0, 3.0], [895800.0, 0.0436], [897000.0, 0.0147], [899000.0, 0.04], [899990.0, 3.59], [900000.0, 10.7779], [903000.0, 3.0], [905000.0, 1.15], [906990.0, 3.0], [908000.0, 1.9998], [908200.0, 0.02], [910000.0, 0.235], [912000.0, 0.0432]], "bids": [[805005.0, 0.2], [805000.0, 1.5], [804025.0, 1.5311], [804020.0, 0.2], [804000.0, 4.0], [803600.0, 1.5589], [803500.0, 0.4937], [803010.0, 1.0], [802510.0, 0.015], [802505.0, 5.3185], [802500.0, 0.392], [802425.0, 0.4574], [802300.0, 0.1491], [801650.0, 0.2996], [801500.0, 0.25], [801100.0, 8.5426], [801000.0, 9.0], [800600.0, 0.05], [800505.0, 2.5], [800500.0, 0.02], [800005.0, 0.47], [800000.0, 0.55], [799100.0, 0.0833], [798100.0, 0.053], [797450.0, 0.04], [796000.0, 1.8019], [795800.0, 0.05], [795505.0, 2.0], [795200.0, 0.3891], [795000.0, 0.6705], [794975.0, 20.6014], [794010.0, 0.1], [794000.0, 0.03], [793800.0, 0.0118], [793555.0, 0.1], [793000.0, 0.0949], [792000.0, 0.2868], [791000.0, 5.0], [790500.0, 1.0], [790050.0, 0.5502], [790000.0, 10.2372], [789050.0, 0.65], [789000.0, 1.4948], [788300.0, 0.55], [788000.0, 6.17], [787215.0, 20.6], [786600.0, 0.2181], [786000.0, 0.566], [785400.0, 0.224], [785050.0, 0.25], [785005.0, 10.0], [785000.0, 1.7653], [784280.0, 0.71], [783555.0, 0.25], [783030.0, 0.0617], [783000.0, 1.1874], [782910.0, 3.0], [782660.0, 0.7], [781500.0, 0.1029], [781225.0, 20.6], [781050.0, 0.0135], [781000.0, 0.15], [780300.0, 0.0415], [780150.0, 1.0], [780100.0, 0.06], [780055.0, 1.9901], [780005.0, 0.25], [780000.0, 10.1315], [778900.0, 0.21], [778800.0, 0.25], [778700.0, 1.853], [777555.0, 0.75], [777000.0, 1.4983], [775500.0, 1.2522], [775000.0, 1.602], [774000.0, 0.1594], [773500.0, 0.1049], [773375.0, 0.1], [772980.0, 0.0134], [772850.0, 0.05], [771470.0, 0.05], [771090.0, 0.1], [771010.0, 0.1224], [770100.0, 0.5], [770000.0, 1.0769], [769575.0, 0.05], [769385.0, 0.05], [769000.0, 0.1], [768000.0, 0.5139], [767100.0, 1.0], [766105.0, 0.0612], [766000.0, 0.7345], [765765.0, 0.15], [765680.0, 10.0], [765010.0, 1.0], [765000.0, 8.7505], [764160.0, 0.05], [763875.0, 0.05], [763435.0, 0.1], [763395.0, 0.05], [763000.0, 0.2], [762930.0, 0.05], [762920.0, 0.1], [762540.0, 0.1], [762500.0, 1.0], [762445.0, 0.05], [762425.0, 0.05], [762265.0, 0.05], [762255.0, 0.05], [762160.0, 0.1], [762000.0, 8.1], [761970.0, 0.15], [761695.0, 0.0485], [761635.0, 0.25], [761590.0, 0.2], [761555.0, 0.5], [761500.0, 0.347], [761150.0, 0.05], [761110.0, 0.05], [761025.0, 0.05], [761015.0, 0.55], [761000.0, 5.0163], [760685.0, 0.1], [760540.0, 0.05], [760350.0, 0.05], [760075.0, 0.7], [760065.0, 0.25], [760000.0, 7.6018], [759980.0, 0.15], [759610.0, 0.05], [759600.0, 0.2], [759410.0, 0.1], [759360.0, 0.05], [759315.0, 0.2], [759220.0, 0.05], [759210.0, 0.0491], [759120.0, 0.05], [759115.0, 0.1], [759000.0, 0.2], [758880.0, 1.0], [758380.0, 0.05], [758285.0, 0.1], [758265.0, 0.2], [758220.0, 0.05], [758180.0, 0.2], [758000.0, 0.3], [757980.0, 0.1], [757700.0, 1.0], [757500.0, 1.0], [757220.0, 0.05]]}
groupId : "2" currencyPair : "btc_jpy"
{"asks": [], "bids": []}

Notes

It is a public API for the futures transaction. You can get the information without setting the API key and the secret key.

The groupId argument must be specified "1" or more. "all" and "active" can not be specified.

If you specify "1" for the groupId argument and "btc_jpy" for the currencyPair argument, the AirFX order book information will be returned .

If you specify "2" or more for the groupId argument and "btc_jpy" for the currencyPair argument, the order book information will be returned if there is an applicable futures transaction.

An instance of the zaifres class is returned as the response to the request. This instance holds the JSON-text of the result of the response.

If an API error occurs, the following JSON-text will be returned.

{"error": "..."}

"error" is different for each API 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 will be returned.

{"success": -1001,"error": { "typename" : "TaskCanceledException", "message": "A task was canceled."}}

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.