OFFCODE
Sign inCreate account

REST API + WebSocket

Integrate programmatically with OFFCODE. Public market data, authenticated trading with API keys, WebSocket for real-time tickers and orders.

REST API

HTTPS endpoints for market data, trading and wallet.

https://offcode.pro/api/

WebSocket

Real-time streams of tickers, orderbook and fills.

wss://offcode.pro/ws

Public endpoints (no auth)

MethodPathDescription
GET/api/market/pairsUniverse of available perp + spot pairs
GET/api/market/candles?symbol=BTCUSDC&interval=5m&limit=500OHLCV candles
GET/api/market/depth?symbol=BTCUSDC&limit=50L2 orderbook
GET/api/market/trades?symbol=BTCUSDC&limit=50Recent trades
GET/api/pricing/ticker/BTCUSDCTicker for a single pair
GET/api/pricing/tickers?symbols=BTCUSDC,ETHUSDCTickers in batch

WebSocket channels

After connecting, send a subscribe payload:

{
  "type": "subscribe",
  "channels": ["ticker:BTCUSDC", "trades:ETHUSDC"]
}

Available channels:

  • ticker:<SYMBOL> — price, bid/ask, 24h volume
  • trades:<SYMBOL> — recent fills
  • orderbook:<SYMBOL> — book snapshot + delta
  • orders:user — events for your orders (auth)
  • balances:user — balance updates (auth)

Authenticated API keys

For trading and account operations, generate an API key at /api-keys with a specific scope:

  • read — read balances, orders and history
  • trade — open, cancel and modify orders
  • withdraw — request withdrawals (rare scope, additional gate)

Authentication via the X-OFFCODE-Key header + HMAC signature of the payload. Technical questions? Contact support.

Rate limits

  • Public: 60 req/min per IP
  • Authenticated: 600 req/min per API key
  • WebSocket: 100 subscribes per connection, no limit on inbound messages

The X-RateLimit-Remaining response header indicates remaining calls. Exceeding it returns HTTP 429 with Retry-After.

Risk warning. Programmatic trading amplifies execution speed and risk. Poorly configured bots can generate losses quickly. This documentation does not constitute investment advice. Test extensively before trading with real capital.

Official SDK, complete examples and more endpoints in the docs under construction. Questions? /contact

Generate API key