Market Price
GET /v1/predexon/market-price/{token_id} — Retrieve the current or historical market price for a token at a specific point in time.
- Base URL:
https://api.predexon.com/v1 - Auth:
x-api-key: YOUR_API_KEY - Time: All timestamps are Unix timestamps (seconds) unless otherwise noted
- Rate Limits: 100 requests/minute per API key. Returns
429withRetry-Afterheader (seconds) when exceeded. Use exponential backoff on 429/503 responses.
Endpoint
Path parameters
| Parameter | Type | Description |
|---|---|---|
token_id | string | Token identifier (Ethereum address format, e.g., 0x1234...). Required. |
Query parameters
All parameters are optional.| Parameter | Type | Description |
|---|---|---|
at_time | integer | Unix timestamp (in seconds) for historical price. If not provided, returns current price. Must be non-negative. |
Response schema
Field reference
| Field | Type | Description |
|---|---|---|
price | float | Token price as a decimal value between 0.0 and 1.0. |
at_time | integer | Unix timestamp (seconds) indicating when the price was recorded or requested. |
Understanding price values
- Token prices are normalized between 0.0 and 1.0, representing the probability or market valuation.
- Price
0.6234means approximately 62.34% probability or valuation. - Historical prices are snapshotted at the requested
at_timeor the nearest available historical point.
Examples
Errors
All errors return standard HTTP status codes with JSON error responses:| HTTP Status | Error Type | Description | Common Causes |
|---|---|---|---|
400 | invalid_parameter | Parameter validation failed | Negative at_time, invalid token_id format |
401 | unauthorized | Authentication failed | Missing or invalid x-api-key header |
403 | insufficient_permissions | API key lacks required permissions | Token not provisioned for Market Price API |
404 | not_found | Resource doesn’t exist | Unknown token_id |
429 | rate_limit_exceeded | Too many requests | Exceeded 100 requests/minute. Check Retry-After header. |
500 | internal_error | Server error | Contact team@predexon.com with request ID |
503 | service_unavailable | Temporary service issue | Retry with exponential backoff |
Use Cases
Price Monitoring
Monitor real-time token prices for dashboards, alerts, and trading systems. This lightweight endpoint is optimized for frequent polling without heavy payload overhead.Historical Analysis
Retrieve historical prices at specific timestamps for backtesting, performance analysis, and historical reporting. Build time series data by querying multiple timestamps.Alert Systems
Build automated alert systems that trigger notifications based on price movements, threshold breaches, or specific market conditions. Perfect for integration with monitoring platforms.Integration with Market Data Pipelines
Combine with other endpoints to build comprehensive market data pipelines. Use market-price for quick lookups alongside candlestick data for technical analysis.Best Practices
-
Cache strategically: Current prices change frequently, but historical prices are immutable. Cache historical queries by
token_id + at_timekey. - Batch historical requests: When retrieving multiple historical points, consider the time interval between requests to optimize API quota usage.
-
Handle rate limits: Implement exponential backoff when receiving
429responses. Check theRetry-Afterheader for guidance. -
Validate timestamps: Ensure
at_timevalues are valid Unix timestamps and represent times when markets were active. - Convert timestamps: Store and work with Unix timestamps internally, but convert to ISO-8601 or human-readable formats for display purposes.
- Monitor API health: Track response times and error rates. Alert on unusual patterns that may indicate market disruptions.
Related
- Candlesticks (OHLCV) — Pre-aggregated bars at multiple intervals
- Price Series (Ticks) — Granular per-venue tick data
- Price Analytics Overview — Introduction to price data APIs
