History

This endpoint returns the last 100 trades from the specified lastTime value - if no value specified will return the last 100 trades.

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 Section 3.4.4
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
  • For Futures: The date and time of a trade. Data is not aggregated
  • For indices: The date and time of an index computation. For real-time indices, data is aggregated to the last computation of each full hour. For reference rates, data is not aggregated
trade_id positive integer
  • For Futures: A continuous index starting at 1 for the first fill in a Futures contract maturity
  • For indices: Not returned because N/A
price positive float
  • For Futures: The price of a fill
  • For indices: The calculated value
size positive integer
  • For Futures: The size of a fill
  • For indices: Not returned because N/A
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:

  • apiLimitExceeded: the API limit for the calling IP address has been exceeded
  • marketUnavailable: the requested market is unavailable
  • requiredArgumentMissing: a required argument was missing
  • invalidArgument: <argument>:argument "<argument>" is invalid