Retrieve information about trades/fills. 50 results are returned at a time, the most recent by default.
pair_decimals and lot_decimals), not the individual assets’ precision (decimals).API Key Permissions Required: Orders and trades - Query closed orders & trades
curl --request POST \
--url https://api.kraken.com/0/private/TradesHistory \
--header 'API-Key: <api-key>' \
--header 'API-Sign: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"nonce": 1695828490,
"type": "all",
"trades": false,
"consolidate_taker": true
}
'{
"error": [],
"result": {
"trades": {
"THVRQM-33VKH-UCI7BS": {
"ordertxid": "OQCLML-BW3P3-BUCMWZ",
"postxid": "TKH2SE-M7IF5-CFI7LT",
"pair": "XXBTZUSD",
"time": 1688667796.8802,
"type": "buy",
"ordertype": "limit",
"price": "30010.00000",
"cost": "600.20000",
"fee": "0.00000",
"vol": "0.02000000",
"margin": "0.00000",
"misc": "",
"trade_id": 40274859,
"maker": true
},
"TCWJEG-FL4SZ-3FKGH6": {
"ordertxid": "OQCLML-BW3P3-BUCMWZ",
"postxid": "TKH2SE-M7IF5-CFI7LT",
"pair": "XXBTZUSD",
"time": 1688667769.6396,
"type": "buy",
"ordertype": "limit",
"price": "30010.00000",
"cost": "300.10000",
"fee": "0.00000",
"vol": "0.01000000",
"margin": "0.00000",
"misc": "",
"trade_id": 39482674,
"maker": true
}
}
}
}Documentation Index
Fetch the complete documentation index at: https://kraken-sandbox.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
The "API-Key" header should contain your API key.
Authenticated requests should be signed with the "API-Sign" header, using a signature generated with your private key, nonce, encoded payload, and URI path.
Nonce used in construction of API-Sign header
Type of trade
all, any position, closed position, closing position, no position Whether or not to include trades related to position in output
Starting unix timestamp or trade tx ID of results (exclusive)
Ending unix timestamp or trade tx ID of results (inclusive)
Result offset for pagination
If true, does not retrieve count of ledger entries. Request can be noticeably faster for users with many ledger entries as this avoids an extra database query.
Whether or not to consolidate trades by individual taker trades
Whether or not to include related ledger ids for given trade
Note that setting this to true will slow request performance
Optional parameter for viewing xstocks data.
rebased: Display in terms of underlying equity.base: Display in terms of SPV tokens.rebased, base curl --request POST \
--url https://api.kraken.com/0/private/TradesHistory \
--header 'API-Key: <api-key>' \
--header 'API-Sign: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"nonce": 1695828490,
"type": "all",
"trades": false,
"consolidate_taker": true
}
'{
"error": [],
"result": {
"trades": {
"THVRQM-33VKH-UCI7BS": {
"ordertxid": "OQCLML-BW3P3-BUCMWZ",
"postxid": "TKH2SE-M7IF5-CFI7LT",
"pair": "XXBTZUSD",
"time": 1688667796.8802,
"type": "buy",
"ordertype": "limit",
"price": "30010.00000",
"cost": "600.20000",
"fee": "0.00000",
"vol": "0.02000000",
"margin": "0.00000",
"misc": "",
"trade_id": 40274859,
"maker": true
},
"TCWJEG-FL4SZ-3FKGH6": {
"ordertxid": "OQCLML-BW3P3-BUCMWZ",
"postxid": "TKH2SE-M7IF5-CFI7LT",
"pair": "XXBTZUSD",
"time": 1688667769.6396,
"type": "buy",
"ordertype": "limit",
"price": "30010.00000",
"cost": "300.10000",
"fee": "0.00000",
"vol": "0.01000000",
"margin": "0.00000",
"misc": "",
"trade_id": 39482674,
"maker": true
}
}
}
}