> 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 useBTC-PERPUSDT. - Every market-data response carries a
timestampin 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.
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/marketsEnumerates every tradable market on Duckpot (spot and perpetual) so integrators can map each pair to a cryptoasset.
{
"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/ticker24h pricing and rolling volume per market pair, keyed by BASE-QUOTE.
{
"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/summaryOverview array of all spot market pairs: last price, best bid/ask, 24h high/low, volume and % change.
[
{
"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.
- market_pair — e.g. BTC-USDT (required)
- depth — total levels, split evenly per side. Default 200, max 200.
{
"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.
- market_pair — e.g. BTC-USDT (required)
[
{
"trade_id": "2290000000123456",
"price": 112500.12,
"base_volume": 0.0125,
"quote_volume": 1406.25,
"timestamp": 1788307200000,
"type": "buy"
}
]GET/api/public/v1/klinesHistorical OHLCV candles, ascending by open time. Each row is [openTime, open, high, low, close, baseVolume].
- 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
[
[
1788307200000,
112400.00,
112600.00,
112300.00,
112550.00,
12.43
]
]GET/api/public/v1/assetsPer-currency details: name, unified_cryptoasset_id, deposit/withdraw availability and trading fees.
{
"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/contractsAll perpetual contracts with pricing, open interest, funding rate and contract specifications.
[
{
"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.
- ticker_id — e.g. BTC-PERPUSDT (required)
- depth — total levels, max 200
{
"ticker_id": "BTC-PERPUSDT",
"timestamp": 1788307200000,
"bids": [["112490.10", "0.523"]],
"asks": [["112510.20", "0.331"]]
}GET/api/public/v1/pairsAggregator format (underscore ticker_id). Every spot pair available for trading.
[
{ "ticker_id": "BTC_USDT", "base": "BTC", "target": "USDT" }
]GET/api/public/v1/tickersAggregator format. 24h data per spot pair: last price, base/target volume, best bid/ask, 24h high/low.
[
{
"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/orderbookAggregator format L2 depth using a query parameter and underscore ticker_id.
- ticker_id — e.g. BTC_USDT (required)
- depth — levels per side, max 100
{
"ticker_id": "BTC_USDT",
"timestamp": 1788307200000,
"bids": [["112490.10", "0.523"]],
"asks": [["112510.20", "0.331"]]
}GET/api/public/v1/historical_tradesAggregator format completed trades, split into buy and sell arrays.
- ticker_id — e.g. BTC_USDT (required)
- type — buy or sell (optional)
- limit — max 60
{
"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_specsAggregator format perpetual contract specifications: contract size, settlement currency, index, funding interval and fees.
[
{
"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"
}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.
https://duckpot.xyz/mcp