Deriv API
K

API Overview

Understanding the Deriv API ecosystem and its core capabilities.

Deriv API provides programmatic access to trading services, account management, and market data for options trading platform. The API enables developers to integrate Deriv's robust trading infrastructure into their applications with comprehensive endpoints.

API architecture

The Deriv API consists of two complementary components designed to work together seamlessly:

REST APIs
  • Account creation and management
  • OTP generation for WebSocket authentication
  • System health monitoring
  • Standard HTTP methods (GET, POST)
  • Stateless requests
  • Authentication via Deriv-App-ID header
WebSocket APIs
  • Real-time trading operations (buy, sell, proposals)
  • Live market data streaming (ticks, symbols)
  • Account data subscriptions (balance, portfolio)
  • Persistent bidirectional connection
  • Real-time push notifications
  • Authentication via session tokens or OTP

When to use REST vs WebSocket

FeatureREST APIWebSocket API
Use CaseAccount setup and managementReal-time trading and market data
Connection TypeStateless HTTP requestsPersistent connection
AuthenticationDeriv-App-ID headerSession token or OTP
Real-time UpdatesNo (request-response only)Yes (subscriptions)
ExamplesCreate account, Get OTP, Health checkBuy contract, Stream ticks, Get balance

WebSocket connection

Endpoint:

1wss://ws.binaryws.com/websockets/v3

Connection Requirements:

  • WebSocket-capable client (browser or server-side)
  • Stable internet connection
  • Valid authentication credentials for protected endpoints
Click to open live chat support. Get instant help from our support team.