Public trades
This view provides access to raw trade ticks across all supported exchanges, normalized into a consistent schema with unified market symbols.
SQL API
api.trade
Raw trade ticks across all supported exchanges, normalized into a consistent schema with unified market symbols.
Columns
exchange
String
Exchange id, suffixed by product (spot binance; linear future binance-usdm-future; inverse future binance-coinm-future; option deribit-option)
market
String
Universal symbol (e.g., "BTC-USDT")
side
String
"buy" or "sell"
quantity
Decimal(76,20)
Base asset amount traded (high precision)
price
Decimal(76,20)
Quote asset price per unit (high precision)
timestamp
DateTime64
Trade execution time (nanosecond precision)
trade_id
String
Unique trade identifier (exchange-specific)
Data Access by Tier
Free
Rolling 24h
Rolling 24h
Rolling 24h
Developer
Rolling 90 days
Rolling 90 days
Rolling 90 days
Professional
Rolling 1 year
Rolling 1 year
Rolling 1 year
Business
Full history
Full history
Full history
Enterprise
Full history
Full history
Full history
Performance
The underlying public_data.trade table:
Processes >500,000 trades/second
Stores 20+ TB of historical data
This requires strict filtering during queries:
timestamp(always use time ranges)market(single market per query recommended)exchange
Example Queries
1. Recent Trades for a Single Market
BTC-USD (Coinbase/Kraken/Bitstamp/Gemini/Bitfinex) and BTC-USDT (Binance/OKX/Bybit/KuCoin/Gate.io) are distinct markets — there is no cross-venue quote unification.
Functions used: now.
Output:
2. Large Trade Detection (Whale Watching)
Find all trades over $100k on SOL-USDT
Output
3. Trade Imbalance Analysis
Calculate 5-second buy/sell pressure
Functions used: toStartOfInterval, sumIf.
Output:
REST API
This endpoint retrieves public trade data for a specific market.
It includes spot, future, and option markets.
This endpoint is limited to 10000 trades per request.
Required for /ohlcv and /trade endpoints. Pass your API key in the x-api-key header. Public /market/* endpoints do not require authentication.
The name of the exchange to filter by
The universal market symbol to filter by
The start time for the trade data. Accepts any format parseable by
parseDateTime64BestEffort — e.g. a plain date (2024-06-01, treated
as midnight UTC) or a full ISO 8601 timestamp (2024-06-01T12:00:00Z).
2024-06-01The end time for the trade data. Accepts any format parseable by
parseDateTime64BestEffort — e.g. a plain date (2024-06-02, treated
as midnight UTC) or a full ISO 8601 timestamp (2024-06-02T12:00:00Z).
2024-06-02OK
The name of the exchange
The universal market symbol
The side of the trade (buy or sell)
The quantity of the asset traded
The price at which the trade occurred
The datetime when the trade occurred
Exchange provided unique identifier for the trade
Empty result because the entire requested range is older than your tier's data window; the body carries a working example_url and a Discord invite.
GET /trade?exchange=text&market=text&start_datetime=2024-06-01&end_datetime=2024-06-02 HTTP/1.1
Host: api.koinju.io
x-api-key: YOUR_API_KEY
Accept: */*
[
[
{
"exchange": "bitfinex",
"market": "BTC-USD",
"side": "buy",
"quantity": 0.2721858,
"price": 14.5373664,
"timestamp": "2013-01-14T16:47:23Z",
"trade_id": "4145"
},
{
"exchange": "bitfinex",
"market": "BTC-USD",
"side": "buy",
"quantity": 103,
"price": 14.5373664,
"timestamp": "2013-01-14T16:47:24Z",
"trade_id": "4146"
}
]
]Last updated
Was this helpful?