Home Notices Documents Classes Download Others Rice
Classes  >  bitbankapi  >  Transactions(string,string)
bitbankapi class : Transactions(string,string) method

Description

Gets all execution history for the specified date.

Syntax

bitbankapiInstance.Transactions(string currencyPair,string YYYYMMDD)

Arguments

ClassNameDescription
stringcurrencyPairCurrency pair.
stringYYYYMMDDFormatted date string.

Return value

ClassDescription
bitbankresResponse to request, with JSON-text.

Sample code

1:

bitbankapi bitbankapiIns = new bitbankapi();

2:

bitbankres bitbankresIns = bitbankapiIns.Transactions("btc_jpy",""); // 当日

3:

string jsonStr = bitbankresIns.Result;

4:

bitbankresIns = bitbankapiIns.Transactions("btc_jpy","20200220"); // 2020/02/20

5:

jsonStr = bitbankresIns.Result;

Example for JSON-text

Current day.
{"success":1,"data":{"transactions":[{"transaction_id":1005509689,"side":"buy","price":"0.03923545","amount":"0.0001","executed_at":1582335100699},{"transaction_id":1005509620,"side":"buy","price":"0.03911941","amount":"0.0001","executed_at":1582334992363},{"transaction_id":1005508705,"side":"buy","price":"0.03920289","amount":"2.0000","executed_at":1582331540345},{"transaction_id":1005508470,"side":"buy","price":"0.03927823","amount":"0.0001","executed_at":1582331034333},{"transaction_id":1005508464,"side":"buy","price":"0.03917660","amount":"0.0001","executed_at":1582331025604},{"transaction_id":1005508463,"side":"buy","price":"0.03916755","amount":"0.0001","executed_at":1582331016852},{"transaction_id":1005508370,"side":"buy","price":"0.03923479","amount":"0.0001","executed_at":1582330828297},{"transaction_id":1005508213,"side":"buy","price":"0.03903776","amount":"0.0001","executed_at":1582330630852},{"transaction_id":1005508196,"side":"sell","price":"0.03900613","amount":"4.0472","executed_at":1582330609995},{"transaction_id":1005508105,"side":"sell","price":"0.03890673","amount":"5.0149","executed_at":1582330185141},{"transaction_id":1005508056,"side":"sell","price":"0.03903393","amount":"0.0001","executed_at":1582330058428},{"transaction_id":1005507903,"side":"sell","price":"0.03895498","amount":"5.0149","executed_at":1582329755236},{"transaction_id":1005507256,"side":"buy","price":"0.03922041","amount":"0.0003","executed_at":1582327875699},{"transaction_id":1005506813,"side":"buy","price":"0.03908283","amount":"0.0013","executed_at":1582326978162},{"transaction_id":1005506534,"side":"buy","price":"0.03899969","amount":"0.0001","executed_at":1582326445419},{"transaction_id":1005505950,"side":"sell","price":"0.03888839","amount":"0.0013","executed_at":1582323959917},{"transaction_id":1005505945,"side":"sell","price":"0.03889000","amount":"0.4013","executed_at":1582323950221},{"transaction_id":1005505934,"side":"sell","price":"0.03890986","amount":"0.0003","executed_at":1582323935161},{"transaction_id":1005505754,"side":"sell","price":"0.03900000","amount":"0.0710","executed_at":1582323635303},{"transaction_id":1005505291,"side":"sell","price":"0.03907148","amount":"0.0002","executed_at":1582321564529},{"transaction_id":1005504830,"side":"sell","price":"0.03925598","amount":"0.0001","executed_at":1582319206740},{"transaction_id":1005504602,"side":"buy","price":"0.03923161","amount":"0.0001","executed_at":1582318181083},{"transaction_id":1005504242,"side":"buy","price":"0.03914979","amount":"0.0001","executed_at":1582317071381},{"transaction_id":1005504177,"side":"buy","price":"0.03911809","amount":"0.0001","executed_at":1582316840477},{"transaction_id":1005504170,"side":"buy","price":"0.03909418","amount":"0.0001","executed_at":1582316816506},{"transaction_id":1005503750,"side":"sell","price":"0.03908964","amount":"1.2820","executed_at":1582315528857},{"transaction_id":1005503688,"side":"sell","price":"0.03893013","amount":"0.5000","executed_at":1582315412621},{"transaction_id":1005503592,"side":"sell","price":"0.03908381","amount":"0.0013","executed_at":1582315348900},{"transaction_id":1005503439,"side":"sell","price":"0.03914924","amount":"0.1011","executed_at":1582315336221},{"transaction_id":1005503270,"side":"sell","price":"0.03928021","amount":"0.0013","executed_at":1582315323640},{"transaction_id":1005503141,"side":"sell","price":"0.03947760","amount":"0.0013","executed_at":1582314878226},{"transaction_id":1005503132,"side":"sell","price":"0.03950000","amount":"0.4195","executed_at":1582314821740},{"transaction_id":1005503084,"side":"buy","price":"0.03950961","amount":"0.0001","executed_at":1582314627090},{"transaction_id":1005503019,"side":"sell","price":"0.03950000","amount":"0.5000","executed_at":1582314193397},{"transaction_id":1005502998,"side":"sell","price":"0.03950000","amount":"0.5000","executed_at":1582314108505},{"transaction_id":1005502462,"side":"sell","price":"0.03952965","amount":"0.0195","executed_at":1582311509459},{"transaction_id":1005502451,"side":"sell","price":"0.03952024","amount":"0.0225","executed_at":1582311276825},{"transaction_id":1005502431,"side":"sell","price":"0.03952236","amount":"0.0195","executed_at":1582311044384},{"transaction_id":1005502332,"side":"sell","price":"0.03954002","amount":"0.0285","executed_at":1582310579884},{"transaction_id":1005502316,"side":"sell","price":"0.03959131","amount":"0.0208","executed_at":1582310347337},{"transaction_id":1005502315,"side":"sell","price":"0.03960611","amount":"0.0001","executed_at":1582310347337},{"transaction_id":1005502287,"side":"sell","price":"0.03955303","amount":"0.0285","executed_at":1582310114593},{"transaction_id":1005502170,"side":"sell","price":"0.03956270","amount":"0.0195","executed_at":1582309882144},{"transaction_id":1005502134,"side":"sell","price":"0.03956043","amount":"0.0240","executed_at":1582309649767},{"transaction_id":1005502106,"side":"sell","price":"0.03951996","amount":"0.0285","executed_at":1582309417135},{"transaction_id":1005502047,"side":"sell","price":"0.03953946","amount":"0.0209","executed_at":1582309184743},{"transaction_id":1005502002,"side":"sell","price":"0.03964826","amount":"0.0180","executed_at":1582308952332},{"transaction_id":1005501977,"side":"sell","price":"0.03956627","amount":"0.0270","executed_at":1582308719910},{"transaction_id":1005501952,"side":"sell","price":"0.03947897","amount":"0.0254","executed_at":1582308487457},{"transaction_id":1005501901,"side":"sell","price":"0.03950909","amount":"0.0254","executed_at":1582308254968},{"transaction_id":1005501855,"side":"sell","price":"0.03951041","amount":"0.0165","executed_at":1582308022571},{"transaction_id":1005501597,"side":"sell","price":"0.03952396","amount":"0.0962","executed_at":1582307165512},{"transaction_id":1005501596,"side":"sell","price":"0.03952396","amount":"0.0287","executed_at":1582307154010},{"transaction_id":1005501559,"side":"sell","price":"0.03966502","amount":"0.0001","executed_at":1582306988096},{"transaction_id":1005501376,"side":"sell","price":"0.03975429","amount":"0.0254","executed_at":1582306397279},{"transaction_id":1005501367,"side":"buy","price":"0.03981328","amount":"3.7042","executed_at":1582306374986},{"transaction_id":1005501333,"side":"sell","price":"0.03984384","amount":"0.3000","executed_at":1582306278484},{"transaction_id":1005501332,"side":"sell","price":"0.03984384","amount":"0.1786","executed_at":1582306278484},{"transaction_id":1005501298,"side":"sell","price":"0.03984384","amount":"0.5000","executed_at":1582306185563},{"transaction_id":1005501293,"side":"sell","price":"0.03984384","amount":"0.0165","executed_at":1582306164998}]}}
Specified day
{"success":1,"data":{"transactions":[{"transaction_id":1005395758,"side":"sell","price":"0.03956031","amount":"0.0080","executed_at":1582156848346},{"transaction_id":1005395759,"side":"sell","price":"0.03956030","amount":"0.1008","executed_at":1582156848346},{"transaction_id":1005402800,"side":"buy","price":"0.03998915","amount":"0.5416","executed_at":1582162968800},{"transaction_id":1005402802,"side":"buy","price":"0.03998915","amount":"1.0649","executed_at":1582162968850},...

Notes

Public API. API key and secret key are unnecessary.

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

Specifies a date string in the second argument. The format of the date string is "YYYYMMDD".

If an empty string is specified in the second argument, the execution history for the current day will be returned.

If an date string is specified in the second argument, the execution history for the specified day will be returned. However, an error will occur if a date string for the current day is specified.

The date switches at UTC+0. For example, the JST is UTC+9 so it switches at 9am in Japan.

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.

The execution history for the current day is sorted with UNIX timestamp, and it's order is ascending. In other words, the top is the latest data.

The execution history for the specified day is sorted with UNIX timestamp, and it's order is descending. In other words, the bottom is the latest data.

If the argument is incorrect, the following JSON-text will be returned.

{"success": 1000,"return": { "message": "http 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 © Rice All rights reserved.