Get Trades
Recent public trades for a futures symbol.
HTTP
| Method | GET |
| Endpoint | /trade/api/v2/futures/trades |
| Rate limit | 100 requests per 60 seconds |
Request Parameters
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
exchange | string | Yes | EXCHANGE_2. |
symbol | string | Yes | Symbol, e.g. BTCUSDT. |
Example
- Python
- Java
- Go
- Node.js
import requests
headers, path = sign_request("GET", "/trade/api/v2/futures/trades",
params={"symbol": "btcusdt", "exchange": "EXCHANGE_2"})
response = requests.get(BASE_URL + path, headers=headers)
print(response.json())
HttpResponse<String> resp = client.send(
"GET", "/trade/api/v2/futures/trades",
Map.of("symbol", "btcusdt", "exchange", "EXCHANGE_2"), null);
System.out.println(resp.body());
headers, p, err := SignRequest("GET", "/trade/api/v2/futures/trades", map[string]string{"symbol": "btcusdt", "exchange": "EXCHANGE_2"})
if err != nil { panic(err) }
req, _ := http.NewRequest("GET", BaseURL+p, nil)
for k, v := range headers { req.Header.Set(k, v) }
resp, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
out, _ := io.ReadAll(resp.Body)
fmt.Println(string(out))
const {signRequest, BASE_URL} = require('./reference-client');
const {headers, path} = signRequest('GET', '/trade/api/v2/futures/trades', {"symbol": "btcusdt", "exchange": "EXCHANGE_2"});
const r = await fetch(BASE_URL + path, {
method: 'GET',
headers,
});
console.log(await r.json());
Response
{
"data": [
{
"E": 1732691693128,
"p": 0.39391,
"q": 133,
"e": "EXCHANGE_2",
"s": "DOGEUSDT",
"m": true
}
]
}
Response Parameters
data is an array of trades. Single-letter keys:
| Field | Type | Description |
|---|---|---|
E | integer | Trade timestamp (Unix milliseconds). |
p | number | Trade price. |
q | number | Trade quantity (base asset). |
s | string | Symbol. |
e | string | Exchange identifier. |
m | boolean | true if the buyer was the market maker. |
For real-time trade prints, use the Trades WebSocket.