// Developers

> Public market data API.

Versioned REST endpoints, no API key required for market data. All timestamps are Unix milliseconds, UTC.

Quick facts

  • Base URL: https://duckpot.xyz
  • All responses are JSON, UTF-8, with Access-Control-Allow-Origin: *.
  • Market pair delimiter is a dash: BTC-USDT. Perpetuals use BTC-PERPUSDT.
  • Every market-data response carries a timestamp in Unix milliseconds (UTC).

Market coverage (live)

These figures are read from /api/public/v1/markets right now, so the documentation, the API and the website always report the same numbers. "Listed pairs" anywhere on the site means spot pairs plus perpetual contracts combined.

Spot pairs
Perpetual contracts
Total markets

Volume definitions

base_volume — quantity traded in the base asset (for BTC-USDT, the BTC amount).

quote_volume — value traded in the quote asset (for BTC-USDT, the USDT value).

24h volume is calculated from completed trades executed during the preceding rolling 24-hour period, measured from the response timestamp. The same figures power the website market tables, so website, API and trade tape reconcile.

USD_volume on derivatives equals quote_volume, since all contracts are USDT-quoted.

REST endpoints

GET/api/public/v1/markets
Enumerates every tradable market on Duckpot (spot and perpetual) so integrators can map each pair to a cryptoasset.
Example response — illustrative, values are not live
{
  "timestamp": 1788307200000,
  "count": 502,
  "markets": [
    {
      "symbol": "BTC-USDT",
      "ticker_id": "BTC-USDT",
      "base_asset": "BTC",
      "quote_asset": "USDT",
      "base_id": 1,
      "quote_id": 825,
      "status": "active",
      "type": "spot"
    },
    {
      "symbol": "BTC-PERPUSDT",
      "ticker_id": "BTC-PERPUSDT",
      "base_asset": "BTC",
      "quote_asset": "USDT",
      "base_id": 1,
      "quote_id": 825,
      "status": "active",
      "type": "perpetual"
    }
  ]
}
GET/api/public/v1/ticker
24h pricing and rolling volume per market pair, keyed by BASE-QUOTE.
Example response — illustrative, values are not live
{
  "BTC-USDT": {
    "base_id": 1,
    "quote_id": 825,
    "last_price": 112500.12,
    "base_volume": 123.45,
    "quote_volume": 13890000.55,
    "high_24h": 114200.00,
    "low_24h": 109800.00,
    "price_change_percent_24h": 2.31,
    "timestamp": 1788307200000,
    "isFrozen": 0
  }
}
GET/api/public/v1/summary
Overview array of all spot market pairs: last price, best bid/ask, 24h high/low, volume and % change.
Example response — illustrative, values are not live
[
  {
    "trading_pairs": "BTC-USDT",
    "base_currency": "BTC",
    "quote_currency": "USDT",
    "last_price": 112500.12,
    "lowest_ask": 112510.20,
    "highest_bid": 112490.10,
    "base_volume": 123.45,
    "quote_volume": 13890000.55,
    "price_change_percent_24h": 2.31,
    "highest_price_24h": 114200.00,
    "lowest_price_24h": 109800.00,
    "timestamp": 1788307200000
  }
]
GET/api/public/v1/orderbook/{market_pair}
Full L2 depth. Path uses a dash, e.g. BTC-USDT. Each level is [price, quantity] as strings; price in quote currency, quantity in base currency. Bids descending, asks ascending.
Parameters
  • market_pair — e.g. BTC-USDT (required)
  • depth — total levels, split evenly per side. Default 200, max 200.
Example response — illustrative, values are not live
{
  "timestamp": 1788307200000,
  "bids": [
    ["112490.10", "0.523"],
    ["112489.80", "1.204"]
  ],
  "asks": [
    ["112510.20", "0.331"],
    ["112511.00", "0.884"]
  ]
}
GET/api/public/v1/trades/{market_pair}
Completed trades for the preceding rolling 24 hours, newest first.
Parameters
  • market_pair — e.g. BTC-USDT (required)
Example response — illustrative, values are not live
[
  {
    "trade_id": "2290000000123456",
    "price": 112500.12,
    "base_volume": 0.0125,
    "quote_volume": 1406.25,
    "timestamp": 1788307200000,
    "type": "buy"
  }
]
GET/api/public/v1/klines
Historical OHLCV candles, ascending by open time. Each row is [openTime, open, high, low, close, baseVolume].
Parameters
  • symbol — e.g. BTC-USDT or BTC-PERPUSDT (required)
  • interval — 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d, 1w, 1M. Default 1m.
  • start_time — Unix ms, inclusive (optional)
  • end_time — Unix ms, inclusive (optional)
  • limit — 1–1000, default 200
Example response — illustrative, values are not live
[
  [
    1788307200000,
    112400.00,
    112600.00,
    112300.00,
    112550.00,
    12.43
  ]
]
GET/api/public/v1/assets
Per-currency details: name, unified_cryptoasset_id, deposit/withdraw availability and trading fees.
Example response — illustrative, values are not live
{
  "BTC": {
    "name": "Bitcoin",
    "unified_cryptoasset_id": 1,
    "can_withdraw": true,
    "can_deposit": true,
    "min_withdraw": "0",
    "max_withdraw": "0",
    "maker_fee": "0.001",
    "taker_fee": "0.001"
  }
}
GET/api/public/v1/contracts
All perpetual contracts with pricing, open interest, funding rate and contract specifications.
Example response — illustrative, values are not live
[
  {
    "ticker_id": "BTC-PERPUSDT",
    "base_currency": "BTC",
    "quote_currency": "USDT",
    "last_price": 112500.12,
    "base_volume": 123.45,
    "quote_volume": 13890000.55,
    "USD_volume": 13890000.55,
    "bid": 112490.10,
    "ask": 112510.20,
    "high": 114200.00,
    "low": 109800.00,
    "product_type": "Perpetual",
    "open_interest": 5123.44,
    "open_interest_usd": 576000000.00,
    "index_price": 112498.70,
    "funding_rate": 0.0001,
    "next_funding_rate_timestamp": 1788321600000,
    "maker_fee": 0.0002,
    "taker_fee": 0.00055,
    "contract_type": "Vanilla",
    "contract_price": 112500.12,
    "contract_price_currency": "USDT",
    "base_id": 1,
    "quote_id": 825
  }
]
GET/api/public/v1/contract-orderbook/{ticker_id}
Perpetual contract order book. Ticker format BASE-PERPQUOTE, e.g. BTC-PERPUSDT.
Parameters
  • ticker_id — e.g. BTC-PERPUSDT (required)
  • depth — total levels, max 200
