Trades
Individual trade execution data from cryptocurrency exchanges.
Endpoint
GET /api/v1/market-data/trades
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | Trading pair (e.g., BTC-USD) |
| limit | integer | No | Number of trades (default: 100, max: 1000) |
| startTime | integer | No | Unix timestamp (milliseconds) |
| endTime | integer | No | Unix timestamp (milliseconds) |
Response Format
{
"data": [
{
"id": "12345",
"timestamp": "2026-01-20T12:00:00Z",
"price": 45200.00,
"amount": 0.5,
"side": "buy",
"exchange": "binance",
"pair": "BTC-USD"
}
],
"meta": {
"total": 100
}
}
Examples
Get Recent Trades
curl "http://localhost:8090/api/v1/market-data/trades?symbol=BTC-USD&limit=100" \
-H "Authorization: Bearer YOUR_API_KEY"
JavaScript Example
async function getTrades(symbol, limit = 100) {
const response = await fetch(
`http://localhost:8090/api/v1/market-data/trades?symbol=${symbol}&limit=${limit}`,
{
headers: {
'Authorization': `Bearer ${process.env.LEDGERLINK_API_KEY}`
}
}
);
return await response.json();
}
const trades = await getTrades('BTC-USD', 100);
Next Steps
- Candles - OHLCV data
- Orderbooks - Market depth
- API Reference - Complete documentation