Skip to main content
The Everstrike API lets you connect programs directly to the exchange for market data and account activity. This page provides working code samples for both the REST and WebSockets APIs, covering connection, authentication, subscribing to market updates, and handling account events.
Full API references live at docs.testnet.everstrike.io (REST) and everstrikeio.github.io/everstrike-websockets-api (WebSockets). This page is a practical starter, not the reference.

Endpoints

Generate an API key and a secret key at app.testnet.everstrike.io/app/api for testnet, or the equivalent mainnet URL.

REST API

List Trading Pairs

The /pairs endpoint returns every tradable market with tick size, lot size, leverage caps, and contract specifications. No authentication required.
Use the returned key (for example, USD_BTC_PERP) whenever you reference a market from the REST or WebSockets API.

Authenticated Requests

Authenticated endpoints require your API key and a signed request. Send orders, cancel orders, and read account state under the /auth/* path prefix.
Cancel all open orders
Refer to the full REST reference for signing details and the complete endpoint list.

WebSockets API

The WebSockets API streams order book, ticker, candle, trade, and liquidation updates for any subscribed pair. Authenticated connections also receive your personal order, position, and balance updates.

Connect and Subscribe

Subscribing to a Single Category

sub_pair subscribes to every category for a pair. To subscribe to just one channel, use sub with a pair:category string:
Subscribe to ticker only
Unsubscribe from order book
Unsubscribe from everything
Public categories: depth, ticker, index, ohlcv, match, trades, liquidation.

Handling Messages

Every message contains category, pair, result, and msg fields. Dispatch on category to drive your application:
Message handler

Authenticated Categories

Once authenticated with auth_api, you automatically receive updates for:
  • order_added, order_cancelled, order_triggered
  • order_partially_completed, order_completed
  • trigger_added, trigger_cancelled, trigger_failed
  • deposit_added, deposit_completed
  • withdrawal_completed
  • position_updated, position_closed

Keeping the Connection Alive

Send a status ping every 5 seconds to prevent idle disconnection:
Ping
A connection that is neither subscribed to anything nor authenticated is closed after 30 seconds.

Rate Limits

If you need more than 10 public subscriptions, split them across multiple connections.

Trading Pairs

Pair keys follow a quote-first convention for perpetuals and base-first for spot: Fetch the full canonical list from https://api.everstrike.io/pairs. Use the programmatic key, not the display symbol.

Next Steps

REST API Reference

Full endpoint list, request signing, and response schemas.

WebSockets Reference

Complete message formats and category list.

MCP Server

Connect an AI client to live Everstrike market data.

Market Maker Bot

Open-source reference implementation using the API.