Get Recent Trades
curl --request GET \
--url https://api.kraken.com/0/public/Tradesimport requests
url = "https://api.kraken.com/0/public/Trades"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.kraken.com/0/public/Trades', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.kraken.com/0/public/Trades"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": [],
"result": {
"XXBTZUSD": [
[
"30243.40000",
"0.34507674",
1688669597.8277369,
"b",
"m",
"",
61044952
],
[
"30243.30000",
"0.00376960",
1688669598.2804112,
"s",
"l",
"",
61044953
],
[
"30243.30000",
"0.01235716",
1688669602.698379,
"s",
"m",
"",
61044956
]
],
"last": "1688671969993150842"
}
}Market Data
Get Recent Trades
Returns the last 1000 trades by default
GET
/
public
/
Trades
Get Recent Trades
curl --request GET \
--url https://api.kraken.com/0/public/Tradesimport requests
url = "https://api.kraken.com/0/public/Trades"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.kraken.com/0/public/Trades', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.kraken.com/0/public/Trades"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": [],
"result": {
"XXBTZUSD": [
[
"30243.40000",
"0.34507674",
1688669597.8277369,
"b",
"m",
"",
61044952
],
[
"30243.30000",
"0.00376960",
1688669598.2804112,
"s",
"l",
"",
61044953
],
[
"30243.30000",
"0.01235716",
1688669602.698379,
"s",
"m",
"",
61044956
]
],
"last": "1688671969993150842"
}
}Query Parameters
Asset pair to get data for
Controls whether response keys and asset identifier fields use Kraken's internal names or display names.
- Omitted (default): internal names are used. Asset keys use legacy
X/Z-prefixed format (XXBT,ZUSD). Pair keys use the internal format (XXBTZUSD). Asset identifier fields (base,quote,fee_volume_currency) also use internal names. assetVersion=1: display names are used. Asset keys become their canonical display names (BTC,USD). Pair keys become the slash-separated display format (BTC/USD). On/public/AssetPairs, thebase,quote, andfee_volume_currencyfields also switch to display names.
Only assetVersion=1 is currently supported. The altname and wsname fields are not affected by this parameter.
Available options:
1 Return trade data since given timestamp
Return specific number of trades, up to 1000
Required range:
1 <= x <= 1000This parameter is required on requests for non-crypto pairs, i.e. use tokenized_asset for xStocks.
Available options:
tokenized_asset Was this page helpful?