Skip to content

API Reference Overview

Base URL: https://api.foursec.xyz

All paid endpoints use the x402 protocol. See Authentication.

Endpoints

MethodPathCostDescription
GET/price/:symbol$0.01Real-time aggregated price
GET/price/history/:symbol$0.02Historical OHLCV data
GET/volume/:symbol$0.0124h volume data
GET/spread/:pair$0.01Bid/ask spread analysis
GET/arbitrage-opportunity$0.03Cross-DEX arbitrage scanner
GET/volatility-index/:symbol$0.02Risk metrics and volatility
POST/price-alert$0.05Create webhook alert
GET/healthFreeHealth check
GET/FreeAPI info and endpoint list

Supported Symbols

BTC, ETH, SOL, ARB, OP, MATIC, AVAX, DOT, LINK, UNI

Response Format

All responses are JSON:

{
  "symbol": "ETH",
  "price_usd": 2450.32,
  "timestamp": "2026-07-04T15:30:00Z"
}

Error responses:

{
  "error": "symbol_not_found",
  "message": "Symbol XYZ is not supported"
}

Caching

  • 30-second cache TTL on all paid endpoints
  • Identical requests within 30s are free (no payment, no rate limit count)
  • Cache headers: X-Cache: HIT or X-Cache: MISS

Rate Limits

  • 100 requests/minute per wallet (standard)
  • 1000 requests/minute (premium)
  • Headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset

Released under the MIT License.