Trade API
Price History API
Retrieve aggregated price history data for a market with various time intervals
GET
Get Price History for a Market
This endpoint retrieves aggregated price history data for a specific market, with support for different time intervals, filtering, and OHLC (Open, High, Low, Close) data.
Query Parameters
- market_id (required): Filter trades by market ID
- interval (optional): Time interval for data aggregation (“1m”, “5m”, “15m”, “30m”, “1h”, “2h”, “4h”, “6h”, “12h”, “1d”, “3d”, “1w”, “1M”). Default: “1h”
- start_time (optional): Include data after this timestamp (can be UNIX timestamp or ISO date string)
- end_time (optional): Include data before this timestamp (can be UNIX timestamp or ISO date string)
- side (optional): Filter by trade side (“buy”, “sell”, “yes”, “no”)
- platform (optional): Filter by platform
Response Format
Use Cases
- Price Charts: Create candlestick or line charts showing price movements
- Technical Analysis: Perform technical analysis on the price data
- Volume Analysis: Track trading volume over time
- Market Trends: Identify trends in market prices
- Volatility Analysis: Calculate and visualize market volatility
Example Queries
Notes
- The response includes OHLC (Open, High, Low, Close) data for technical analysis
- Each data point includes aggregated volume for the time period
- The
timestamp
field is a UNIX timestamp (seconds since epoch) for easy charting - The
datetime
field provides a human-readable ISO 8601 date string - Time intervals can range from 1 minute to 1 month
- Missing intervals (periods with no trades) may be omitted from the results
Authorizations
Enter your API key as the bearer token
Query Parameters
The unique identifier for the market
Time interval for data aggregation
Available options:
1m
, 5m
, 15m
, 30m
, 1h
, 2h
, 4h
, 6h
, 12h
, 1d
, 3d
, 1w
, 1M
Start timestamp (UNIX or ISO date string)
End timestamp (UNIX or ISO date string)
Filter by trade side
Available options:
buy
, sell
, yes
, no
Filter by platform
Response
200
application/json
Price history data for the specified market
The response is of type object
.