BESC Exchange API

v1.0.0

BESC Exchange API

Official BESC Exchange API reference for account, wallet, trading, ecosystem, and admin operations.

344
GET
219
POST
28
PUT
0
PATCH
46
DEL
BESC Exchange Server
/api
Persiapan
Langkah cepat untuk mulai menggunakan API
1

Authentication

Get your API key from the settings and include it in the X-API-Key header for all requests.

2

Jelajahi Endpoint

Browse the sidebar to find endpoints. Use search and filters to quickly locate what you need.

3

Uji & Integrasikan

Use the API Playground to test endpoints, then copy generated code to your application.

Bot Builder Quick Start
Complete API flow for arb bots, trading bots, and automated systems — deposit, trade, withdraw via API.
1
Authenticate — get your JWT tokenPOST
POST /api/auth/login
{ "email": "you@example.com", "password": "yourpassword" }

// Response:
{ "token": "eyJhbGci..." }  ← use this as Bearer token on every request
2
Get your ECO deposit addressGET
GET /api/finance/wallet/ECO/{currency}

Replace {currency} with e.g. BNB, WBESC, ETH

// Response — address field contains chain → address map:
{
  "currency": "BNB",
  "balance": 0,
  "address": {
    "BSC": { "address": "0xYourDepositAddress..." }
  }
}

Send funds to address.BSC.address (or whichever chain you use). The deposit is auto-detected and credited to your balance within ~60 seconds.

3
Confirm deposit is creditedGET
GET /api/finance/transaction?walletType=ECO&currency={currency}&type=DEPOSIT&sortOrder=desc
// Poll every 15s until you see your deposit with status COMPLETED:
{
  "data": [{
    "type": "DEPOSIT",
    "status": "COMPLETED",   ← credit confirmed
    "amount": 0.5,
    "trxId": "0xabc123...",  ← on-chain tx hash
    "wallet": { "currency": "BNB" }
  }]
}

// Or just re-check wallet balance:
GET /api/finance/wallet/ECO/{currency}   → balance field updates on credit
4
Get markets & live orderbookGET
GET /api/ecosystem/market
// Returns all trading pairs:
[{ "currency": "WBESC", "pair": "BNB", "symbol": "WBESC/BNB", "metadata": { "taker": 0.1, "maker": 0.1 } }]

// Get live orderbook for a specific pair:
GET /api/ecosystem/market/{symbol}   e.g. /api/ecosystem/market/WBESC%2FBNB
→ { "bids": [[price, qty], ...], "asks": [[price, qty], ...] }
5
Place a buy or sell orderPOST
POST /api/ecosystem/order
// Limit buy: buy 10 WBESC at 0.0007 BNB each
{
  "currency": "WBESC",   ← base asset
  "pair": "BNB",         ← quote asset (what you pay/receive)
  "type": "limit",       ← "limit" or "market"
  "side": "BUY",         ← "BUY" or "SELL"
  "amount": 10,          ← qty of base asset (WBESC)
  "price": 0.0007        ← omit for market orders
}

// Response:
{ "order": { "id": "uuid", "status": "OPEN", "side": "BUY", "amount": 10, "price": 0.0007 } }

// Market sell: sell 10 WBESC at best available price
{ "currency": "WBESC", "pair": "BNB", "type": "market", "side": "SELL", "amount": 10 }
6
Monitor order statusGET / DEL
// List your open orders:
GET /api/ecosystem/order
→ [{ "id": "uuid", "status": "OPEN"|"FILLED"|"PARTIALLY_FILLED"|"CANCELLED", "filled": 10 }]

// Cancel a specific order:
DELETE /api/ecosystem/order/{orderId}

// Cancel ALL open orders:
DELETE /api/ecosystem/order/all
7
Withdraw to external walletPOST
POST /api/ecosystem/withdraw
{
  "currency": "BNB",                        ← currency to withdraw
  "chain": "BSC",                           ← network (BSC, ETH, BESC, etc.)
  "amount": 0.42,                           ← amount (network fee deducted automatically)
  "toAddress": "0xYourExternalWallet..."    ← destination address
}

// Response:
{ "message": "Withdrawal processed successfully" }

// Check withdrawal status:
GET /api/finance/transaction?walletType=ECO&currency=BNB&type=WITHDRAW&sortOrder=desc
→ status: PENDING → PROCESSING → COMPLETED

Withdrawals are processed automatically. Network fees are estimated and deducted from the amount. No minimum withdrawal (fees must be covered).

Auth header required on all requests (steps 2–7):

Authorization: Bearer <your-jwt-token>

Tokens expire — re-authenticate and refresh as needed. Use the API Playground on any endpoint to test live with your credentials.

Pembuatan Kode

Generate code snippets in cURL, JavaScript, Python, PHP, Go, and Ruby.

Playground API

Test endpoints directly from the browser with real-time responses.

Pencarian Cerdas

Quickly find endpoints by path, method, tags, or description.