Example response — illustrative, values are not live
{
  "ticker_id": "BTC-PERPUSDT",
  "timestamp": 1788307200000,
  "bids": [["112490.10", "0.523"]],
  "asks": [["112510.20", "0.331"]]
}
GET/api/public/v1/pairs
Aggregator format (underscore ticker_id). Every spot pair available for trading.
Example response — illustrative, values are not live
[
  { "ticker_id": "BTC_USDT", "base": "BTC", "target": "USDT" }
]
GET/api/public/v1/tickers
Aggregator format. 24h data per spot pair: last price, base/target volume, best bid/ask, 24h high/low.
Example response — illustrative, values are not live
[
  {
    "ticker_id": "BTC_USDT",
    "base_currency": "BTC",
    "target_currency": "USDT",
    "last_price": 112500.12,
    "base_volume": 123.45,
    "target_volume": 13890000.55,
    "bid": 112490.10,
    "ask": 112510.20,
    "high": 114200.00,
    "low": 109800.00
  }
]
GET/api/public/v1/orderbook
Aggregator format L2 depth using a query parameter and underscore ticker_id.
Parameters
  • ticker_id — e.g. BTC_USDT (required)
  • depth — levels per side, max 100
Example response — illustrative, values are not live
{
  "ticker_id": "BTC_USDT",
  "timestamp": 1788307200000,
  "bids": [["112490.10", "0.523"]],
  "asks": [["112510.20", "0.331"]]
}
GET/api/public/v1/historical_trades
Aggregator format completed trades, split into buy and sell arrays.
Parameters
  • ticker_id — e.g. BTC_USDT (required)
  • type — buy or sell (optional)
  • limit — max 60
Example response — illustrative, values are not live
{
  "buy": [
    {
      "trade_id": "2290000000123456",
      "price": 112500.12,
      "base_volume": 0.0125,
      "target_volume": 1406.25,
      "trade_timestamp": 1788307200000,
      "type": "buy"
    }
  ],
  "sell": []
}
GET/api/public/v1/contract_specs
Aggregator format perpetual contract specifications: contract size, settlement currency, index, funding interval and fees.
Example response — illustrative, values are not live
[
  {
    "ticker_id": "BTC-PERPUSDT",
    "base_currency": "BTC",
    "quote_currency": "USDT",
    "product_type": "Perpetual",
    "contract_type": "Vanilla",
    "settle_currency": "USDT",
    "contract_size": 1,
    "contract_price": 112500.12,
    "contract_price_currency": "USDT",
    "index_name": "BTC/USDT",
    "index_currency": "USDT",
    "index_price": 112498.40,
    "funding_rate_interval_hours": 8,
    "maker_fee": 0.0002,
    "taker_fee": 0.0006,
    "timestamp": 1788307200000
  }
]

Errors

Errors return a JSON body with a numeric code and a human-readable message.

{
  "code": 404,
  "message": "Market not found"
}
200 OK
Request succeeded.
400 Bad Request
Missing or malformed parameter (bad symbol format, unsupported interval).
404 Not Found
Market does not exist on Duckpot.
429 Too Many Requests
Rate limit exceeded — back off and retry.
500 Internal Server Error
Unexpected server error.
502 Bad Gateway
Upstream market data source temporarily unavailable.

Rate limits

  • Public REST: 1,200 requests/min per IP. Exceeding it returns 429.
  • Authenticated REST: 6,000 requests/min per API key.
  • Responses are cached for up to 5 seconds at the edge.

Authentication

Public market data requires no authentication. Private endpoints (balances, orders, withdrawals) use HMAC-SHA256 request signing with an API key and secret issued from your Duckpot account, or OAuth 2.1 through the MCP server below. There are no official SDKs yet — the REST API is plain JSON over HTTPS.

Streaming

A public WebSocket gateway (ticker, depth, trades and 1m klines) is in development and not yet published. Until it ships, poll the REST endpoints above; /klines and/orderbook update every second at the source.

AI / MCP connection

Connect Duckpot to ChatGPT, Claude, Cursor or VS Code with OAuth 2.1 and the Model Context Protocol. Not required for market-data integrations.

MCP server URL
https://duckpot.xyz/mcp
1
Copy the URL below
https://duckpot.xyz/mcp
2
Setup must be completed on ChatGPT / Claude or any AI web client
Go to Settings → Security and login → Developer mode and turn it on. Developer mode is not available in the mobile app — open ChatGPT or Claude on web.
3
Add a new connector
Open Plugins / Connectors, select Browse, hit +, then choose New Plugin. Name it Duckpot, choose Server URL and paste the URL above.
4
Authentication: OAuth (required)
Do not leave “No Auth” selected. Save the connector, connect it, and complete the OAuth authorization with your Duckpot account.
Open AI Connections hub →