Developer Resources
Everything you need to integrate with CryptoHFTData. Explore our API endpoints, Python SDK, and historical data format.
Mark Price Data
Get Mark Price History
Retrieve mark price data for futures contracts. Mark price is used for liquidation calculations.
Python SDK Usage
Important Note
Mark price data is typically only available for futures exchanges like binance-futures, bybit-futures, etc.
Data Format - CommonMarkPrice
Mark price data is stored using the CommonMarkPrice structure, which captures mark price information along with related funding data and settlement estimates:
Schema Overview
Each mark price event contains timing information, symbol data, and comprehensive pricing information including mark price, index price, estimated settlement price, and funding rate details.
Field Definitions
| Field | Type | Nullable | Description |
|---|---|---|---|
| received_time | INT64 | No | Unix timestamp (nanoseconds) when our system received the mark price 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') |
| mark_price | STRING | Yes | Mark price used for liquidation calculations (stored as string for precision) |
| index_price | STRING | Yes | Index price from underlying spot exchanges (stored as string for precision) |
| estimated_settle_price | STRING | Yes | Estimated settlement price for contract expiration (stored as string for precision) |
| funding_rate | STRING | Yes | Current funding rate for perpetual contracts (stored as string for precision) |
| next_funding_time | INT64 | Yes | Unix timestamp when the next funding payment will occur |
Price Types
Mark Price
Fair value price used for liquidations
- Based on index price and funding premium
- Prevents manipulation
- Updates continuously
- Used for PnL calculations
Index Price
Weighted average from spot exchanges
- Composite price from multiple spot markets
- Reference for mark price calculation
- Updated in real-time
Settlement Price
Estimated final settlement price
- For contract expiration
- Based on underlying spot price
- Used for final settlement