LedgerCore
Market Intelligence

Trades

Individual trade execution data from cryptocurrency exchanges.

Endpoint

GET /api/v1/market-data/trades

Parameters

ParameterTypeRequiredDescription
symbolstringYesTrading pair (e.g., BTC-USD)
limitintegerNoNumber of trades (default: 100, max: 1000)
startTimeintegerNoUnix timestamp (milliseconds)
endTimeintegerNoUnix 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

Was this page helpful?