API Reference

API Caching Strategy

This document outlines the caching durations applied to various API endpoints.

Markets

Endpoints: All Markets · Single Market

  • Cache Duration: 1 minute
  • Notes: Market data is relatively static. A 1-minute cache strikes a balance between performance and freshness.

OHLC

Endpoint: OHLC

  • Cache Duration: 30 seconds
  • Data Delay: Underlying OHLC data may itself be delayed by up to 1 minute.
  • Effective Lag: Up to 1 minute 30 seconds behind real-time.
  • Notes: This design reduces load while ensuring users have access to consistent, batched candlestick data.

Latest Prices

Endpoints: All Prices · Single Price

  • Cache Duration: 1 second
  • Notes: Price queries are the most latency-sensitive. The cache is kept minimal to support near-real-time pricing while still providing performance benefits.

Trading Limits

Endpoint: Trading Limits

  • Cache Duration: None
  • Notes: These values are critical for risk management and must always reflect the latest state.

Default Behavior

Unless otherwise specified, all GET endpoints default to:

  • Cache Duration: 1 minute
  • Notes: This ensures consistency across the API and reduces the need for endpoint-specific caching rules.