Developer Resources
Everything you need to integrate with CryptoHFTData. Explore our API endpoints, Python SDK, and historical data format.
Trade Data
Get Trade History
Retrieve individual trade executions with timestamps, prices, quantities, and trade direction.
Python SDK Usage
Data Format - CommonTrade
Trade data is stored using the CommonTrade structure, which captures individual trade executions with precise timing and market information:
Schema Overview
Each trade event contains execution timing, symbol information, price/quantity data, and market direction indicators.
Field Definitions
| Field | Type | Nullable | Description |
|---|---|---|---|
| received_time | INT64 | No | Unix timestamp (nanoseconds) when our system received the trade event |
| event_time | INT64 | No | Unix timestamp (exchange dependent on timescale) when the exchange generated the event |
| symbol | STRING | No | Trading pair symbol (e.g., 'BTCUSDT') |
| trade_id | INT64 | No | Exchange-specific unique trade identifier |
| price | STRING | No | Trade execution price (stored as string for precision) |
| quantity | STRING | No | Trade quantity/volume (stored as string for precision) |
| trade_time | INT64 | No | Unix timestamp (exchange dependent on timescale) when the trade occurred |
| is_buyer_maker | BOOLEAN | No | True if buyer was the maker (passive side), false if taker |
| order_type | STRING | No | Type of order that generated this trade (e.g., "LIMIT", "MARKET") |
Trade Direction Analysis
Sell Trades (Taker Sell)
Market sell orders hitting bid levels
- is_buyer_maker = true
- Buyer placed passive order (maker)
- Seller took liquidity (taker)
- Generally bearish pressure
Buy Trades (Taker Buy)
Market buy orders hitting ask levels
- is_buyer_maker = false
- Seller placed passive order (maker)
- Buyer took liquidity (taker)
- Generally bullish pressure
Working with Trade Data
Want to go deeper?
For a comprehensive tutorial on trade flow analysis, including VWAP calculation and whale trade detection, check out our blog post: Trade Flow Analysis: How to Calculate VWAP and Detect Whale Trades in Python