1B+ transactions on IDX ecosystem
IDX community
Home
API Access

IDX Exchange API

Overview

IDX Exchange exposes REST endpoints for market data, account state, and order management. Private routes require an API key pair and ed25519 request signatures.

Base URL: https://api.dex.idxsolana.io

Create API keys

  1. Connect your wallet on IDX Exchange.
  2. Enable trading if you have not already.
  3. Open Portfolio → API Keys and create a key.
  4. Store the secret immediately — it is shown once. Use the account ID and key material only in secure server environments.

Request signing

Authenticated requests use the ed25519 curve. Build a message by concatenating (no separators):

  1. Timestamp in milliseconds
  2. HTTP method in uppercase (GET, POST, …)
  3. Path including query string (e.g. /v1/orders?symbol=PERP_BTC_USDC)
  4. JSON body string for POST and PUT (omit for GET and DELETE)

Sign the message with your API secret, encode the signature as base64url, and attach the headers below. Requests older than 300 seconds from server time are rejected.

Required headers

HeaderDescription
idx-timestampUnix timestamp in milliseconds
idx-account-idYour IDX Exchange account ID
idx-api-keyPublic API key (ed25519:<base58>)
idx-signatureed25519 signature, base64url-encoded

TypeScript example

Place a market order with @noble/curves and @scure/base:

import { ed25519 } from "@noble/curves/ed25519";
import { base58 } from "@scure/base";

async function placeMarketOrder() {
  const accountId = process.env.IDX_ACCOUNT_ID!;
  const secretKey = base58.decode(process.env.IDX_API_SECRET!);
  const baseUrl = "https://api.dex.idxsolana.io";
  const url = new URL(`${baseUrl}/v1/order`);
  const method = "POST";
  const body = JSON.stringify({
    symbol: "PERP_ETH_USDC",
    order_type: "MARKET",
    order_quantity: 0.01,
    side: "BUY",
  });
  const timestamp = Date.now();
  const message = `${timestamp}${method}${url.pathname}${url.search}${body}`;
  const signatureBytes = ed25519.sign(
    new TextEncoder().encode(message),
    secretKey,
  );
  const publicKeyBytes = ed25519.getPublicKey(secretKey);

  const response = await fetch(url, {
    method,
    body,
    headers: {
      "Content-Type": "application/json",
      "idx-timestamp": String(timestamp),
      "idx-account-id": accountId,
      "idx-api-key": `ed25519:${base58.encode(publicKeyBytes)}`,
      "idx-signature": Buffer.from(signatureBytes).toString(
        "base64url",
      ),
    },
  });

  console.log(await response.json());
}

Public endpoints

Market metadata and tickers do not require signing. Examples:

  • GET https://api.dex.idxsolana.io/v1/public/info
  • GET https://api.dex.idxsolana.io/v1/public/futures

WebSocket streams for live order book and account updates follow the same IDX Exchange API host. Detailed stream catalog will be expanded in a future docs revision.

Account setup: Portfolio & funds