curl --request POST \
--url https://api.kraken.com/0/private/GetOtcSpotTradeHistory \
--header 'API-Key: <api-key>' \
--header 'API-Sign: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"nonce": 123,
"start_date": 1785542400,
"end_date": 1788220800,
"offset": 0,
"limit": 100
}
'import requests
url = "https://api.kraken.com/0/private/GetOtcSpotTradeHistory"
payload = {
"nonce": 123,
"start_date": 1785542400,
"end_date": 1788220800,
"offset": 0,
"limit": 100
}
headers = {
"API-Key": "<api-key>",
"API-Sign": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'API-Key': '<api-key>',
'API-Sign': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
nonce: 123,
start_date: 1785542400,
end_date: 1788220800,
offset: 0,
limit: 100
})
};
fetch('https://api.kraken.com/0/private/GetOtcSpotTradeHistory', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kraken.com/0/private/GetOtcSpotTradeHistory"
payload := strings.NewReader("{\n \"nonce\": 123,\n \"start_date\": 1785542400,\n \"end_date\": 1788220800,\n \"offset\": 0,\n \"limit\": 100\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API-Key", "<api-key>")
req.Header.Add("API-Sign", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": [
"EGeneral:Invalid arguments"
],
"result": [
{
"txid": "ABCD1234",
"order_date": 1786406400000,
"base_asset": "BTC",
"quote_asset": "USD",
"direction": "buy",
"amount": "0.0025",
"price": "80000.00",
"total": "200.00",
"base_settle_method": "internal_transfer",
"quote_settle_method": "internal_transfer",
"amount_usd": "200.00"
}
]
}{
"errors": [
{
"field": null,
"value": null,
"type": "Internal Error",
"msg": "Internal error",
"severity": "E",
"errorClass": "General"
}
]
}Get OTC Spot Trade History
Retrieves the API key owner’s booked OTC spot trades for an inclusive date range. Deleted records and records that do not represent a client trade are excluded. Results are returned newest first.
Request start_date and end_date values use Unix epoch seconds.
Response order_date values use Unix epoch milliseconds.
API Key Permissions Required: Orders and trades - Query open orders & trades
curl --request POST \
--url https://api.kraken.com/0/private/GetOtcSpotTradeHistory \
--header 'API-Key: <api-key>' \
--header 'API-Sign: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"nonce": 123,
"start_date": 1785542400,
"end_date": 1788220800,
"offset": 0,
"limit": 100
}
'import requests
url = "https://api.kraken.com/0/private/GetOtcSpotTradeHistory"
payload = {
"nonce": 123,
"start_date": 1785542400,
"end_date": 1788220800,
"offset": 0,
"limit": 100
}
headers = {
"API-Key": "<api-key>",
"API-Sign": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'API-Key': '<api-key>',
'API-Sign': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
nonce: 123,
start_date: 1785542400,
end_date: 1788220800,
offset: 0,
limit: 100
})
};
fetch('https://api.kraken.com/0/private/GetOtcSpotTradeHistory', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kraken.com/0/private/GetOtcSpotTradeHistory"
payload := strings.NewReader("{\n \"nonce\": 123,\n \"start_date\": 1785542400,\n \"end_date\": 1788220800,\n \"offset\": 0,\n \"limit\": 100\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API-Key", "<api-key>")
req.Header.Add("API-Sign", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": [
"EGeneral:Invalid arguments"
],
"result": [
{
"txid": "ABCD1234",
"order_date": 1786406400000,
"base_asset": "BTC",
"quote_asset": "USD",
"direction": "buy",
"amount": "0.0025",
"price": "80000.00",
"total": "200.00",
"base_settle_method": "internal_transfer",
"quote_settle_method": "internal_transfer",
"amount_usd": "200.00"
}
]
}{
"errors": [
{
"field": null,
"value": null,
"type": "Internal Error",
"msg": "Internal error",
"severity": "E",
"errorClass": "General"
}
]
}Authorizations
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.
Body
Request body for retrieving the API key owner's OTC spot trades.
start_date and end_date are Unix epoch seconds. end_date must be greater than start_date.
Nonce used in construction of API-Sign header
Inclusive start of the trade window, Unix epoch seconds.
1785542400
Inclusive end of the trade window, Unix epoch seconds. Must be strictly after start_date.
1788220800
0-based index of the first result to return.
x >= 00
Maximum number of results to return. Defaults to 100 when omitted or set to 0. Values above 1000 are capped to 1000.
0 <= x <= 1000100
Was this page helpful?