Skip to main content
This guide explains how to integrate a market making system with the Ekiden REST and WebSocket APIs. It provides an overview of authentication, market data, order management, private account streams, and operational best practices. Detailed endpoint specifications, request parameters, and response schemas are available in the API Reference.

1. Overview

Ekiden provides REST and WebSocket APIs for low-latency market making and automated trading.

Supported Protocols

  • REST API (HTTPS)
  • WebSocket (WSS)

Environments

Public market data is available without authentication. Trading operations and private account streams require authentication.

2. Authentication

Ekiden supports two authentication methods:
  • JWT Bearer authentication
  • API Key authentication

Obtain a JWT

Example request:
Successful response:
The returned JWT is used to authenticate private REST requests and private WebSocket connections.

REST Authentication

Authenticated REST requests use the standard Bearer header:

API Key Authentication

REST API Key authentication uses the following headers:
  • X-API-KEY
  • X-SIGNATURE
  • X-TIMESTAMP-MS
  • X-NONCE
The signature must be an Ed25519 signature of:
Refer to the Authentication guide for complete details.

3. REST API

REST endpoints are grouped by resource. Example:
Refer to the API Reference for complete endpoint documentation.

4. WebSocket

Ekiden provides separate public and private WebSocket endpoints.

JWT Authentication

Authenticate immediately after connecting. Client → Server
Server → Client

API Key Authentication

Alternatively, authenticate using an API key. Client → Server
The signature must be an Ed25519 signature of:

Subscribe

After successful authentication, subscribe to private topics.
Public market data is available from the public WebSocket without authentication. Common public topics include:
  • orderbook.<depth>.<symbol>
  • trade.<symbol>
  • ticker.<symbol>
  • kline.<interval>.<symbol>
  • insurance_pool.<symbol>
  • adl_alert.<symbol>

5. Typical Trading Flow

A typical market maker integration follows this sequence:
  1. Obtain a JWT or use API Key authentication.
  2. Connect to the public WebSocket.
  3. Subscribe to market data.
  4. Connect to the private WebSocket.
  5. Authenticate the private connection.
  6. Subscribe to private account topics.
  7. Place, amend, or cancel orders using the REST API.
  8. Monitor order, execution, position, and account updates through the private WebSocket.

6. Error Handling

Common HTTP status codes include: Refer to the Error Handling guide for the complete list of application error codes.

7. Rate Limits

REST API requests are subject to rate limits. When a limit is exceeded, the server returns:
  • HTTP 429 Too Many Requests
  • Retry-After response header
Clients should respect the Retry-After value before retrying requests. Refer to the Rate Limits guide for current limits.