This article contains affiliate links to the WEEX exchange. If you sign up through them, AlgoSys receives a share of the exchange trading fees; your terms stay the same.
The WEEX API gives a bot full trading access to spot and futures over REST and WebSocket, while withdrawal over the API stays closed at the exchange level. Keys are created in your account, and each one carries a permission set and an IP whitelist. This configuration suits algo trading and journal automation: funds stay on the exchange even if a key is ever compromised.
SHORT ANSWER
API access is set up in a minute. In your account under API Management the exchange issues an API Key and a Secret Key, with the secret shown once. The key is assigned permissions (read-only, or read plus trade) and a list of allowed IPs. REST covers quotes, order book, balances, orders and positions, and the WebSocket streams market data and private updates in real time.
The main thing that sets WEEX apart from some exchanges is that withdrawal over the API is closed at the exchange level. A trade key places and cancels orders, with coin transfers to external addresses outside its scope. The worst case on a leaked trade key is unwanted trades on the account, and the money stays on the exchange.
If you are writing a bot or connecting a trading terminal, register with the code termainal. The code connects starter promos and fee cashback, your trading terms and API behaviour stay unchanged, and promo amounts depend on the campaign. The full breakdown of the platform is gathered in the WEEX exchange review.
CREATING API KEYS
Keys are created in your account under API Management. The exchange issues a pair: an API Key that identifies the request and a Secret Key that signs it. The secret is shown once at creation, after which you can no longer view it and can only regenerate the key. WEEX adds a third parameter, a passphrase: the user sets it when creating the key, it travels in the header of every private request, and it cannot be recovered if forgotten.
Two restrictions are set when the key is created. The first is the permission set: read balances and history, or read plus trade. The second is the list of allowed IPs, a whitelist the key is accepted from. A basic no-KYC account already opens spot, futures and copy trading, and the API works at that same access level, so you can connect a bot before completing any verification. The path from registration to a working account is walked through with screenshots in the beginner manual.
READ-ONLY AND TRADE PERMISSIONS
A read-only key reads account data and changes nothing. Through it a bot pulls balances, open positions, order and trade history, computes PnL and keeps a journal. Such a key is safe to hand to an analytics service or an external terminal, because the most it exposes is the state of the account.
A trade key additionally places and cancels orders on spot and futures, and changes leverage and margin type. A trading bot that enters and exits positions on its own uses this key. Withdrawal over the API on WEEX is closed at the exchange level, and the withdraw permission is absent from the set entirely.
| Permission | What it allows | Who to grant it to |
|---|---|---|
| Read-only | balances, positions, history, PnL | journal, analytics, terminal |
| Trade | orders, leverage, margin type | trading bot, copier |
| Withdrawal | unavailable over the API | nobody, the permission is absent |
The principle is simple: a key gets exactly as many permissions as the task needs. A service that only builds reports on trades does fine with read access. The trade permission is enabled only where a bot actually executes orders.
IP WHITELISTING AND SECURITY
Binding a key to an IP closes most of the risk. WEEX lets you specify the addresses a key is accepted from, and a request from any other IP is rejected before the signature is even checked. A bot on a VPS gets the server's static address, and even a leaked Secret Key is useless from another machine. Without a whitelist the key works from anywhere, so a static IP is the first thing to set after creating the pair.
The Secret Key is kept in environment variables or a secrets manager and must never be placed in a repo or hardcoded into frontend code. The request signature is computed locally with HMAC, and the secret stays on your server. On any suspicion of a leak the key is regenerated and the old one is revoked in the same API Management section. Withdrawal is absent from the permission set, so a stolen trade key threatens unwanted trades while the money stays on the account. How the exchange protects funds itself (the 1000 BTC fund, Merkle reserves 1:1, MPC and Chainalysis) is covered in the WEEX safety article.
REST AND WEBSOCKET
The REST API covers the full trading cycle over ordinary HTTP requests. Public endpoints return quotes, order book, recent trades, candles and contract parameters, and are open without a signature. Private endpoints read balances and positions, place and cancel orders, and change leverage, with every such request signed by the key. REST suits one-off actions: place an order, cancel an order, pull history.
The WebSocket holds a persistent connection and pushes updates itself, with no polling. The public channel broadcasts quotes, order book, the trade feed and candles in real time. The private channel, after a signed login, sends balance changes, order statuses and position updates the moment they happen. The standard pairing: the WebSocket carries market data and private events, and orders go through REST.
| Channel | Method | What it serves | Signed |
|---|---|---|---|
| Public REST | HTTP | quotes, order book, candles | no |
| Private REST | HTTP | balances, orders, positions | yes |
| Public WS | WebSocket | ticks, order book, trades | no |
| Private WS | WebSocket | balance, orders, positions | yes |
Both spot and perpetual futures are reachable through the same interfaces, with the endpoints and contract parameters differing. How the contracts themselves, funding and mark-price liquidation work is covered in the WEEX futures trading article.
RATE LIMITS AND FUNDING
Request weight is counted per IP, while order placement is limited per account: on futures that is 500 weight units per 10 seconds and 300 orders a minute. The weight depends on the endpoint: public quotes and order book cost less, private order methods cost more because they load the matching engine. On a breach the exchange returns a rate-limit response, and a correct bot pauses with exponential backoff instead of hammering the endpoint in a loop. The WEEX engine matches around 50,000 operations per second, so the bottleneck is usually the key limit rather than the engine itself.
For a trading bot on futures, fee economics sit on top of the limits. WEEX's base futures taker is 0.08%, with a maker rate of 0.02%. In CIS and other regions where exchanges raised their rates (see the Bybit regional fee update), Bybit and Bitget land at 0.1% taker, which puts WEEX below them. OKX sits at 0.05% base, which is lower than WEEX's base rate. Where WEEX closes that gap is through WXT, the exchange's native token: paying fees with it or holding it on balance grants a discount of up to 70%, pulling the effective taker to around 0.024%. OKX, Bybit and Bitget run their own token discounts as well, but WXT's maximum stays among the deepest. A high-frequency bot pushing dozens of orders a minute feels the base rate directly, so the WXT path matters in practice. The full level grid and the paths to the discount are covered in the WEEX VIP levels article.
THE HONEST RISK
The main risk when working over the API is the bot itself, while access to withdrawals is closed. A logic error, a wrong position sign or a missing stop drains a deposit the same way manual trading on leverage up to 400x does. The API executes exactly what the code sends, so you test a strategy on a small size and on a demo account before going live. Order limits and response checks on the bot's side are real guardrails: on a fast market they decide whether a position stays controlled through a streak.
The second point is the exchange's international status. The full license set is still in the process of being issued, and the user is responsible for declaring income from algorithmic trading. Custody of funds stays verifiable: the 1000 BTC protection fund sits on public wallets, reserves are confirmed by a Merkle scheme 1:1, and funds are held in MPC wallets under Chainalysis monitoring. The Korean ad-tech group FSN is among the platform's investors.
HOW TO START
Open a basic account with an email or phone, and it gives you spot, futures and API access right away without verification. Register with the code termainal: it connects starter promos and fee cashback while your trading terms and API behaviour stay unchanged, and promo amounts depend on the campaign. Create a read-only key in API Management, verify reading balances and history on it, and only then issue a separate key with trade permissions.
Bind the trade key to your server's static IP, put the secret in environment variables and turn on 2FA for the account. Test the strategy on a small size before you connect the full deposit. The step-by-step path with screenshots is in the beginner manual, live promos are on the WEEX promos and cashback page, and the full breakdown of the platform is in the WEEX exchange review.
This material is for information only and is not investment advice. Trading crypto, and especially leveraged futures, carries a high risk of losing capital. Check the availability and legality of the exchange in your jurisdiction and decide for yourself.