$EX5 pre-sale is open — Seed tier · 500M fixed supply · 50% burn · KYC via EX5 ExchangeJOIN →
EX5 API · REST & WEBSOCKET

EX5 API documentation

The EX5 API gives programmatic access to EX5 Exchange: public market data, order entry, balances, deposits, withdrawals and real-time WebSocket streams. Public endpoints need no key; private endpoints are signed with an API key (HMAC-SHA256).

Base URLs

All requests go to https://exchange.ex5.com over HTTPS. The path prefix selects the service:

PurposeBase URL
Market data, balances, deposits, withdrawals, order and trade historyhttps://exchange.ex5.com/api/v2/peatio
Order entry (create, cancel, cancel all)https://exchange.ex5.com/api/v2/finex
Your profile and server timehttps://exchange.ex5.com/api/v2/barong
WebSocket streamswss://exchange.ex5.com/api/v2/ranger/public and /private

Quick start

Fetch the 24-hour statistics of every market. No account or key is needed:

curl
curl -s "https://exchange.ex5.com/api/v2/peatio/public/markets/tickers"
Response (example values)
{
  "btcusdt": {
    "at": "1790530000",
    "ticker": {
      "at": "1790530000",
      "avg_price": "84485.51",
      "high": "85117.63",
      "last": "84418.00",
      "low": "83838.87",
      "open": "84074.99",
      "price_change_percent": "+0.41%",
      "volume": "12450.33",
      "amount": "0.1473"
    }
  },
  "ethusdt": {
    "at": "1790530000",
    "ticker": {
      "at": "1790530000",
      "avg_price": "2688.10",
      "high": "2712.40",
      "last": "2689.08",
      "low": "2661.35",
      "open": "2701.55",
      "price_change_percent": "-0.46%",
      "volume": "8805.10",
      "amount": "3.2755"
    }
  }
}

Next, create an API key to read balances and place orders, or subscribe to live updates over the WebSocket API.

Request and response conventions

  • Requests and responses are JSON. Send request bodies as JSON with Content-Type: application/json.
  • Prices, amounts and balances are decimal strings, for example "84418.00". Two public endpoints return JSON numbers instead: recent trades and candles (k-line). Numbers there can use exponent notation, such as 7.9e-07.
  • Send decimals in plain notation ("0.00007", never 7e-05). Order entry rejects exponent notation.
  • Record timestamps are ISO 8601 in UTC, for example 2026-09-27T17:07:34Z. Tickers, candles, order-book depth and all WebSocket messages use Unix time in seconds. The API-key nonce is Unix time in milliseconds.
  • Market ids are lowercase base + quote currency codes, for example btcusdt. Currencies available on more than one network have a network id, such as usdt.trc20; see GET /api/v2/peatio/public/currencies.
  • Lists are paginated with limit and page. The response headers Total, Page and Per-Page describe the result set. The maximum page size is 1000, and 100 for deposit and withdrawal lists.
  • Markets and currencies are cached on the server for up to 10 minutes; tickers refresh about every 5 seconds. Poll no faster than that, or use the WebSocket streams.

Authentication

Private requests carry three headers: X-Auth-Apikey (your key id), X-Auth-Nonce (current Unix time in milliseconds) and X-Auth-Signature (hex HMAC-SHA256 of nonce + key id, keyed with your secret). API keys require two-factor authentication on the account. See Authentication for a worked example.

Rate limits and errors

Requests are rate limited per IP address and, for order entry, per account. Errors are JSON with a machine-readable key such as public.market.doesnt_exist. See Errors & rate limits.

Support

When you contact EX5 support about an API call, include the x-request-id response header, the endpoint and the time of the request.