API Reference
Trade programmatically on 1bit. Market data is public; trading and account endpoints require an API key. All responses are JSON.
https://1bit.trade/api/v2All responses are JSON. Prices and amounts are returned as strings to preserve decimal precision.
Lowercase base+quote, concatenated — btcusdt, ethbtc, usdcusdt (no slash or underscore).
Non-2xx responses return { "errors": ["code.message"] } with the matching HTTP status.
240 requests/min per IP on authenticated routes.
Authentication
Create an API key under Account → API Keys. You receive a key id and a secret (shown once). Sign every authenticated request with three headers:
| X-Auth-Apikey | Your API key id. |
| X-Auth-Nonce | Current time in milliseconds (must be within 30s of server time). |
| X-Auth-Signature | HMAC-SHA256(secret, nonce + apikey), hex-encoded. |
Signing example (Node.js)
const crypto = require("crypto");
const apiKey = "YOUR_KEY_ID";
const secret = "YOUR_SECRET";
const nonce = Date.now().toString();
const signature = crypto.createHmac("sha256", secret)
.update(nonce + apiKey)
.digest("hex");
await fetch("https://1bit.trade/api/v2/account/balances", {
headers: {
"X-Auth-Apikey": apiKey,
"X-Auth-Nonce": nonce,
"X-Auth-Signature": signature,
},
});Rate limit: 240 requests/min per IP on authenticated routes. Withdrawals require 2FA to be enabled on the account.
Public — Market data
No authentication required. Live markets, tickers, order book, trades and candles. CoinGecko-format endpoints are also provided for exchange-listing integrations.
/public/marketspublicList all trading markets and their precision/fees.
/public/currenciespublicList currencies with per-chain deposit/withdraw config.
/public/tickerspublic24h ticker (last, high, low, volume, change) for every market.
/public/markets/{market}/tickerspublic24h ticker for one market, e.g. btcusdt.
/public/markets/{market}/depthpublicOrder book — aggregated bids & asks.
| Param | Required | Description |
|---|---|---|
| limit | no | Levels per side (default 50). |
/public/markets/{market}/tradespublicRecent public trades for a market.
| Param | Required | Description |
|---|---|---|
| limit | no | Max trades to return. |
/public/markets/{market}/k-linepublicOHLCV candlesticks.
| Param | Required | Description |
|---|---|---|
| period | yes | Candle size in minutes (1, 5, 15, 60, 240, 1440…). |
| limit | no | Number of candles (default 300). |
/public/coingecko/tickerspublicCoinGecko-format tickers for exchange-listing integrations.
/public/coingecko/orderbookpublicCoinGecko-format order book.
| Param | Required | Description |
|---|---|---|
| ticker_id | yes | Pair in BASE_QUOTE form, e.g. BTC_USDT. |
| depth | no | Levels to return. |
/public/coingecko/historical_tradespublicCoinGecko-format historical trades (real trades only; trade_timestamp in Unix seconds).
| Param | Required | Description |
|---|---|---|
| ticker_id | yes | Pair in BASE_QUOTE form, e.g. BTC_USDT. |
| type | no | buy or sell — restrict to one side (omit for both). |
| limit | no | Max trades to return (default 200, max 1000). |
/public/cmc/summarypublicCoinMarketCap-format 24h summary of every pair (last, bid/ask, volumes, 24h change/high/low).
/public/cmc/assetspublicCoinMarketCap-format asset map: name, deposit/withdraw status, min withdraw, fees, contract address.
/public/cmc/tickerpublicCoinMarketCap-format ticker map: last price, base/quote volume and isFrozen per pair.
/public/cmc/orderbook/{market_pair}publicCoinMarketCap-format order book (level 2; timestamp in ms).
| Param | Required | Description |
|---|---|---|
| market_pair | yes | Pair in BASE_QUOTE form, e.g. BTC_USDT (dash also accepted). |
| depth | no | Total levels across both sides (0 = full book). |
/public/cmc/trades/{market_pair}publicCoinMarketCap-format recent trades (real trades only; timestamp in ms).
| Param | Required | Description |
|---|---|---|
| market_pair | yes | Pair in BASE_QUOTE form, e.g. BTC_USDT (dash also accepted). |
| limit | no | Max trades to return (default 200, max 1000). |
Trading
Requires authentication. Place, list and cancel orders; view your fills.
/market/orders🔒 authPlace a limit or market order.
| Param | Required | Description |
|---|---|---|
| market | yes | Market id, e.g. btcusdt. |
| side | yes | buy or sell. |
| ordType | yes | limit or market. |
| price | no | Limit price (required for limit orders). |
| volume | yes | Order amount in the base currency. |
/market/orders🔒 authList your orders.
| Param | Required | Description |
|---|---|---|
| market | no | Filter by market. |
| state | no | Filter by state (wait, done, cancel). |
/market/orders/{id}🔒 authGet a single order by id.
/market/orders/{id}/cancel🔒 authCancel an open order.
/market/trades🔒 authYour executed trades.
| Param | Required | Description |
|---|---|---|
| market | no | Filter by market. |
Account & Wallet
Requires authentication. Balances, deposit addresses and withdrawals.
/account/balances🔒 authYour balances (available & locked) per currency.
/account/ledger🔒 authYour account ledger — every balance change (trades, deposits, withdrawals, fees).
/account/deposit_address/{currency}🔒 authGet your deposit address for a currency.
| Param | Required | Description |
|---|---|---|
| chain | no | Network key (e.g. bsc-mainnet). |
/account/deposit_address/{currency}🔒 authGenerate a deposit address if you don't have one.
/account/deposits🔒 authYour deposit history with confirmation status.
/account/withdraws🔒 authYour withdrawal history.
/account/withdraws🔒 authRequest a withdrawal (2FA required).
| Param | Required | Description |
|---|---|---|
| currency | yes | Currency to withdraw. |
| chain | yes | Destination network. |
| address | yes | Destination address. |
| amount | yes | Amount to withdraw. |
| otpCode | yes | Current 6-digit 2FA code. |
WebSocket — live data
Stream the order book, trades and tickers in real time. Connect and subscribe by repeating the stream query parameter; messages arrive as JSON keyed by stream name.
wss://1bit.trade/api/v2/ranger| Stream | Auth | Pushes |
|---|---|---|
| {market}.ob | public | Order book (bids & asks) for one market. |
| {market}.trades | public | New public trades for one market. |
| tickers | public | 24h tickers for every market. |
| order | 🔒 auth | Your order updates (created/filled/canceled). |
| balance | 🔒 auth | Your balance changes. |
Subscribe example (browser)
const ws = new WebSocket(
"wss://1bit.trade/api/v2/ranger?stream=btcusdt.ob&stream=btcusdt.trades&stream=tickers"
);
ws.onmessage = (e) => {
const msg = JSON.parse(e.data);
if (msg["btcusdt.ob"]) { /* order book snapshot/update */ }
if (msg["btcusdt.trades"]) { /* array of trades */ }
if (msg["tickers"]) { /* array of tickers */ }
};For private streams (order, balance) authenticate the upgrade request with the same X-Auth-* headers as REST.

