This endpoint returns the last 100 trades from the specified lastTime value - if no value specified will return the last 100 trades.
Note: this endpoint only returns trade history for a maximum of 7 days from the time it is called. For historical data out of this timeframe, we have monthly CSV files uploaded on Historical Data page.
Authentication is not required.
Endpoint |
Request Type | Permissible API Keys |
/api/v3/history
|
GET | N/A |
Argument | Type | Required | Description |
symbol
|
string | Yes | The symbol of the Futures, see Ticker Symbols |
lastTime
|
string | No | Returns the last 100 trades from the specified lastTime value |
Sample Call |
https://futures.kraken.com/derivatives/api/v3/history?symbol=pi_xbtusd&lastTime=2019-02-14T09:31:26.027Z |
Sample Return if Successful |
{ "result":"success", "history":[ { "time":"2019-02-14T09:25:33.920Z", "trade_id":100, "price":3574, "size":100, "side":"buy", "type":"fill" }, { "time":"2019-02-14T09:07:57.844Z", "trade_id":99, "price":3569, "size":10000, "side":"buy", "type":"fill" }, ..., ], } |
Field |
Type | Description |
result
|
String | Always success |
serverTime
|
ISO8601 datetime | The server date and time |
history
|
list of structures | A list containing structures with historical price information, see below. The list is sorted descending by time |
time | ISO8601 datetime | The date and time of a trade or an index computation
|
trade_id | positive integer |
|
price | positive float |
|
size | positive integer |
|
side | string | The classification of the taker side in the matched trade: "buy" if the taker is a buyer, "sell" if the taker is a seller. |
type | string | The classification of the matched trade in an orderbook: "fill" if it is a normal buyer and seller, "liquidation" if it is a result of a user being liquidated from their position, "assignment" if the fill is the result of a users position being assigned to a marketmaker or "termination" if it is a result of a user being terminated. |
Sample Return if Unsuccessful |
{ "result":"error", "serverTime":"2016-02-25T09:45:53.818Z", "error":"apiLimitExceeded" } |
Field |
Type | Description |
result
|
String | Always error |
serverTime
|
ISO8601 datetime | The server date and time |
error
|
string |
The reason the API call failed, either of:
|