API docs
REST API and WebSocket for trading bots and third-party apps. Rate limit: 600 requests per minute.
Verification
- POST
/v1/auth/tokenGet an access token with an API key and HMAC signature
Market (public)
- GET
/v1/market/tickersPrices and changes across all markets
- GET
/v1/market/candles?symbol=BTCTMN&res=1hHistorical candles
- GET
/v1/market/orderbook?symbol=USDTTMNOrder book
Order
- POST
/v1/ordersPlace an instant buy/sell order
- GET
/v1/ordersList orders with filters
- GET
/v1/orders/{id}Details of a single order
Wallet
- GET
/v1/wallet/balancesBalances of all assets
- POST
/v1/wallet/withdrawSubmit a withdrawal (requires the withdraw permission and a whitelisted IP)
- GET
/v1/wallet/depositsDeposit history
Request authentication
Every private request must include the headers X-BX-KEY, X-BX-TS (milliseconds) and X-BX-SIGN (HMAC-SHA256 of timestamp + body with your secret). A clock skew above 30 seconds is rejected.
Python · place order
import hmac, hashlib, time, requests
API_KEY = "bx_pk_..."
SECRET = "bx_sk_..."
ts = str(int(time.time() * 1000))
body = '{"symbol":"USDTTMN","side":"buy","amount":100}'
sig = hmac.new(SECRET.encode(), (ts + body).encode(), hashlib.sha256).hexdigest()
r = requests.post("https://beetex.ir/api/v1/orders",
headers={"X-BX-KEY": API_KEY, "X-BX-TS": ts, "X-BX-SIGN": sig,
"Content-Type": "application/json"},
data=body)
print(r.json())JavaScript · WebSocket
const ws = new WebSocket("wss://beetex.ir/stream/v1");
ws.onopen = () => ws.send(JSON.stringify({ op: "subscribe", channels: ["ticker:BTCTMN", "ticker:USDTTMN"] }));
ws.onmessage = (e) => console.log(JSON.parse(e.data));