Home News DOC Class DL Others Rice
Class  >  zaifapi  >  Depth(string)
zaifapi class : Depth(string) method

Description

Gets the depth information of order books.

Syntax

zaifapiInstance.Depth(string currencyPair)

Arguments

ClassNameDescription
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("btc_jpy");

3:

string jsonStr = zaifresIns.Result;

Example for JSON-text

{"asks": [[907500.0, 0.1674], [907670.0, 0.0013], [907800.0, 0.0776], [907985.0, 0.001], [907990.0, 0.0014], [907995.0, 0.0032], [908000.0, 0.2054], [908170.0, 0.003], [908195.0, 0.061], [908245.0, 0.001], [908305.0, 0.5], [908745.0, 0.031], [908800.0, 0.0086], [908995.0, 0.026], [909000.0, 0.0451], [909350.0, 0.2872], [909355.0, 0.5689], [909360.0, 0.02], [909450.0, 3.0], [909900.0, 0.5], [909990.0, 0.0014], [909995.0, 0.02], [910000.0, 5.6459], [910080.0, 0.0086], [910085.0, 0.02], [910680.0, 0.061], [911000.0, 0.1058], [911100.0, 0.0742], [911105.0, 0.464], [911450.0, 0.0059], [911510.0, 0.061], [911620.0, 0.0005], [911990.0, 0.0047], [912000.0, 0.5558], [912220.0, 0.0523], [912300.0, 0.0061], [912340.0, 0.1399], [912500.0, 0.0122], [913000.0, 0.1552], [913245.0, 0.2793], [913250.0, 0.1261], [913320.0, 0.005], [913860.0, 0.001], [913990.0, 0.0047], [914000.0, 0.0067], [914215.0, 0.009], [914335.0, 0.0086], [914500.0, 0.0076], [914610.0, 0.001], [915000.0, 20.6788], [915045.0, 0.001], [915450.0, 0.1], [915500.0, 0.0644], [915555.0, 0.02], [915690.0, 0.0463], [915820.0, 0.0143], [915870.0, 0.0118], [915900.0, 0.0001], [915965.0, 34.475], [916000.0, 0.0043], [917000.0, 0.0094], [917285.0, 0.0018], [917600.0, 0.0001], [917845.0, 0.0123], [917865.0, 0.0013], [917990.0, 0.0047], [918000.0, 0.1301], [918390.0, 0.0024], [918590.0, 0.0452], [918740.0, 0.011], [918900.0, 0.0001], [919000.0, 0.0344], [919500.0, 0.004], [919600.0, 0.007], [919660.0, 0.0118], [919800.0, 0.0594], [919900.0, 0.0001], [919950.0, 0.1], [919990.0, 0.01], [919995.0, 0.0129], [920000.0, 7.0397], [920050.0, 0.1227], [920740.0, 0.0139], [920800.0, 1.126], [921000.0, 0.0091], [922000.0, 0.0535], [922255.0, 8.4413], [922500.0, 0.021], [922940.0, 0.02], [923000.0, 0.1081], [923400.0, 0.001], [923655.0, 0.0317], [924000.0, 0.0334], [924290.0, 0.2875], [924500.0, 0.1505], [924700.0, 0.0578], [924885.0, 0.0287], [924985.0, 0.002], [925000.0, 0.6453], [925500.0, 0.1], [925760.0, 0.0007], [926000.0, 0.0033], [926850.0, 0.05], [927000.0, 0.1796], [927500.0, 0.428], [928000.0, 0.1992], [928175.0, 0.0287], [928990.0, 0.03], [929000.0, 0.0161], [929350.0, 0.0001], [929620.0, 0.8], [929860.0, 0.0141], [929950.0, 0.1], [929995.0, 0.81], [930000.0, 5.6761], [930500.0, 0.0025], [931000.0, 1.0041], [931580.0, 0.0014], [931800.0, 1.1249], [932000.0, 0.0139], [933000.0, 0.043], [933580.0, 0.001], [933925.0, 0.0928], [934000.0, 0.006], [934550.0, 0.05], [934600.0, 0.005], [934865.0, 0.0994], [934985.0, 0.002], [935000.0, 0.2441], [935600.0, 0.0023], [936000.0, 0.0029], [936685.0, 0.1], [937000.0, 5.4412], [937245.0, 0.0932], [938000.0, 0.0329], [938490.0, 0.05], [938725.0, 0.001], [938970.0, 0.0272], [939000.0, 0.0049], [939650.0, 0.001], [939900.0, 0.0001], [939950.0, 0.1], [939995.0, 0.01], [940000.0, 2.4799], [940005.0, 0.0003], [940500.0, 0.1], [941000.0, 0.0028], [941500.0, 0.02], [941800.0, 1.0], [941945.0, 0.0172]], "bids": [[906975.0, 0.0019], [906970.0, 0.3329], [906425.0, 0.0763], [906270.0, 1.1034], [906050.0, 0.001], [906010.0, 0.5], [906000.0, 0.0029], [905820.0, 2.035], [905740.0, 0.001], [905715.0, 0.02], [905670.0, 0.0013], [905610.0, 0.0013], [905590.0, 0.001], [905440.0, 0.0013], [905400.0, 0.001], [905380.0, 0.001], [905000.0, 1.8577], [904995.0, 0.001], [904590.0, 0.0316], [904365.0, 0.001], [904205.0, 0.02], [904015.0, 0.02], [904000.0, 0.002], [903665.0, 0.1], [903380.0, 0.099], [903155.0, 0.04], [903000.0, 0.0284], [902125.0, 0.02], [902010.0, 0.0014], [902000.0, 0.0039], [901560.0, 0.02], [901000.0, 0.0267], [900010.0, 0.0037], [900005.0, 0.0667], [900000.0, 1.2269], [899900.0, 0.099], [899585.0, 0.005], [899000.0, 0.021], [898720.0, 0.54], [898710.0, 0.078], [898705.0, 0.46], [898630.0, 34.475], [898415.0, 0.02], [898010.0, 0.0014], [898000.0, 1.0001], [897995.0, 0.0288], [897885.0, 0.02], [897650.0, 0.0012], [897590.0, 0.02], [897480.0, 1.478], [897000.0, 0.0049], [896960.0, 0.02], [896560.0, 0.02], [896355.0, 0.02], [896015.0, 0.0031], [896010.0, 0.0014], [896000.0, 0.1929], [895800.0, 0.167], [895555.0, 0.02], [895250.0, 0.0644], [895195.0, 0.02], [895005.0, 0.001], [895000.0, 0.6079], [894500.0, 0.02], [894180.0, 0.005], [894010.0, 0.0014], [894000.0, 0.005], [893745.0, 0.02], [893740.0, 1.3476], [893645.0, 0.001], [893545.0, 0.001], [893445.0, 0.001], [893410.0, 0.02], [893345.0, 0.001], [893330.0, 0.02], [893245.0, 0.001], [893145.0, 0.001], [893055.0, 0.02], [893045.0, 0.001], [893000.0, 0.555], [892945.0, 0.001], [892845.0, 0.001], [892745.0, 0.001], [892660.0, 0.02], [892645.0, 0.001], [892580.0, 0.005], [892545.0, 0.001], [892315.0, 0.5163], [892015.0, 0.0048], [892000.0, 0.8676], [891810.0, 0.02], [891750.0, 0.0112], [891685.0, 0.01], [891410.0, 0.001], [891000.0, 0.0058], [890925.0, 0.001], [890705.0, 0.02], [890530.0, 0.005], [890500.0, 1.5494], [890240.0, 0.3], [890010.0, 0.0801], [890000.0, 0.3458], [889995.0, 0.02], [889975.0, 0.02], [889895.0, 0.02], [889730.0, 0.02], [889645.0, 0.001], [889550.0, 0.02], [889395.0, 17.2375], [889390.0, 0.0012], [889000.0, 0.1404], [888945.0, 0.001], [888845.0, 0.001], [888245.0, 0.02], [888010.0, 0.0048], [888000.0, 0.1498], [887945.0, 0.001], [887300.0, 0.005], [887220.0, 0.02], [887185.0, 0.02], [887100.0, 0.0315], [887080.0, 0.05], [887000.0, 0.002], [886800.0, 0.01], [886645.0, 0.001], [886545.0, 0.001], [886500.0, 0.02], [886445.0, 0.001], [886345.0, 0.001], [886245.0, 0.001], [886220.0, 0.01], [886145.0, 0.001], [886045.0, 0.001], [886010.0, 0.0014], [886000.0, 0.007], [885945.0, 0.001], [885860.0, 0.02], [885845.0, 0.001], [885555.0, 0.02], [885395.0, 0.0316], [885000.0, 0.1488], [884955.0, 0.02], [884160.0, 0.005], [884130.0, 0.005], [884075.0, 0.02], [884015.0, 0.0025], [884000.0, 0.002], [883000.0, 0.0307], [882785.0, 0.1332], [882500.0, 0.0485]]}

Notes

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

If a valid currency pair is specified as an argument, order book information on that currency pair is returned.

The "asks" on the above example is depth of the ask order book, The "bids" is depth of the bid order book. The "asks" is sorted in ascending order of price, and the "bids" is sorted in descending order of price.

Up to 150 entries can be acquired from the top of the book.

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 © Rice All rights reserved.