Account Data

Get Trades History

Retrieve information about trades/fills. By default, the most recent trades are returned.

  • Unless otherwise stated, costs, fees, prices, and volumes are specified with the precision for the asset pair (pair_decimals and lot_decimals), not the individual assets' precision (decimals).

API Key Permissions Required: Orders and trades - Query closed orders & trades

post/private/TradesHistory

Request

  • Base URL: https://api.kraken.com/0
  • URL: https://api.kraken.com/0/private/TradesHistory
  • Auth: API key in header API-Key and API key in header API-Sign

Query parameters

account_idstring

Public wallet account ID. Omit to use the authenticated user's default wallet. See List Wallet Accounts.

Request body

nonceinteger required

Nonce used in construction of API-Sign header

type'all' | 'any position' | 'closed position' | 'closing position' | 'no position'

Type of trade

tradesboolean

Whether or not to include trades related to position in output

startinteger

Starting unix timestamp or trade tx ID of results (exclusive)

endinteger

Ending unix timestamp or trade tx ID of results (inclusive)

ofsinteger

Result offset for pagination. Deprecated, use with_cursor and cursor instead. Must be absent or 0 when with_cursor is true.

without_countboolean

If true, does not retrieve count of trades. Request can be noticeably faster for users with many trades as this avoids an extra database query.

consolidate_takerboolean

Whether or not to consolidate trades by individual taker trades

ledgersboolean

Whether or not to include related ledger ids for given trade <br><sub><sup>Note that setting this to true will slow request performance</sub></sup>

rebase_multiplier'rebased' | 'base' nullable

Optional parameter for viewing xStocks data.

  • rebased: Display in terms of underlying equity.
  • base: Display in terms of SPV tokens.
aclass'forex' | 'equity_pair' | 'futures_contract' | 'synthetic_pair' | 'external_pair'

Asset class of the pair filter.

pairstring

Filter results to a single trading pair. An unrecognized pair returns EQuery:Unknown asset pair.

limitinteger

Number of trades returned per page (1–100). Values above 100 get clamped to 100.

with_cursorboolean

Use cursor-based pagination instead of ofs. The response then includes cursor.next when more trades are available.

cursorstring

Opaque pagination token from cursor.next of the previous page. Requires with_cursor.

Example request

{
  "nonce": 1695828490,
  "type": "all",
  "trades": false,
  "consolidate_taker": true,
  "pair": "BTC/USD",
  "limit": 75
}

Response

Trade history retrieved.

errorstring[]

Example response

{
  "error": [
    "EGeneral:Invalid arguments"
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.