# Get account api key permission Source: https://developer.woox.io/api-reference/endpoint/account/credentials GET /v3/account/credentials Get account api key permission **Limit 10 requests per 60 seconds**\ Get api\_key list and its permissions of the account. The response will contain your API keys’ permissions based on the credentials. ```bash theme={null} { "success": true, "data": { "rows": [ { "accountName": "Main", "userId": 12523, "apiKey": "+Pxxxxxxxxxxxxxxxxxxxx==", "permissions": [ "READ", "TRADE", "WITHDRAWAL" ], "allowedIPs": ["123.0.0.1", "124.2.1.1"] // hide field if no ip restriction }, ], "meta": { "total": 46, "recordsPerPage": 1, "currentPage": 1 } }, "timestamp": 1721295317627 } ``` # Get account information Source: https://developer.woox.io/api-reference/endpoint/account/get_account_info GET /v3/account/info Get the account information. **Limit: 10 requests per 60 seconds**\ Get margin configuration and account value information. ```bash theme={null} { "success": true, "data": { "applicationId": "dsa", "account": "dsa", "alias": "dsa", "otpauth": true, "accountMode": "MARGIN", "positionMode": "ONE_WAY", "leverage": 1, "marginRatio": "1", "openMarginRatio": "1", "initialMarginRatio": "1", "maintenanceMarginRatio": "1", "totalCollateral": "1", "freeCollateral": "1", "totalAccountValue": "5", "totalTradingValue": "1", "totalVaultValue": "1", "totalStakingValue": "1", "totalEarnValue": "1", "totalLaunchpadValue": "1", "referrerID": "WOO2023", "accountType": "Main" }, "timestamp": 1673323685109 } ``` # Get referral reward history Source: https://developer.woox.io/api-reference/endpoint/account/get_referral_reward_history GET /v3/account/referral/rewardHistory Get referral information from each user you has referred. **Limit 10 requests per 60 seconds** ```bash theme={null} { "success": true, "data": { "rows": [ { "referralId": 12509, "registerTime": "1643076873.484", "referralCode": "OJEDSSMU", "tradeStatus": "Traded", "earned": [ { "token": "WOO", "amount": "144.78597143" }, { "token": "USDT", "amount": "0" } ], "extraBonus": [ { "token": "WOO", "amount" : "10" } ], "previousCommission": [ { "token": "WOO", "totalAmount": "10.07981438" } ] "email": "staking-005_mas@woo.network", } ... ], "meta": { "total": 46, "recordsPerPage": 1, "currentPage": 1 } }, "timestamp": 1690192103430 } ``` # Symbol config Source: https://developer.woox.io/api-reference/endpoint/account/get_symbol_config GET /v3/account/symbolConfig Get the symbol level configurations. **Limit: 10 requests per 1 second**\ Get the symbol level configurations. ```bash theme={null} { "success": true, "data": { "rows": [ { "symbol": "PERP_BTC_USDT", "marginFactor": "0.00000023", "maxLeverage": 50, "maxPosition": 100000000000 }, { "symbol": "PERP_ETH_USDT", "marginFactor": "0.00000023", "maxLeverage": 50, "maxPosition": 100000000000 }, { "symbol": "PERP_WOO_USDT", "marginFactor": "0.00000023", "maxLeverage": 20, "maxPosition": 100000000000 } ] }, "timestamp": 1721351502594 } ``` # Token config Source: https://developer.woox.io/api-reference/endpoint/account/get_token_config GET /v3/account/tokenConfig Get the token level configurations. **Limit: 10 requests per 1 second**\ Get the token level configurations. ```bash theme={null} { "success": true, "data": { "rows": [ { "token": "BTC", "collateralRatio": "0.85", "marginFactor": "0.00000023", "collateral": true, // if the token is now used as collateral "canCollateral": true, // if the token can be used as collateral "canShort": true, // if the token supports short selling "marginMaxLeverage": 10, "marginMaxPosition": 100000000000 }, { "token": "ETH", "collateralRatio": "0.85", "marginFactor": 0.00000025", "collateral": true, "canCollateral": true, "canShort": true, "marginMaxLeverage": 10, "marginMaxPosition": 100000000000 }, { "token": "WOO", "collateralRatio": "0.6", "marginFactor": "0.00000025", "collateral": false, "canCollateral": false, "canShort": false, "marginMaxLeverage": 5, "marginMaxPosition": 100000000000 } ] }, "timestamp": 1721351502594 } ``` # Get listen key Source: https://developer.woox.io/api-reference/endpoint/account/listen_key POST /v3/account/listenKey get account listen key **Limit 5 requests per 10 seconds** Create a listen key for private streamings which can be accessed at `{base_wss_stream`}?key=``. If a valid listen key already exists, the system will create a new one and immediately expire the old key. Each listen key remains valid for 24 hours. # Get sub accounts Source: https://developer.woox.io/api-reference/endpoint/account/sub_accounts GET /v3/account/subAccounts/all Get account api key permission **Limit 10 requests per 60 seconds**\ Get subaccount list. Permission: Main account only. ```bash theme={null} { "success": true, "data": { "rows": [ { "applicationId": "6b43de5c-0955-4887-9862-d84e4689f9fe", "name": "sub_account_2", "createdTime": "1606897264.994" }, ] }, "timestamp": 1721295317627 } ``` # Get referral summary Source: https://developer.woox.io/api-reference/endpoint/account/summary GET /v3/account/referral/summary Get referral information from each user you has referred **Limit 10 requests per 60 seconds**\ Get referral information from each user you has referred. ```bash theme={null} { "success": true, "data": { "rows": [ { "referralId": 12509, "registerTime": "1643076873.484", "referralCode": "OJEDSSMU", "tradeStatus": "Traded", "earned": [ { "token": "WOO", "amount": "144.78597143" }, { "token": "USDT", "amount": "0" } ], "extraBonus": [ { "token": "WOO", "amount" : "10" } ], "previousCommission": [ { "token": "WOO", "totalAmount": "10.07981438" } ] "email": "staking-005_mas@woo.network", } ... ], "meta": { "total": 46, "recordsPerPage": 1, "currentPage": 1 } }, "timestamp": 1690192103430 } ``` # Set account trading mode Source: https://developer.woox.io/api-reference/endpoint/account/trading_mode POST /v3/account/tradingMode Set account trading mode **Limit: 5 requests per 60 seconds per user**\ Change account margin mode. # Get balances Source: https://developer.woox.io/api-reference/endpoint/assets/get_balances GET /v3/asset/balances Get balances **Limit: 10 requests per 1 seconds**\ Get account balances in trading wallet, vault, staking and earn products. ```bash theme={null} { "success": true, "data": { "holding": [ { "token": "WOO", "holding": "1", "frozen": "0", "staked": "0", "unbonding": "0", "vault": "0", "interest": "0", "earn": "0", "pendingShortQty": "0", "pendingLongQty": "0", "availableBalance": "0", "averageOpenPrice": "0.23432", "markPrice": "0.25177", "pnl24H": "0.0", "fee24H": "0.0", "timestamp": 1673323746259 }, ... ] }, "timestamp": 1673323746259 } ``` # Get transfer history Source: https://developer.woox.io/api-reference/endpoint/assets/get_transfer_history GET /v3/asset/transfer/history Get Transfer History **Limit: 20 requests per 60 seconds**\ Get account token balance change history ```bash theme={null} { "success": true, "data": { "rows": [ { "id":225, "token":"USDT", "amount": "1000000", "status":"COMPLETED", "from": { "applicationId": "046b5c5c-5b44-4d27-9593-ddc32c0a08ae", "accountName": "Main" }, "to": { "applicationId": "082ae5ae-e26a-4fb1-be5b-03e5b4867663", "accountName": "sub001" } "createdTime":"1642660941.534", "updatedTime":"1642660941.950" }, ], "meta": { "total": 46, "recordsPerPage": 1, "currentPage": 1 } }, "timestamp": 1721295317627 } ``` # Get token deposit address Source: https://developer.woox.io/api-reference/endpoint/assets/get_wallet_deposit GET /v3/asset/wallet/deposit Get Token Deposit Address **Limit 10 requests per 60 seconds**\ Get your unique deposit address by token ```bash theme={null} { "success": true, "data": { "address": "0x31d64B3230f8baDD91dE1710A65DF536aF8f7cDa", "extra": "" }, "timestamp": 1721300689532 } ``` # Get wallet history Source: https://developer.woox.io/api-reference/endpoint/assets/get_wallet_history GET /v3/asset/wallet/history Get Wallet History **Limit: 10 requests per 60 seconds**\ Get your unique deposit address by token ```bash theme={null} { "success": true, "data": { "rows": [ { "createdTime": "1579399877.041", // Unix epoch time in seconds "updatedTime": "1579399877.041", // Unix epoch time in seconds "id": "202029292829292", "externalId": "202029292829292", "applicationId": null, "token": "ETH", "targetAddress": "0x31d64B3230f8baDD91dE1710A65DF536aF8f7cDa", "sourceAddress": "0x70fd25717f769c7f9a46b319f0f9103c0d887af0", "confirmingThreshold":12, "confirmedNumber":12, "extra": "", "type": "BALANCE", "tokenSide": "DEPOSIT", "amount": "1000", "txId": "0x8a74c517bc104c8ebad0c3c3f64b1f302ed5f8bca598ae4459c63419038106b6", "feeToken": null, "feeAmount": null, "status": "CONFIRMING" } ... ], "meta": { "total": 46, "recordsPerPage": 1, "currentPage": 1 } }, "timestamp": 1690192103430 } ``` # Get staking yield history Source: https://developer.woox.io/api-reference/endpoint/assets/get_yield_history GET /v3/asset/staking/yieldHistory Get Staking Yield History **Limit 10 requests per 60 seconds**\ Get your unique deposit address by token ```bash theme={null} { "success": true, "data": { "rows": [ { "id": 53173, "token": "WOO", "stakingSize": 30100.00000000, "annualReward": "0.0024294", "yieldAmount": "0.20034259", "yieldTime": "1673481600.000" } ], "meta": { "total": 46, "recordsPerPage": 1, "currentPage": 1 } }, "timestamp": 1721295317627 } ``` # Get token history Source: https://developer.woox.io/api-reference/endpoint/assets/token_history GET /v3/asset/token/history get token history **Limit 10 requests per 60 seconds**\ Get account token balance change history # Transfer assets Source: https://developer.woox.io/api-reference/endpoint/assets/transfer POST /v3/asset/transfer transfer assets **Limit: 20 requests per 60 seconds**\ Initiate a token withdrawal request # Token withdraw Source: https://developer.woox.io/api-reference/endpoint/assets/wallet_withdraw POST /v3/asset/wallet/withdraw withdraw assets **Limit: 10 requests per 60 seconds**\ Initiate a token withdrawal request ```bash theme={null} { "success": true "data": { "withdrawId": "2435645673245646785687" }, "timestamp": 1721351502594 } ``` # Get default margin mode Source: https://developer.woox.io/api-reference/endpoint/futures/defaultMarginMode GET /v3/futures/defaultMarginMode get account level default margin mode **Limit 10 requests per 60 seconds** # Get funding fee history Source: https://developer.woox.io/api-reference/endpoint/futures/get_fundingFee_history GET /v3/futures/fundingFee/history get funding fee history **Limit: 20 requests per 60 seconds per user**\ Get funding fee history ```bash theme={null} { "success": true, "data": { "meta": { "total": 670, "recordsPerPage": 25, "currentPage": 1 }, "rows": [ { "id": 1286360, "symbol": "PERP_BTC_USDT", "fundingRate": -0.00001445, "markPrice": "26930.60000000", "fundingFee": "9.56021744", "fundingIntervalHours": 8, "paymentType": "Pay", "status": "COMPLETED", "createdTime": 1696060873259, "updatedTime": 1696060873286 }, { "id": 1286115, "symbol": "PERP_BTC_USDT", "fundingRate": 0.00006526, "markPrice": "26911.00000000", "fundingFee": "43.14503239", "fundingIntervalHours": 8, "paymentType": "Receive", "status": "COMPLETED", "createdTime": 1696032073609, "updatedTime": 1696032073643 }, ... ] }, "timestamp": 1721351502594 } ``` # Get futures leverage Source: https://developer.woox.io/api-reference/endpoint/futures/get_leverage GET /v3/futures/leverage get account leverage **Limit 10 requests per 60 seconds** ```bash theme={null} // hedge mode { "success": true, "data": { "symbol": "PERP_BTC_USDT", "marginMode": "CROSS", "positionMode": "HEDGE_MODE" "details": [ { "positionSide": "LONG", "leverage": 10 }, { "positionSide": "SHORT", "leverage": 15 } ] }, "timestamp": 1711433755393 } // one way { "success": true, "data": { "symbol": "PERP_BTC_USDT", "marginMode": "CROSS", "positionMode": "ONE_WAY" "details": [ { "positionSide": "BOTH", "leverage": 10 } ] }, "timestamp": 1711433755393 } ``` # Get positions Source: https://developer.woox.io/api-reference/endpoint/futures/get_positions GET /v3/futures/positions get positions **Limit: 30 requests per 10 seconds per user** ```bash theme={null} { "success": true, "data": { "positions": [ { "symbol": "PERP_BTC_USDT", "holding": "1.0234", "positionSide": "BOTH", "pendingLongQty": "0.0", "pendingShortQty": "0.0", "settlePrice": "27903.2", "averageOpenPrice": "27903.2", "pnl24H": "0.0", "fee24H": "0.0", "markPrice": "27903.2", "estLiqPrice": "0.0", "adlQuantile": 1, "timestamp": 1696663260695 }, ... ] }, "timestamp": 1696663264324 } ``` # Set position mode Source: https://developer.woox.io/api-reference/endpoint/futures/position_mode PUT /v3/futures/positionMode Set position mode **Limit: 5 requests per 60 seconds per user**\ Set position mode for the account. # Set futures leverage Source: https://developer.woox.io/api-reference/endpoint/futures/set_leverage PUT /v3/futures/leverage set account leverage **Limit 10 requests per 60 seconds**\ set futures leverage # Get predicted funding rate Source: https://developer.woox.io/api-reference/endpoint/public_data/fundingRate GET /v3/public/fundingRate Get predicted funding rate and the latest funding rate. **Limit: 10 requests per 1 second per IP address** # Get funding rate history for one market Source: https://developer.woox.io/api-reference/endpoint/public_data/fundingRateHistory GET /v3/public/fundingRateHistory Get funding rate history for one market. **Limit: 10 requests per 1 second per IP address** # Get futures info Source: https://developer.woox.io/api-reference/endpoint/public_data/futures GET /v3/public/futures Get basic futures information for all the markets. **Limit: 10 requests per 1 second per IP address** # Get instruments Source: https://developer.woox.io/api-reference/endpoint/public_data/instruments GET /v3/public/instruments Retrieve a list of Spot and USDT perpetual instruments. **Limit: 10 requests per 1 second per IP address** # Get insurance fund Source: https://developer.woox.io/api-reference/endpoint/public_data/insuranceFund GET /v3/public/insuranceFund Get the insurance fund balance by perp contract. **Limit: 10 requests per 1 second per IP address** # Kline Source: https://developer.woox.io/api-reference/endpoint/public_data/kline GET /v3/public/kline Get the latest klines of the trading instrument. **Limit: 10 requests per 1 second** # Kline history Source: https://developer.woox.io/api-reference/endpoint/public_data/klineHistory GET /v3/public/klineHistory Get the historical klines of the trading instrument. **Limit: 10 requests per 1 second per IP address** # Market trades Source: https://developer.woox.io/api-reference/endpoint/public_data/marketTrades GET /v3/public/marketTrades Get the latest market trades. In the response, a source of 1 means these are internal trades on WOO X and a source of 0 means they are external trades from aggregated sources. **Limit: 10 requests per 1 second per IP address** # Market trades history Source: https://developer.woox.io/api-reference/endpoint/public_data/marketTradesHistory GET /v3/public/marketTradesHistory Get historical market trades data. In the response, a source of 1 means these are internal trades on WOO X and a source of 0 means they are external trades from aggregated sources. **Limit: 10 requests per 1 second per IP address** # Orderbook snapshot Source: https://developer.woox.io/api-reference/endpoint/public_data/orderbook GET /v3/public/orderbook Get the snapshot of the symbol order book. Price of asks/bids are in descending order. **Limit: 10 requests per 1 second** # Get system maintenance status Source: https://developer.woox.io/api-reference/endpoint/public_data/systemInfo GET /v3/public/systemInfo Get current system maintenance status. A status value of 0 means the system is functioning properly, a status value of 1 means the trading services are under maintenance and a status value of 2 means the system is under maintenance. **Limit: 10 requests per 1 second per IP address** # Available token Source: https://developer.woox.io/api-reference/endpoint/public_data/token GET /v3/public/token Get the available tokens that WOO X supports. **Limit: 10 requests per 1 second per IP address** # Get token info Source: https://developer.woox.io/api-reference/endpoint/public_data/tokenInfo GET /v3/public/tokenInfo Retrieve spot token information. **Limit: 10 requests per 1 second per IP address** # Token network Source: https://developer.woox.io/api-reference/endpoint/public_data/tokenNetwork GET /v3/public/tokenNetwork Get the available networks for each token as well as the deposit/withdrawal information. **Limit: 10 requests per 1 second per IP address** # Get interest history Source: https://developer.woox.io/api-reference/endpoint/spot_margin/get_interest_history GET /v3/spotMargin/interestHistory get spot margin interest history **Limit 10 requests per 60 seconds** ```bash theme={null} { "success": true, "data": { "meta": { "total": 1865, "recordsPerPage": 25, "currentPage": 1 }, "rows": [ { "id": 1649844, "token": "USDT", "side": "LOAN", "status": "SUCCEED", "quantity": "14896.05440493", "userId": 10988, "applicationId": "6400b4f6-d354-4e7f-844f-6153b666e2b6", "interest": "-0.14896054", "hourlyRate": "0.00001", "annualRate": "0.0876", "createdTime": 1696637410973, "updatedTime": 1696637410973, "loanAmount": "14896.05440493" }, { "id": 1649752, "token": "USDT", "side": "AUTO_REPAY", "status": "SUCCEED", "quantity": null, "userId": 10988, "applicationId": "6400b4f6-d354-4e7f-844f-6153b666e2b6", "interest": "2.02039756", "hourlyRate": null, "annualRate": null, "createdTime": 1696637405108, "updatedTime": 1696637405124, "loanAmount": null } ] }, "timestamp": 1721351502594 } ``` # Get margin interest rates Source: https://developer.woox.io/api-reference/endpoint/spot_margin/get_interest_rate GET /v3/spotMargin/interestRate Get spot margin interest rate **Limit 10 requests per 60 seconds** ```bash theme={null} { "success": true, "data": { "rows": [ { "token": "MATIC", "currentHourlyBaseRate": "0.000001", "estHourlyBaseRate": "0.000001", "currentAnnualBaseRate": "0.00876", "estAnnualBaseRate": "0.00876", "estTime": 1632394800000 }, { "token": "USDT", "currentHourlyBaseRate": "0.000008", "estHourlyBaseRate": "0.000008", "currentAnnualBaseRate": "7008", "estAnnualBaseRate": "0.07008%", "estTime": 1632394800000 }, { "token": "WOO", "currentHourlyBaseRate": "0.00001", "estHourlyBaseRate": "0.00001", "currentAnnualBaseRate": "0.0876", "estAnnualBaseRate": "0.0876", "estTime": 1632394800000 }, ... ] }, "timestamp": 1721351502594 } ``` # Get available margin Source: https://developer.woox.io/api-reference/endpoint/spot_margin/get_max_margin GET /v3/spotMargin/maxMargin Get max available margin for a given spot instrument. **Limit 10 requests per 60 seconds**\ Get max available margin for a given spot instrument. Only supported if the account is in MARGIN mode. ```bash theme={null} { "success": true, "data": { "symbol": "SPOT_ETH_USDT", "availableBaseQuantity": "24.52401647", // max available quantity of the base token to sell into the quote token "availableQuoteQuantity": "15436.45960897" // max available quantity of the quote token to buy into the base token (i.e. buying power) }, "timestamp": 1696657422118 } ``` # Repay interest Source: https://developer.woox.io/api-reference/endpoint/spot_margin/interest_repay POST /v3/spotMargin/interestRepay Repay your margin interest. **Limit 10 requests per 60 seconds**\ Repay your margin interest. # Set leverage Source: https://developer.woox.io/api-reference/endpoint/spot_margin/set_leverage POST /v3/spotMargin/leverage set leverage **Limit: 5 requests per 60 seconds per user** # Cancel algo order Source: https://developer.woox.io/api-reference/endpoint/trading/cancel_algo_order DELETE /v3/trade/algoOrder cancel algo order **Limit: 10 requests per 1 second** # Cancel multiple algo orders Source: https://developer.woox.io/api-reference/endpoint/trading/cancel_algo_orders DELETE /v3/trade/algoOrders cancel multiple algo orders **Limit: 10 requests per 1 second**\ Cancel algo orders by symbol or across all symbols. # Cancel all after Source: https://developer.woox.io/api-reference/endpoint/trading/cancel_all_after POST /v3/trade/cancelAllAfter Cancel all after **Limit: 10 requests per 1 second**\ Provide a dead man switch to ensure user orders are canceled in case of an outage. If called repeatedly, the new timeout offset will replace the existing one if already set.When count down hits 0, all of the user’s ordinary and algo orders will be canceled. This API is only available to VIP users. Please reach out to customer service for more information. # Cancel multiple orders Source: https://developer.woox.io/api-reference/endpoint/trading/cancel_all_order DELETE /v3/trade/orders Cancel multiple orders **Limit: 10 requests per 1 second** # Cancel order Source: https://developer.woox.io/api-reference/endpoint/trading/cancel_order DELETE /v3/trade/order cancel order **Limit: 10 requests per 1 second** # Cancel all orders by symbol Source: https://developer.woox.io/api-reference/endpoint/trading/cancel_orders_by_symbol DELETE /v3/trade/allOrders Cancel all orders by symbol **Limit: 10 requests per 1 second**\ Cancel both ordinary and algo orders by symbol. # Edit algo order Source: https://developer.woox.io/api-reference/endpoint/trading/edit_algo_order PUT /v3/trade/algoOrder edit algo order **Limit: 5 requests per 1 second**\ Edit algo order by algo order id. # Edit order Source: https://developer.woox.io/api-reference/endpoint/trading/edit_order PUT /v3/trade/order edit order **Limit: 5 requests per 1 second**\ Edit order price or quantity by orderId or clientOrderId. # Get algo order Source: https://developer.woox.io/api-reference/endpoint/trading/get_algo_order GET /v3/trade/algoOrder get algo order **Limit: 10 requests per 1 second**\ Get algo order details by algoOrderId or clientAlgoOrderId. ```bash theme={null} { "success": true, "data": { "algoOrderId": 792420, "clientAlgoOrderId": 0, "rootAlgoOrderId": 792420, "parentAlgoOrderId": 0, "symbol": "SPOT_WOO_USDT", "orderTag": "default", "algoType": "TRAILING_STOP", "side": "SELL", "positionSide": "BOTH", "quantity": 1, "isTriggered": false, "triggerStatus": "USELESS", "type": "MARKET", "rootAlgoStatus": "NEW", "algoStatus": "NEW", "triggerPriceType": "MARKET_PRICE", "triggerTime": "0", "totalExecutedQuantity": "0", "averageExecutedPrice": "0", "totalFee": "0", "feeAsset": "", "totalRebate": "0", "rebateCurrency": "USDT", "reduceOnly": false, "createdTime": 1696595230885, "updatedTime": 1696595230885, "isActivated": false, "callbackRate": "0.03", "activatedPrice": "0.21" }, "timestamp": 1676283560233 } ``` # Get algo orders Source: https://developer.woox.io/api-reference/endpoint/trading/get_algo_orders GET /v3/trade/algoOrders get algo orders **Limit: 10 requests per 1 second**\ Get orders by customizable conditions. For filtering by status, one can reference special bundled statuses below for ease of access of open (i.e. INCOMPLETE) orders or COMPLETED orders. INCOMPLETE = NEW + PARTIAL\_FILLED COMPLETED = CANCELLED + FILLED + REJECTED ```bash theme={null} { { "success": true, "data": { "meta": { "total": 2, "recordsPerPage": 25, "currentPage": 1 }, "rows": [ { "algoOrderId": 792419, "clientAlgoOrderId": 0, "rootAlgoOrderId": 792419, "parentAlgoOrderId": 0, "symbol": "SPOT_WOO_USDT", "algoOrderTag": "default", "algoType": "TRAILING_STOP", "side": "SELL", "positionSide": "BOTH", "quantity": 1, "isTriggered": false, "triggerStatus": "USELESS", "type": "MARKET", "rootAlgoStatus": "NEW", "algoStatus": "NEW", "triggerPriceType": "MARKET_PRICE", "triggerTime": "0", "totalExecutedQuantity": "0", "averageExecutedPrice": "0", "totalFee": "0", "feeAsset": "", "totalRebate": 0, "rebateCurrency": "USDT", "reduceOnly": false, "createdTime": 1696595221136, "updatedTime": 1696595221136, "isActivated": false, "callbackRate": "0.03", "activatedPrice": "0.21" }, { "algoOrderId": 792407, "clientAlgoOrderId": 0, "rootAlgoOrderId": 792407, "parentAlgoOrderId": 0, "symbol": "SPOT_WOO_USDT", "algoOrderTag": "default", "algoType": "BRACKET", "side": "BUY", "quantity": "100", "isTriggered": false, "triggerStatus": "SUCCESS", "type": "LIMIT", "positionSide": "BOTH", "status": "NEW", "rootAlgoStatus": "NEW", "algoStatus": "NEW", "triggerPriceType": "MARKET_PRICE", "price": "0.15", "triggerTime": "0", "totalExecutedQuantity": "0", "averageExecutedPrice": "0", "totalFee": "0", "feeAsset": "WOO", "totalRebate": 0, "rebateCurrency": "USDT", "reduceOnly": false, "createdTime": 1696589756133, "updatedTime": 1696589756247, "childOrders": [ { "algoOrderId": 792408, "clientAlgoOrderId": 0, "rootAlgoOrderId": 792407, "parentAlgoOrderId": 792407, "symbol": "SPOT_WOO_USDT", "algoOrderTag": "default", "algoType": "TP_SL", "side": "SELL", "positionSide": "BOTH", "quantity": 0, "isTriggered": false, "triggerStatus": "USELESS", "rootAlgoStatus": "NEW", "algoStatus": "NEW", "triggerPriceType": "MARKET_PRICE", "triggerTime": "0", "totalExecutedQuantity": "0", "visibleQuantity": "0", "averageExecutedPrice": "0", "totalFee": "0", "feeAsset": "", "totalRebate": "0", "rebateCurrency": "USDT", "reduceOnly": false, "createdTime": 1696589756128, "updatedTime": 1696589756128, "isActivated": false, "childOrders": [ { "algoOrderId": 792409, "clientAlgoOrderId": 0, "rootAlgoOrderId": 792407, "parentAlgoOrderId": 792408, "symbol": "SPOT_WOO_USDT", "algoOrderTag": "default", "algoType": "TAKE_PROFIT", "side": "SELL", "positionSide": "BOTH", "quantity": "0", "isTriggered": false, "triggerPrice": "0.3", "triggerStatus": "USELESS", "type": "MARKET", "rootAlgoStatus": "NEW", "algoStatus": "NEW", "triggerPriceType": "MARKET_PRICE", "triggerTime": "0", "totalExecutedQuantity": "0", "visibleQuantity": "0", "averageExecutedPrice": "0", "totalFee": "0", "feeAsset": "", "totalRebate": "0", "rebateCurrency": "USDT", "reduceOnly": true, "createdTime": 1696589756118, "updatedTime": 1696589756118, "isActivated": false }, { "algoOrderId": 792410, "clientAlgoOrderId": 0, "rootAlgoOrderId": 792407, "parentAlgoOrderId": 792408, "symbol": "SPOT_WOO_USDT", "algoOrderTag": "default", "algoType": "STOP_LOSS", "side": "SELL", "positionSide": "BOTH", "quantity": 0, "isTriggered": false, "triggerPrice": "0.1", "triggerStatus": "USELESS", "type": "MARKET", "rootAlgoStatus": "NEW", "algoStatus": "NEW", "triggerPriceType": "MARKET_PRICE", "triggerTime": "0", "totalExecutedQuantity": "0", "visibleQuantity": "0", "averageExecutedPrice": "0", "totalFee": "0", "feeAsset": "", "totalRebate": "0", "rebateCurrency": "USDT", "reduceOnly": true, "createdTime": 1696589756123, "updatedTime": 1696589756123, "isActivated": false } ] } ] }, ... ] }, "timestamp": 1696598461952 } } ``` # Get order Source: https://developer.woox.io/api-reference/endpoint/trading/get_order GET /v3/trade/order get order **Limit: 5 requests per 1 symbol per 1 second** ```bash theme={null} # if withRealizedPnl is True { "success": true, "data": { "symbol": "PERP_BTC_USDT", "status": "FILLED", "side": "SELL", "positionSide": "BOTH", "createdTime": 1578565539808, "orderId": 13, "orderTag": "default", "price": "123", "type": "LIMIT", "quantity": "0.1", "amount": "null", "visible": "0.1", "executed": "0.1", "totalFee": "0.00123", "feeAsset": "USDT", "totalRebate": 0, "rebateCurrency": "USDT", "clientOrderId": 0, "reduceOnly": false, "realizedPnl": "100", "averageExecutedPrice": "123", }, "timestamp": 1721351502594 } # if withRealizedPnl is False { "success": true, "data": { "symbol": "PERP_BTC_USDT", "status": "FILLED", "side": "SELL", "positionSide": "BOTH", "createdTime": 1578565539808, "orderId": 13, "orderTag": "default", "price": "123", "type": "LIMIT", "quantity": "0.1", "amount": "null", "visible": "0.1", "executed": "0.1", "totalFee": "0.00123", "feeAsset": "USDT", "totalRebate": 0, "rebateCurrency": "USDT", "clientOrderId": 0, "reduceOnly": false, "averageExecutedPrice": "123", }, "timestamp": 1721351502594 } ``` # Get orders Source: https://developer.woox.io/api-reference/endpoint/trading/get_orders GET /v3/trade/orders get orders **Limit: 10 requests per 1 second** Get orders by customizable conditions. For filtering by status, one can reference special bundled statuses below for ease of access of open (i.e. INCOMPLETE) orders or COMPLETED orders. 1. INCOMPLETE = NEW + PARTIAL\_FILLED 2. COMPLETED = CANCELLED + FILLED + REJECTED ```bash theme={null} { "success": true, "data": { "meta": { "total": 31, "recordsPerPage": 25, "currentPage": 1 }, "rows": [ { "symbol": "PERP_BTC_USDT", "status": "FILLED", "side": "SELL", "positionSide": "BOTH", "createdTime": 1578565539808, "orderId": 135, "orderTag": "default", "price": "123", "type": "LIMIT", "quantity": "0.1", "amount": "null", "visible": "0.1", "executed": "0.1", "totalFee": "0.00123", "feeAsset": "USDT", "totalRebate": 0, "rebateCurrency": "USDT", "clientOrderId": 0, "reduceOnly": false, "realizedPnl": "2", "averageExecutedPrice": "123", }, ... ] }, "timestamp": 1721351502594 } ``` # Get trading fee Source: https://developer.woox.io/api-reference/endpoint/trading/get_tradingFee GET /v3/trade/tradingFee Get Trading Fee **Limit: 2 requests per 1 second** ```bash theme={null} { "success": true, "data": { "symbol": "SPOT_ETH_USDT", "takerFee": "0", "makerFee": "0" }, "timestamp": 1721351502594 } ``` # Get transaction by trade id (last 3 months) Source: https://developer.woox.io/api-reference/endpoint/trading/get_transaction GET /v3/trade/transaction get transaction by trade id (last 3 months) **Limit: 10 requests per 1 second**\ Get specific transaction detail by tradeId that’s executed in the last 3 months. # Get transaction history (in the past 2 years) Source: https://developer.woox.io/api-reference/endpoint/trading/get_transactions GET /v3/trade/transactionHistory Get transaction history (in the past 2 years) **Limit: 2 requests per 1 second**\ Get all the transaction details for a specific symbol in the past 2 years. # Place algo order Source: https://developer.woox.io/api-reference/endpoint/trading/post_algo_order POST /v3/trade/algoOrder post algo order **Limit: 2 requests per 1 second per symbol**\ Supported algo orders include STOP, OCO, TRAILING\_STOP, POSITIONAL\_TP\_SL, TP\_SL, BRACKET and STOP\_BRACKET orders. clientAlgoOrderId behavior: needs to be unique among open algo orders. Orders with the same clientAlgoOrderId can be accepted only when the previous one is completed, otherwise the order would be rejected. Note that it’s treated separately from the clientOrderId for ordinary orders. visibleQuantity behavior: it sets the maximum quantity to be shown on orderbook. By default, it is equal to quantity. If it’s set to 0, the order would be hidden from the orderbook. Open algo order limit: * a maximum of 100 open algo orders is allowed on a per instrument basis * a maximum of 10 open TP\_SL orders are permitted per instrument - this is inclusive of the TP\_SL orders that are still attached to BRACKET or STOP\_BRACKET order * a maximum of 1 open POSITIONAL\_TP\_SL is allowed per instrument per side - when a second POSITIONAL\_TP\_SL order gets activated that’s associated with a BRACKET or a STOP\_BRACKET order, this new POSITIONAL\_TP\_SL order will replace the previous POSITIONAL\_TP\_SL order ```bash theme={null} // STOP, OCO, TRAILING_STOP { "success": true, "data": { "rows": [ { "algoType": "string", "clientAlgoOrderId": 0, "algoOrderId": 0, "quantity": "0" } ] }, "timestamp": 1676283560233 } // POSITIONAL_TP_SL, TP_SL { "success": true, "data": { "rows": [ { "algoOrderId": 432132, "clientAlgoOrderId": 0, "algoType": "TAKE_PROFIT", "quantity": "0" }, { "algoOrderId": 432133, "clientAlgoOrderId": 0, "algoType": "STOP_LOSS", "quantity": "0" }, { "algoOrderId": 432131, "clientAlgoOrderId": 0, "algoType": "string", "quantity": "0" } ] }, "timestamp": 1676283560233 } // BRACKET, STOP_BRACKET { "success": true, "data": { "rows": [ { "algoOrderId": 432132, "clientAlgoOrderId": 0, "algoType": "TAKE_PROFIT", "quantity": "0" }, { "algoOrderId": 432133, "clientAlgoOrderId": 0, "algoType": "STOP_LOSS", "quantity": "0" }, { "orderId": 432131, "clientAlgoOrderId": 0, "algoType": "POSITIONAL_TP_SL", "quantity": "0" }, { "algoOrderId": 432130, "clientAlgoOrderId": 0, "algoType": "BRACKET", "quantity": "10" } ] }, "timestamp": 1676283560233 } ``` # Place order Source: https://developer.woox.io/api-reference/endpoint/trading/post_order POST /v3/trade/order post order **Limit: 5 requests per 1 symbol per 1 second** # BBO Source: https://developer.woox.io/api-reference/endpoint/websocket/BBO ### Topic: bbo@`{symbol}` Push interval: 10ms\ Subscribe to the BBO data. ```bash Subscribed messages theme={null} { "id": ..... "cmd": "SUBSCRIBE", "params": ["bbo@SPOT_BTC_USDT"] } ``` ```bash theme={null} { "topic": "bbo@SPOT_BTC_USDT", "ts": 1618820361552, "data": { "s": "SPOT_BTC_USDT", // symbol "ap": "42598.2", // best ask price "aq": "1.05", // best ask quantity "bp": "42598.1", // best bid price "bq": "2.01" // best bid quantity "ts": 1618820361540 // bbo generation time in engine } } ``` # BBO (RPI) Source: https://developer.woox.io/api-reference/endpoint/websocket/BBO_rpi ### Topic: bborpi@`{symbol}` Push interval: 10ms\ Subscribe to the BBO of the book with both non-RPI and RPI orders. ```bash Subscribed messages theme={null} { "id": ..... "cmd": "SUBSCRIBE", "params": ["bborpi@SPOT_BTC_USDT"] } ``` ```bash theme={null} { "topic": "bborpi@SPOT_BTC_USDT", "ts": 1618820361552, "data": { "s": "SPOT_BTC_USDT", // symbol "ap": "42598.2", // best ask price "aq": "1.05", // best ask quantity "bp": "42598.1", // best bid price "bq": "2.01" // best bid quantity "ts": 1618820361540 // bbo generation time in engine } } ``` # Estimated funding rate Source: https://developer.woox.io/api-reference/endpoint/websocket/FUNDING_RATE ### Topic: estfundingrate@`{symbol}` Push interval: 1 min\ Subscribe to estimated funding rate of the symbol. ```bash Subscribed messages theme={null} { "id": ..... "cmd": "SUBSCRIBE", "params": ["estfundingrate@PERP_BTC_USDT"] } ``` ```bash theme={null} { "topic": "estfundingrate@PERP_BTC_USDT", "ts": 1618820361552, "data": { "s": "PERP_BTC_USDT", // symbol "r": "1.27988", // funding rate "ft": 1618820360000 // next funding time "ts": 1618820200000 // system timestamp } } ``` # Index price Source: https://developer.woox.io/api-reference/endpoint/websocket/INDEX_PRICE ### Topic: indexprice@`{symbol}` Push interval: 1s\ Subscribe to the index price of the symbol. ```bash Subscribed messages theme={null} { "id": ..... "cmd": "SUBSCRIBE", "params": ["indexprice@SPOT_ETH_USDT"] } ``` ```bash theme={null} { "topic": "indexprice@SPOT_ETH_USDT", "ts": 1618820361552, "data": { "s": "SPOT_ETH_USDT", // symbol "px": "3987.1", // index price "ts": 1618820361552 // timestamp at which the index price was calculated } } ``` # Kline Source: https://developer.woox.io/api-reference/endpoint/websocket/KLINE ### Topic: kline@`{symbol}`@`{time}` Push interval: Push every second if a new trade occurs in that second. Otherwise, push only when a new trade occurs within the same candle. A final push is sent when the candle closes, even if no trades occurred during the candle.\ `{time}`: 1m/3m/5m/15m/30m/1h/2h/4h/6h/12h/1d/3d/1w/1M\ Subscribe to the latest klines (OHLC) updates of the subscribed symbol. ```bash Subscribed messages theme={null} { "id": ..... "cmd": "SUBSCRIBE", "params": ["kline@SPOT_BTC_USDT@1m"] } ``` ```bash theme={null} { "topic": "kline@SPOT_BTC_USDT@1m", "ts": 1618822432146, "data":{ "s": "SPOT_BTC_USDT", // symbol "t": "1m", // kline type "o": "56948.97", // open "c": "56891.76", // close "h": "56948.97", // high "l": "56889.06", // low "v": "44.00947568", // volume in base token "a": "2504584.9", // amount in USDT "st": 1618822380000, // kline start timestamp "et": 1618822440000, // kline end timestamp "ts": 1614152260000 // kline generation time "tts": 1614152250000 // last trade time } } ``` # List subscription Source: https://developer.woox.io/api-reference/endpoint/websocket/List_subscription Retrieve a list of all topics currently subscribed to on the connection. ```bash Subscribed messages theme={null} { "id": ..... "cmd": "LIST_SUBSCRIPTION" } ``` ```json Response theme={null} { "id": "{req_id}", "cmd": "LIST_SUBSCRIPTION", "success": true, "time": {timestamp}, "data": ["topic1", "topic2"] } ``` # Mark price Source: https://developer.woox.io/api-reference/endpoint/websocket/MARKET_PRICE ### Topic: markprice@`{symbol}` Push interval: 1s\ Subscribe to the mark price of the symbol. ```bash Subscribed messages theme={null} { "id": ..... "cmd": "SUBSCRIBE", "params": ["markprice@PERP_ETH_USDT"] } ``` ```bash theme={null} { "topic": "markprice@PERP_ETH_USDT", "ts": 1618820361552, "data": { "s": "PERP_ETH_USDT", // symbol "px": "3987.2", // mark price "ts": 1618820361552 // timestamp at which the mark price was calculated } } ``` # Open interest Source: https://developer.woox.io/api-reference/endpoint/websocket/OPEN_INTEREST ### Topic: openinterest@`{symbol}` Push interval: push every 1 second if open interest change and 10 seconds force update even if no change.\ Subscribe to open interest. ```bash Subscribed messages theme={null} { "id": ..... "cmd": "SUBSCRIBE", "params": ["openinterest@PERP_BTC_USDT"] } ``` ```bash theme={null} { "topic": "openinterest@PERP_BTC_USDT", "ts": 1618820361552, "data": { "s": "PERP_BTC_USDT", // symbol "oi": "936.37", // open interest "ts": 1618820200000 // time of last update } } ``` # Orderbook Source: https://developer.woox.io/api-reference/endpoint/websocket/ORDERBOOK10 ### Topic: orderbook10@`{symbol}` Push interval: 200ms\ Subscribe to orderbook snapshot with 10 level. ```bash Subscribed messages theme={null} { "id": ..... "cmd": "SUBSCRIBE", "params": ["orderbook10@PERP_SOL_USDT"] } ``` ```bash theme={null} { "topic": "orderbook10@PERP_SOL_USDT", "ts": 1762308368653, "data": { "ts": 1762308368647, "bids": [ [ "154.36", "731.000" ], [ "154.35", "891.000" ], [ "154.34", "824.000" ], [ "154.33", "937.000" ], [ "154.32", "1246.000" ], [ "154.31", "1285.000" ], [ "154.30", "1819.000" ], [ "154.29", "1869.000" ], [ "154.28", "1291.000" ], [ "154.27", "1786.000" ] ], "asks": [ [ "154.44", "230.000" ], [ "154.45", "198.000" ], [ "154.46", "1947.000" ], [ "154.47", "12197.000" ], [ "154.48", "271.000" ], [ "154.49", "363.000" ], [ "154.50", "474.000" ], [ "154.51", "708.000" ], [ "154.52", "1108.000" ], [ "154.53", "1317.000" ] ], "s": "PERP_SOL_USDT" } } ``` # Orderbook update Source: https://developer.woox.io/api-reference/endpoint/websocket/Orderbook_update ### Topic: orderbookupdate@`{symbol}`@`{depth}` **Subscribe to the delta updates of the order book without RPI orders.** 1. With depth level of 50, the incremental changes pushed every 50ms 2. With depth level of 200, the incremental changes pushed every 100ms 3. With depth level of 500, the incremental changes pushed every 200ms ### To keep a local copy of the order book, please follow the steps below: 1. Open a market data stream and subscribe to orderbookupdate@`{symbol}`@`{depth}` 2. Buffer the updates you receive from the stream 3. Get an order book snapshot from [https://api.woox.io/v3/public/orderbook?symbol=\{symbol}\&maxLevel=\{depth}](https://api.woox.io/v3/public/orderbook?symbol=\{symbol}\&maxLevel=\{depth}). 4. Start processing any updates where prevTs = timestamp in the snapshot 5. Check prevTs of each newly processed update is the same as the ts of the previous update 6. If you receive a price level with 0 size, delete that price level 7. If you receive a price level that does not exist, insert that price level and size 8. If you receive a price level that already exists, update that price level with the new size ```bash Subscribed messages theme={null} { "id": ..... "cmd": "SUBSCRIBE", "params": ["orderbookupdate@SPOT_BTC_USDT@50"] } ``` ```bash theme={null} { "topic": "orderbookupdate@SPOT_BTC_USDT@50", "ts": 1618826337580, // when ws sends the data "data": { "s": "SPOT_BTC_USDT", // symbol "prevTs":1618826337380, // orderbook generation system time of the previously sent message "asks": [ // delta updates on the ask side [ "56749.15", "3.92864" ], [ "56749.8", "0" ], ... ], "bids": [ // delta updates on the bid side [ "56745.2", "1.03895025" ], [ "56744.6", "1.0807" ], ... ], "ts": 1618826337570 // orderbook generation time } } ``` # Orderbook update (RPI) Source: https://developer.woox.io/api-reference/endpoint/websocket/Orderbook_update_rpi ### Topic: orderbookupdaterpi@`{symbol}`@`{depth}` **Subscribe to the delta updates of the order book with both non-RPI and RPI orders.** 1. With depth level of 50, the incremental changes pushed every 50ms 2. With depth level of 200, the incremental changes pushed every 100ms 3. With depth level of 500, the incremental changes pushed every 200ms ### To keep a local copy of the order book, please follow the steps below: When using both orderbook snapshot and orderbookupdate streams, ensure both include RPI or both exclude it. Mixing them may result in inconsistent or incorrect order book states. 1. Open a market data stream and subscribe to orderbookupdaterpi@`{symbol}`@`{depth}` 2. Buffer the updates you receive from the stream 3. Get an order book snapshot from [https://api.woo.org/v3/public/orderbook?symbol=PERP\_BTC\_USDT\&maxLevel=\{depth}\&rpi=true](https://api.woo.org/v3/public/orderbook?symbol=PERP_BTC_USDT\&maxLevel=\{depth}\&rpi=true). 4. Start processing any updates where prevTs = timestamp in the snapshot 5. Check prevTs of each newly processed update is the same as the ts of the previous update 6. If you receive a price level with 0 size, delete that price level 7. If you receive a price level that does not exist, insert that price level and size 8. If you receive a price level that already exists, update that price level with the new size ```bash Subscribed messages theme={null} { "id": ..... "cmd": "SUBSCRIBE", "params": ["orderbookupdaterpi@SPOT_BTC_USDT@50"] } ``` ```bash theme={null} { "topic": "orderbookupdaterpi@SPOT_BTC_USDT@50", "ts": 1618826337580, // when ws sends the data "data": { "s": "SPOT_BTC_USDT", // symbol "prevTs":1618826337380, // orderbook generation system time of the previously sent message "asks": [ // delta updates on the ask side [ "56749.15", "3.92864" ], [ "56749.8", "0" ], ... ], "bids": [ // delta updates on the bid side [ "56745.2", "1.03895025" ], [ "56744.6", "1.0807" ], ... ], "ts": 1618826337570 // orderbook generation time } } ``` # Ticker Source: https://developer.woox.io/api-reference/endpoint/websocket/TICKER ### Topic: ticker@`{symbol}` Push interval: 1s\ Subscribe to 24h ticker for a given symbol. ```bash Subscribed messages theme={null} { "id": ..... "cmd": "SUBSCRIBE", "params": ["ticker@SPOT_WOO_USDT"] } ``` ```bash theme={null} { "topic": "ticker@SPOT_WOO_USDT", "ts": 1614152270000, "data": { "s": "SPOT_WOO_USDT", // symbol "o": "0.16112", // open "c": "0.32206", // close "h": "0.33000", // high "l": "0.14251", // low "v": "89040821.98", // volume in base token "a": "22493062.21", // amount in USDT "q": "89040821.98", // aggregated volume in base token "u": "22493062.21", // aggregated amount in USDT "cnt": 15442, // trade count "ts": 1614152260000 // ticker generation time "tts": 1614152250000 // last trade time } } ``` # Trade Source: https://developer.woox.io/api-reference/endpoint/websocket/TRADE ### Topic: trade@`{symbol}` Push interval: real-time push Subscribe to trades data. Every update may only contain one trade. ```bash Subscribed messages theme={null} { "id": ..... "cmd": "SUBSCRIBE", "params": ["trade@SPOT_BTC_USDT"] } ``` ```bash theme={null} { "topic": "trade@SPOT_BTC_USDT", "ts": 1618820361552, "data": { "s": "SPOT_BTC_USDT", // symbol "px": "42598.27", // price "sx": "300", // size "sd": "BUY", // side "src": 0, // trade source, 1 = internal (trades on WOO X), 0 = external (trades from aggregrated sources) "rpi": false, // matched with RPI orders or not "ts": 1618820361540 // trade generation time in engine } } ``` # Unsubscribe Source: https://developer.woox.io/api-reference/endpoint/websocket/Unsubscribe Unsubscribe from one or more specific topics to stop receiving updates. The maximum number of topics to unsubsribe per request is 20. ```bash Subscribed messages theme={null} { "id": ..... "cmd": "UN_SUBSCRIBE", "params": ["topic1", "topic2"] } ``` ```json Response theme={null} { "id": "{req_id}", "cmd": "UN_SUBSCRIBE", "success": true, "time": {timestamp}, "data": ["topic1", "topic2"] } ``` # Unsubscribe all Source: https://developer.woox.io/api-reference/endpoint/websocket/Unsubscribe_all Unsubscribe from all currently subscribed topics in a single command. ```bash Subscribed messages theme={null} { "id": ..... "cmd": "UN_SUBSCRIBE_ALL" } ``` ```json Response theme={null} { "id": "{req_id}", "cmd": "UN_SUBSCRIBE_ALL", "success": true, "time": {timestamp}, "data": ["topic1", "topic2"] } ``` # Account Source: https://developer.woox.io/api-reference/endpoint/websocket/private/Account ### Topic: account Push interval: push on update and every 1 second\ Subscribe to receive account information updates. Updates will be sent both when specific events occur, such as a change in trading mode, and at regular intervals. ```bash Subscribed messages theme={null} { "id": ..... "cmd": "SUBSCRIBE", "params": ["account"] } ``` ```bash theme={null} # trading mode is spot only { "topic": "account", "ts": 1716861043337, "data": { "m": "PURE_SPOT", // trading mode "v": "10000" // account total value } } # trading mode is spot & margin { "topic": "account", "ts": 1716861043337, "data": { "m": "MARGIN", // trading mode "l": 4, // account leverage for margin "mr": "7739.3757", // margin ratio "omr": "7739.3757", // open margin ratio "imr": "1.0006", // initial margin ratio "mmr": "0.0126", // maintenance margin ratio "tc": "1146085.27376211", // total collateral "fc": "1145937.09993548", // free collateral "v": "10000" // account total value } } # trading mode is spot & futures { "topic": "account", "ts": 1716861043337, "data": { "m": "FUTURE", // trading mode "M": "ISOLATED", // default margin mode for futures "P": "ONE_WAY", // position mode "mr": "7739.3757", // margin ratio "omr": "7739.3757", // open margin ratio "imr": "1.0006", // initial margin ratio "mmr": "0.0126", // maintenance margin ratio "tc": "1146085.27376211", // total collateral "fc": "1145937.09993548", // free collateral "v": "10000" // account total value } } ``` # Algo execution report Source: https://developer.woox.io/api-reference/endpoint/websocket/private/Algo_execution_report ### Topic: algoexecutionreport Push interval: real-time\ Subscribe to order and execution updates for algo orders. ```bash Subscribed messages theme={null} { "id": ..... "cmd": "SUBSCRIBE", "params": ["algoexecutionreport"] } ``` ```bash theme={null} { "topic": "algoexecutionreport", "ts": 1667978011834, "data": [ { "s": "SPOT_BAL_USDT", // symbol "raid": 345181, // root algo order id "paid": 0, // parent algo order id "aid": 345181, // algo order id "caid": 0, // client algo order id "tg": "default", // order tag "ss": "NEW", // status "at": "BRACKET", // algo order type "sd": "SELL", // side "ps": "SHORT", // position side "sx": "1", // quantity "trp": "100", // trigger price "trpt" "MARK_PRICE", // trigger price type "tss": "SUCCESS", // trigger status "px": "50", // price "t": "LIMIT", // order type "tpx": "51", // first trade price that triggers the algo order "tt": 0, // trigger timestamp "tid": 0, // trade id "epx": "50" // executed price "esx": "1", // executed quantity "f": "0", // fee of the transaction "fa": "USDT", // fee asset of the transaction "rs": "", // reason "tesx": "1", // total executed quantity of the order "aepx": "50", // average executed price of the order "tf": "0", // total fee of the order "tfc": "USDT", // fee currency of the order "tr": "0", // total rebate of the order "trc": "BAL", // rebate currency of the order "vsx": "1", // visible quantity of the order "ts": 1667978011834, // executed timestamp "ro": false, // whether the order is reduce only "apx": "51", // activated price of the algo order "cr": "0.01", // callback ratio "cv": "1", // callback value "ep": "100", // extreme price "it": false, // is triggered "ia": false, // is activated "im": false, // is maker "ras": "NEW", // root algo status "as": "NEW", // algo status "lv": 10, // leverage "m": "CROSS" // margin mode }, ... ] } ``` # Balance Source: https://developer.woox.io/api-reference/endpoint/websocket/private/Balance ### Topic: balance Push interval: push on update\ Subscribe to balance updates. Updates will be sent only when specific events occur, such as order executions, placements, or cancellations. Updates will not be triggered by changes in the mark price. ```bash Subscribed messages theme={null} { "id": ..... "cmd": "SUBSCRIBE", "params": ["balance"] } ``` ```bash theme={null} { "topic": "balance", "ts": 1618757714353, "data": { "balances": [ { "t": "BTC", // token "h": "100", // holding "f": "0", // frozen "i": "0", // interest "psq": "0", // pending short qty "plq": "0", // pending long qty "s": "0", // staked "u": "0", // unbonding "v": "50.5", // vault "l": "0", // launchpad vault "e": "0", // earn "aop": "0", // average open price "pnl": "0", // 24h PnL "roi": "0.01", // 24h PnL percentage "fee": "0", // 24h fee "mp": "50000", // mark price "ver": 0, // version "b": "166", // trial fund bonus "lcr": 30, // loss cover ratio "ts": 1618757713353 // timestamp of actual balance change }, ... ] } } ``` # Execution report Source: https://developer.woox.io/api-reference/endpoint/websocket/private/Execution_report ### Topic: executionreport Push interval: real-time\ Subscribe to order and execution updates for ordinary orders. ```bash Subscribed messages theme={null} { "id": ..... "cmd": "SUBSCRIBE", "params": ["executionreport"] } ``` ```bash theme={null} # receive when order status is changed to new, partially filled or fully filled { "topic": "executionreport", "ts": 1675406261689, "data": { "mt": 0, // message type, 0 = execution report "s": "SPOT_BTC_USDT", // symbol "cid": 0, // client order id "oid": 54774393, // order id "t": "MARKET", // order type "sd": "BUY", // side "ps": "BOTH", // position side "sx": "1", // order quantity "px": "50000" // order price "tid": 56201985, // trade id "esx": "1", // executed quantity "epx": "50000", // executed price "f": "0.0001", // transaction fee amount "fa": "BTC", // transaction fee asset "tesx": "1", // total executed quantity of the order "aepx": "50000", // average executed price of the order "ss": "FILLED", // status "rs": "", // reason "tg": "default", // order tag "tf": "0.0001" // total fee of the order "tfc": "BTC", // fee currency of the order "tr": "0", // total rebate of the order "trc": "USDT", // rebate currency of the order "vsx": "1", // visible quantity of the order "ts": 1675406261689, // executed timestamp "ro": false, // reduce only "mk": false, // whether it is a maker transaction "lv": 10, // leverage "rpi": false, // whether the execution was matched against an RPI order "m": "CROSS" // margin mode } } # receive when editing order request gets rejected { "topic": "executionreport", "ts": 1675406261689, "data": { "mt": 1, // message type, 1 = edit reject "s": "SPOT_BTC_USDT", // symbol "oid": 54774393, // order id "cid": 0, // client order id "rs": "" // reason of the reject } } # receive when canceling order request gets rejected { "topic": "executionreport", "ts": 1675406261689, "data": { "mt": 2, // message type, 2 = cancel reject "s": "SPOT_BTC_USDT", // symbol "oid": 54774393, // order id "cid": 0, // client order id "rs": "" // reason of the reject } } # receive when canceling all orders request gets rejected { "topic": "executionreport", "ts": 1675406261689, "data": { "mt": 3, // message type, 3 = cancel all reject "s": "SPOT_BTC_USDT", // symbol "rs": "" // reason of the reject } } ``` # Position Source: https://developer.woox.io/api-reference/endpoint/websocket/private/Position ### Topic: position Push interval: push on update\ Subscribe to position updates. Updates will be sent only when specific events occur, such as order executions, placements, or cancellations. Updates will not be triggered by changes in the mark price. ```bash Subscribed messages theme={null} { "id": ..... "cmd": "SUBSCRIBE", "params": ["position"] } ``` ```bash theme={null} { "topic": "position", "ts": 1677814655101, "data": { "positions": [ { "s": "PERP_BTC_USDT" // symbol "h": "1", // holding "plq": "0.0002", // pending long quantity "psq": "0.0", // pending short quantity "aop": "0.0", // average open price "pnl": "-1.55902", // 24h pnl "roi": "-0.0054" // 24h pnl % change "fee": "0.218", // 24h fee "sp": "49000", // last settle price "mp": "50000", // mark price "ot": 1677814653001, // opening time "aq": 1, // adl quantile "lv": 10, // leverage "m": "ISOLATED", // margin mode "ps": "BOTH", // position side "it": "USDT", // isolated margin token "ia": "1000", // isolated margin amount "il": "10", // isolated margin frozen long "is": "10", // isolated margin frozen short "ver": 93454, // version "ts": 1677814653001 // timestamp of actual position update }, ... ] } } ``` # Subscribe Source: https://developer.woox.io/api-reference/endpoint/websocket/subscribe Subscribe to one or more topics to start receiving updates. The maximum number of topics to subscribe per request is 20. ```bash Subscribed messages theme={null} { "id": ..... "cmd": "SUBSCRIBE", "params": ["topic1", "topic2"] } ``` ```json Response theme={null} { "id": "{req_id}", "cmd": "SUBSCRIBE", "success": true, "time": {timestamp}, "data": ["topic1", "topic2"] } ``` # null Source: https://developer.woox.io/api-reference/error_code | Code | Message | | ------ | -------------------------------------------------------------------------------------------------------------------------------------- | | 317136 | Edit tpsl quantity is not allowed for quantity bracket | | 317137 | Edit quantity should edit both legs | | 317138 | Edit quantity should be same for both legs | | 317139 | Trigger price of 1st leg should not be empty for STOP\_BRACKET | | 317140 | The quantity of a quantity TP/SL order should not be empty. | | 317141 | The algo quantity TP/SL limit order should have field price | | 317142 | The algo trigger type of quantity TP/SL should not be CLOSE\_POSITION | | 317143 | The side of TP/SL legs should be the same | | 317144 | IndexPrice is not supported for non spot symbol `${symbol}` | | 317145 | same as INVALID\_PRICE\_QUOTE\_MIN but different 'code' | | 317146 | same as INVALID\_PRICE\_QUOTE\_MAX but different 'code' | | 317147 | same as INVALID\_PRICE\_TICKER\_SIZE but different 'code' | | 317148 | symbol can't be empty. | | 317149 | same with TRADE\_NOT\_FOUND with different ErrorCodes | | 317150 | trigger price must be greater than `${price}` | | 317151 | trigger price must be less than `${price}` | | 317152 | The order not found for the order id : `${orderId}` | | 317153 | child order not found for the order id : `${orderId}` | | 317154 | RPC failed: error: `${msg}` | | 317155 | unsupported symbol: `${symbol}` | | 317156 | unsupported symbol: `${symbol}` | | 317157 | Trading with `${symbol1}`/`${symbol2}` is temporarily suspended. Please try again later. | | 317158 | Trading with `${token}`-PERP is temporarily suspended. Please try again later. | | 317159 | This pair is currently not supported. | | 317160 | The order id and symbol are not matched | | 317161 | The order is completed | | 317162 | The params should not be null or 0 | | 317163 | cannot edit TP/SL quantity under bracket order | | 317164 | Invalid client order id | | 317165 | invalid order id list | | 317166 | invalid client order id list | | 317167 | unsupported algo type: `${algoType}` | | 317168 | Order failed due to internal service error. Please contact customer service. | | 317169 | Trading with `${left}`/`${right}` is temporarily suspended. Please try again later. | | 317170 | The order quantity must bigger than the executed quantity. | | 317171 | error path format | | 317172 | The userId should not be null or 0 | | 317173 | The orderId should not be null or 0 | | 317174 | The order is processing | | 317176 | The trigger after should from 0 to `${maxTriggerAfter}` | | 317177 | Order has terminated | | 317178 | The receive window is invalid. | | 317179 | Request has failed as the receive window: `${recv_window}` millisecond is exceeded from `${api_timestamp}` | | 317184 | The order cannot be found, or it is already completed. | | 317206 | Spot trading is disabled while futures credits are active. Please remove or fully utilize your futures credits to enable spot trading. | | 317207 | Request failed. Please ensure you have sufficient USDT to cover the futures credits currently in use. | | 302111 | Your account position is being liquidated. Trading has been suspended at the moment. Please try again later. | | 302137 | You don’t have enough position for MKT close. Please check your open orders. | | 302138 | Insufficient position for reduce only order. | | 302140 | The order price is too small. | | 302141 | The order quantity is too small. | | 302117 | The client\_order\_id is repeated. | | 302127 | Your order is terminated. | | 302142 | The order quantity must bigger than the executed quantity. | | 302147 | Amount is required for buy market orders when margin disabled. | | 302148 | Amount is required for ASK buy order when margin disabled. | | 302149 | Amount is required for BID buy order when margin disabled. | | 302150 | Quantity is required for sell market orders when margin disabled. | | 302151 | Quantity is required for ASK sell order when margin disabled. | | 302152 | Quantity is required for BID sell order when margin disabled. | | 302128 | Insufficient `${token}`. Note that `${baseToken}` do not allow for margin trading. | | 302154 | Insufficient `${stableToken}`. | | 302155 | Insufficient `${token}`. Please enable margin trading for leverage trading. | | 302102 | Your margin is insufficient! Please liquidate assets. | | 302156 | Short selling `${token}` is not available now. | | 302129 | The order doesn't exist. | | 302130 | The order didn't update. | | 302314 | Quantity should be less than your position. | | 302131 | Please enable futures trading in Margin & Futures tab. You can create subaccounts to separate margin and futures positions. | | 302157 | Insufficient `${token}`. Please enable margin trading in Margin & Futures tab for spot leverage trading. | | 302162 | You are not able to place this order under Reduce Only trading mode. | | 302171 | Buy or sell orders by amount are not supported under Reduce Only trading mode. | | 302172 | `${token}` max position size of `${maxPosition}` is exceeded. | | 302177 | Pending new orders cannot be edited. | | 302178 | Order is rejected as you have an existing market close order. | | 302188 | exceed max open notional | | 302002 | The data doesn't exist. | | 302144 | There isn't a positive amount to repay the interest balance. | | 302301 | The balance isn't enough. | | 302103 | Your margin will be insufficient after withdrawal. | | 302104 | Your margin will be insufficient after this action. | | 302136 | Your balance must be positive. | | 302135 | The amount must be positive. | | 302134 | The details are empty. | | 302132 | Attempt failed. Please close your negative positions and try again. | | 302133 | Please repay your interest. | | 302145 | Your margin will be insufficient after disabling this token as collateral. | | 302126 | Attempt failed. Please close your futures positions, cancel open orders and try again. | | 302143 | Application not found. | | 302999 | An unknown error has occurred. | | 302159 | Your request has timed out. Please try again later. | | 302160 | Reduce only orders are only supported under spot pairs quoted by your account currency `${AccountCurrency}`. | | 302163 | Reduce only orders are not allowed. | | 302164 | The order value should be greater or equal to `${minNotional}`. | | 302305 | Failed to update cross margin leverages due to insufficient margin. Please top up or close your cross positions to proceed. | | 302306 | Invalid leverage, please provide positive integer leverage | | 302307 | The account has been suspended | | 302165 | The token has no price. | | 302166 | Token balance cannot be negative under Spot Only. | | 302167 | Token balance cannot be negative under Spot & Futures. | | 302168 | The token is not enabled for margin. | | 302169 | Collateral is not sufficient to cover initial margin requirements under Spot & Margin. | | 302170 | Collateral is not sufficient to cover initial margin requirements under Spot & Futures. | | 302185 | Your order request cannot be processed at this moment because the position mode is currently being switched. | | 302186 | The position side you've used is not compatible with your current position mode. | | 302195 | The position side you've used is invalid | | 302303 | Too many pending orders on reduce only order | | 302190 | Unable to adjust isolated margin while there are pending orders. Please cancel them to proceed. | | 302191 | Only adjustments to futures isolated margin are allowed. | | 302192 | The amount exceeds the withdrawable margin limit. | | 302193 | The amount exceeds the available USDT balance. | | 302194 | Maximum number of isolated pending orders for `${symbol}` reached. | | 302196 | Please use up all of your active futures credits before adding more. | | 302199 | Please switch to futures trading mode to adjust futures credits. | | 302197 | Futures credits cannot be reduced while there are open positions. | | 302198 | Futures credits cannot be reduced while there are still pending orders. | | 302308 | Attempt failed. Please close your futures positions, cancel open orders and try again. | | 302309 | Spot trading is disabled while futures credits are active. Please remove or fully utilize your futures credits to enable spot trading | | 302310 | Request failed. Please ensure you have sufficient USDT to cover the futures credits currently in use. | | 302311 | This request is currently being processed. | | 302312 | This request is currently being processed. | | 302313 | This request is currently being processed. | | 302001 | data status is not expected | | 302003 | The param number is invalid. | | 302004 | invalid params | | 302005 | An error has occurred due to other pending requests. Please try again later. | | 302101 | symbol is not exists | | 302109 | create order engine error | | 302110 | application is lock now | | 302112 | Remaining order quantity is smaller than transaction quantity | | 302113 | Order side is not same as transaction side | | 302114 | Order price too small | | 302115 | Order quantity too small | | 302118 | no enough balance to close | | 302119 | Insufficient funds. Please enable margin trading. Note that certain coins do not allow for leverage trading. | | 302120 | Please lower the leverage ratio below 1.0 and close your short positions. | | 302121 | Please repay your interest. | | 302122 | Remaining order amount is smaller than transaction quantity | | 302123 | user group data not found | | 302125 | Quantity should be less than your position. | | 302189 | Changing isolated position leverage is not allowed when there is a pending order. | | 311999 | There is a system error. | | 311002 | The data does not exist. | | 311001 | The data status is invalid. | | 311004 | The parameters are invalid. | | 311004 | Please at least change one of the order parameters. | | 311004 | apollo init set single properties error,fieldName `${fieldName}`,`${errorMessage}` | | 311004 | You can't place more than `${orderNumber}` trigger orders. | | 311004 | Given a side and a symbol, only allow at most one positional TP/SL order. | | 311004 | Cancellation is not supported for this order. | | 311004 | Edit request is not allowed during algo order triggering. | | 311004 | Cancel request is not allowed during algo order triggering. | | 311004 | Position side is invalid | | 311004 | Create order is not allowed when switching position mode | | 311004 | Your order request cannot be processed at this moment because the position mode is currently being switched. | | 311004 | Position side is required when trading in hedge mode mode | | 311004 | Position side is unnecessary when trading in one way mode | | 311004 | Position side is invalid | | 311004 | Bracket Order with side `${side}` and position side `${positionSide}` is not allowed in hedge mode | | 311004 | You can't place more than `${orderNumber}` TP/SL orders. | | 311004 | TP/SL order with side `${side}` and position side `${positionSide}` is not allowed in hedge mode | | 311004 | The account has been suspended | # Integration guide Source: https://developer.woox.io/api-reference/guide For developers migrating from V1 to V3 REST APIs, please also refer to the interface mapping provided \[here]. ## REST API Base Endpoint **Production**: `https://api.woox.io` **Staging**: `https://api.staging.woox.io` ## API resources * [TG support channel](https://t.me/woo_english/246812) * [Discord support channel](https://discord.gg/woonetwork) ## Authentication Please log in to your WOO X account to generate an API key. For detailed instructions on how to create an API key, please refer to the guide available \[here]. WOO X uses HMAC encryption for request authentication. The following HTTP request header keys must be included for authentication: * `x-api-key` API key created from WOO X console * `x-api-timestamp` Unix epoch time in milliseconds * `x-api-signature` Encoded signature (see Request Example for more details) All requests need to be signed using `api_key` and `api_secret`. ## Request Example Here we provide a simple example that shows you how to send a valid request to WOO X. Assume the following information: | Key | Value | Description | | ------------ | ---------------------------- | ------------------------------- | | `api_key` | AbmyVJGUpN064ks5ELjLfA== | create from WOO X console | | `api_secret` | QHKRXHPAW1MC9YGZMAT8YDJG2HPR | create from WOO X console | | `timestamp` | 1578565539808 | Unix epoch time in milliseconds | The `x-api-signature` header is generated as follows: 1. Create a string concatenation: timestamp + request\_method + request\_path + request\_body 2. Sign the string in step 1 with the `api_secret` using the HMAC\_SHA256 algorithm 3. Convert the signature generated in step 2 to a hex string Request parameters of a GET or DELETE request should be included in the request\_path in the form of a query string. If request\_body is not empty, concatenate the request body json after stringifying. Put the HMAC signature in HTTP header `x-api-signature`, and put timestamp in `x-api-timestamp`, and also api\_key in `x-api-key`. For POST or PUT request, also put application/json in Content-Type in the HTTP request header. **If the GET request looks like**: `GET /v3/algo/orders?algoType=STOP` **Normalize request content, the result will look like**: `1578565539808GET/v3/algo/orders?algoType=STOP` Then use `api-secret` to generate a signature using the HMAC\_SHA256 algorithm **If the POST request looks like**: ```bash theme={null} POST /v3/algo/order # request body { "symbol": "PERP_BTC_USDT", "side": "BUY", "reduceOnly": false, "type": "MARKET", "quantity": "1", "algoType": "TRAILING_STOP", "callbackRate": "100" } ``` **Normalize request content, the result will look like**: `1578565539808POST/v3/algo/order{"symbol": "PERP_BTC_USDT", "side": "BUY", "reduceOnly": false, "type": "MARKET", "quantity": "1", "algoType": "TRAILING_STOP", "callbackRate": "100"}` **Then use `api-secret` to generate a signature using the HMAC\_SHA256 algorithm** **The final GET request would look like this**: ```bash theme={null} ``` **The final POST request would look like this**: ```bash theme={null} ``` # Introduction Source: https://developer.woox.io/api-reference/introduction ## Overview The V3 REST and WebSocket APIs are our latest API offerings for programmatic trading, market data access, and account management. V3 introduces a unified and standardized interface across spot and perpetual markets, built to offer lower latency, higher reliability, and greater consistency. ## Key upgrades ### REST APIs **Clear subpath organization for business logic**\ All V3 REST endpoints follow a structured subpath model for better clarity. | Subpath | Purpose | | ----------- | ------------------------------------- | | /public | Public market data (no auth needed) | | /trading | Order placement & management | | /account | Account level configurations & data | | /assets | Deposits, withdrawals, token balances | | /futures | Perpetual specific endpoints | | /spotMargin | Spot margin functions | #### Standardized authentication scheme All V3 REST endpoints follow a unified parameter handling scheme: * GET and DELETE requests pass parameters through the query string. * POST and PUT requests send parameters in the JSON-formatted request body. ##### Consistent response format All V3 REST endpoints follow a standardized response structure. ```json theme={null} { "success": true, "data":{ ... }, "timestamp": 1717507200000 } ``` * success: Boolean indicating API call result * data: Response payload containing the requested information * timestamp: Server time in milliseconds (UTC) #### Consistent field naming All V3 REST endpoints enforce consistent naming across all product lines to the extent possible, and use camelCase for naming consistency in both request and response bodies. #### Strong typing discipline All V3 REST endpoints follow the following typing discipline: * Decimal fields are returned as strings to prevent precision errors. * Integer fields use numeric type. ### WebSocket APIs #### WebSocket architecture rebuilt The V3 WebSocket infrastructure has been completely rebuilt to deliver a faster, more reliable, and developer-optimized experience. Key improvements include: * Reduced Latency – Faster data delivery * Improved Message Throughput - Higher message rates for real-time responsiveness * Greater Connection Stability – Robust under heavy load and network interruptions #### More order book depth options for different needs V3 offers flexible order book depth options with update frequencies tailored to depth levels (50, 200, 500), enabling more efficient and customizable market data streaming. #### Abbreviated field names V3 WebSocket payloads use shortened keys (e.g., px for price, sx for size) to reduce message size and I/O overhead. # Migration guide Source: https://developer.woox.io/api-reference/migration_guide ## API interface mapping ### Public | Legacy API | V3 API | | --------------------------------------- | -------------------------------- | | `/v1/public/system_info` | `/v3/public/systemInfo` | | `/v1/public/info` | `/v3/public/instruments` | | `/v1/public/info/:symbol` | `/v3/public/instruments` | | `/v1/public/market_trades` | `/v3/public/marketTrades` | | `https://api-pub.woo.org/v1/hist/trade` | `/v3/public/marketTradesHistory` | | `/v1/public/orderbook/:symbol` | `/v3/public/orderbook` | | `/v1/public/kline` | `/v3/public/kline` | | `https://api-pub.woo.org/v1/hist/kline` | `/v3/public/klineHistory` | | `/v1/public/token` | `/v3/public/token` | | `/v1/public/token` | `/v3/public/tokenInfo` | | `/v1/public/token_network` | `/v3/public/tokenNetwork` | | `/v1/public/funding_rates` | `/v3/public/fundingRate` | | `/v1/public/funding_rate/:symbol` | `/v3/public/fundingRate` | | `/v1/public/funding_rate_history` | `/v3/public/fundingRateHistory` | | `/v1/public/futures` | `/v3/public/futures` | | `/v1/public/futures/:symbol` | `/v3/public/futures` | ### Trading | Legacy API | V3 API | | -------------------------------------------- | ---------------------------------- | | `POST /v1/order` | `POST /v3/trade/order` | | `DELETE /v1/order` | `DELETE /v3/trade/order` | | `DELETE /v1/client/order` | `DELETE /v3/trade/order` | | `DELETE /v1/orders` | `DELETE /v3/trade/orders` | | `DELETE /v3/orders/pending` | `DELETE /v3/trade/orders` | | `GET /v1/order/:oid` | `GET /v3/trade/order` | | `GET /v1/client/order/:client_order_id` | `GET /v3/trade/order` | | `GET /v1/orders` | `GET /v3/trade/orders` | | `PUT /v3/order/:order_id` | `PUT /v3/trade/order` | | `PUT /v3/order/client/:client_order_id` | `PUT /v3/trade/order` | | `POST /v3/algo/order` | `POST /v3/trade/algoOrder` | | `DELETE /v3/algo/order/:order_id` | `DELETE /v3/trade/algoOrder` | | `DELETE /v3/algo/orders/pending` | `DELETE /v3/trade/algoOrders` | | `DELETE /v3/merge/orders/pending/:symbol` | `DELETE /v3/trade/allOrders` | | `GET /v3/algo/order/:oid` | `GET /v3/trade/algoOrder` | | `GET /v3/algo/orders` | `GET /v3/trade/algoOrders` | | `PUT /v3/algo/order/:order_id` | `PUT /v3/trade/algoOrder` | | `PUT /v3/algo/order/client/:client_order_id` | `PUT /v3/trade/algoOrder` | | `GET /v1/client/trade/:tid` | `GET /v3/trade/transaction` | | `GET /v1/order/:oid/trades` | `GET /v3/trade/transactionHistory` | | `GET /v1/client/trades` | `GET /v3/trade/transactionHistory` | | `GET /v1/client/hist_trades` | `GET /v3/trade/transactionHistory` | | `POST /v1/order/cancel_all_after` | `POST /v3/trade/cancelAllAfter` | ### Account | Legacy API | V3 API | | ---------------------------------------- | ---------------------------------------- | | `GET /v1/client/info` | `GET /v3/account/info` | | `GET /v3/accountinfo` | `GET /v3/account/info` | | `GET /v1/client/token` | `GET /v3/account/tokenConfig` | | `GET /v1/client/token` | `GET /v3/account/symbolConfig` | | `POST /v1/client/account_mode` | `POST /v3/account/tradingMode` | | `GET /v3/referrals` | `GET /v3/account/referral/summary` | | `GET /v3/referral_rewards` | `GET /v3/account/referral/rewardHistory` | | `GET /usercenter/api/enabled_credential` | `GET /v3/account/credentials` | | `GET /v1/sub_account/all` | `GET /v3/account/subAccounts/all` | ### Assets | Legacy API | V3 API | | ----------------------------------------- | -------------------------------- | | `GET /v1/client/holding` | `GET /v3/asset/balances` | | `GET /v2/client/holding` | `GET /v3/asset/balances` | | `GET /v3/balances` | `GET /v3/asset/balances` | | `GET /v1/client/transaction_history` | `GET /v3/asset/token/history` | | `POST /v1/asset/main_sub_transfer` | `POST /v3/asset/transfer` | | `GET /v1/asset/main_sub_transfer_history` | `GET /v3/asset/transfer/history` | | `GET /v1/asset/deposit` | `GET /v3/asset/wallet/deposit` | | `POST /v1/asset/withdraw` | `POST /v3/asset/wallet/withdraw` | | `POST /v3/asset/withdraw` | `POST /v3/asset/wallet/withdraw` | | `GET /v1/asset/history` | `GET /v3/asset/wallet/history` | ### Futures | Legacy API | V3 API | | ---------------------------------- | ------------------------------------ | | `GET /v1/positions` | `GET /v3/futures/positions` | | `GET /v3/positions` | `GET /v3/futures/positions` | | `GET /v1/position/:symbol` | `GET /v3/futures/positions` | | `POST /v1/client/position_mode` | `PUT /v3/futures/positionMode` | | `GET /v1/client/futures_leverage` | `GET /v3/futures/leverage` | | `POST /v1/client/futures_leverage` | `PUT /v3/futures/leverage` | | `GET /v1/funding_fee/history` | `GET /v3/futures/fundingFee/history` | ### Spot margin | Legacy API | V3 API | | ------------------------------- | ------------------------------------ | | `POST /v1/client/leverage` | `POST /v3/spotMargin/leverage` | | `GET /v1/token_interest` | `GET /v3/spotMargin/interestRate` | | `GET /v1/token_interest/:token` | `GET /v3/spotMargin/interestRate` | | `GET /v1/interest/history` | `GET /v3/spotMargin/interestHistory` | | `POST /v1/interest/repay` | `POST /v3/spotMargin/interestRepay` | | `GET /v3/buypower` | `GET /v3/spotMargin/maxMargin` | ## Code example ### GET demo #### V3 ```python theme={null} import requests import datetime import hmac, hashlib def get_v3(base_url, request_path): api_key = '{put your api_key here}' api_secret = '{put your api_secret here}' timestamp = round(datetime.datetime.now().timestamp() * 1000) signString = str(timestamp) + 'GET' + request_path api_signature = hmac.new(bytes(api_secret, 'utf-8'), bytes(signString, 'utf-8'), hashlib.sha256).hexdigest() headers = { 'x-api-key': api_key, 'x-api-signature': api_signature, 'x-api-timestamp': str(timestamp) } response = requests.get(base_url + request_path, headers=headers) result = response.json() print(result) return result base_url = 'https://api.woox.io' get_v3(base_url, '/v3/trade/order?orderId={orderId}') ``` #### Legacy V1 ```python theme={null} import requests import datetime import hmac, hashlib def get_legacy_v1(base_url, request_path): api_key = '{put your api_key here}' api_secret = '{put your api_secret here}' timestamp = round(datetime.datetime.now().timestamp() * 1000) signString = str(timestamp) + 'GET' + request_path api_signature = hmac.new(bytes(api_secret, 'utf-8'), bytes(signString, 'utf-8'), hashlib.sha256).hexdigest() headers = { 'x-api-key': api_key, 'x-api-signature': api_signature, 'x-api-timestamp': str(timestamp), 'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' } response = requests.get(base_url + request_path, headers=headers) result = response.json() print(result) return result base_url = 'https://api.woox.io' get_legacy_v1(base_url, '/v1/order/{orderId}') ``` #### Legacy V3 ```python theme={null} import requests import datetime import hmac, hashlib def get_legacy_v3(base_url, request_path): api_key = '{put your api_key here}' api_secret = '{put your api_secret here}' timestamp = round(datetime.datetime.now().timestamp() * 1000) signString = str(timestamp) + 'GET' + request_path api_signature = hmac.new(bytes(api_secret, 'utf-8'), bytes(signString, 'utf-8'), hashlib.sha256).hexdigest() headers = { 'x-api-key': api_key, 'x-api-signature': api_signature, 'x-api-timestamp': str(timestamp), 'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' } response = requests.get(base_url + request_path, headers=headers) result = response.json() print(result) return result base_url = 'https://api.woox.io' get_legacy_v3(base_url, '/v1/order/{orderId}') ``` ### POST demo #### V3 ```python theme={null} import requests import datetime import hmac, hashlib def post_v3(base_url, request_path, request_body): api_key = '{put your api_key here}' api_secret = '{put your api_secret here}' timestamp = round(datetime.datetime.now().timestamp() * 1000) signString = str(timestamp) + 'POST' + request_path + request_body api_signature = hmac.new(bytes(api_secret, 'utf-8'), bytes(signString, 'utf-8'), hashlib.sha256).hexdigest() headers = { 'x-api-key': api_key, 'x-api-signature': api_signature, 'x-api-timestamp': str(timestamp), 'Content-Type': 'application/json' } response = requests.post(base_url + request_path, headers=headers, data=request_body) result = response.json() print(result) return result base_url = 'https://api.woox.io' post_v3(base_url, '/v3/trade/order', '''{ "symbol": "{symbol}", "side": "{side}", "type": "{type}", "price": "{price}", "quantity": "{quantity}" }''') ``` #### Legacy V1 ```python theme={null} import requests import datetime import hmac, hashlib def post_legacy_v1(base_url, request_path, request_body): api_key = '{put your api_key here}' api_secret = '{put your api_secret here}' timestamp = round(datetime.datetime.now().timestamp() * 1000) signString = str(timestamp) + 'POST' + request_path + request_body api_signature = hmac.new(bytes(api_secret, 'utf-8'), bytes(signString, 'utf-8'), hashlib.sha256).hexdigest() headers = { 'x-api-key': api_key, 'x-api-signature': api_signature, 'x-api-timestamp': str(timestamp), 'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' } response = requests.post(base_url + request_path, headers=headers, data=request_body) result = response.json() print(result) base_url = 'https://api.woox.io' post_legacy_v1(base_url, '/v1/order', 'order_price={order_price}&order_quantity={order_quantity}&order_type={order_type}&side={side}&symbol={symbol}') ``` #### Legacy V3 ```python theme={null} import requests import datetime import hmac, hashlib def post_legacy_v3(base_url, request_path, request_body): api_key = '{put your api_key here}' api_secret = '{put your api_secret here}' timestamp = round(datetime.datetime.now().timestamp() * 1000) signString = str(timestamp) + 'POST' + request_path + request_body api_signature = hmac.new(bytes(api_secret, 'utf-8'), bytes(signString, 'utf-8'), hashlib.sha256).hexdigest() headers = { 'x-api-timestamp': str(timestamp), 'x-api-key': api_key, 'x-api-signature': api_signature, 'Content-Type': 'application/json' } response = requests.post(base_url + request_path, headers=headers, data=request_body) result = response.json() print(result) return result base_url = 'https://api.woox.io' post_legacy_v3(base_url, '/v3/algo/order','''{ "symbol": {symbol}, "side": {side}, "algoType": {algoType}, "triggerPrice": {triggerPrice}, "type": {type}, "quantity": {quantity}, "price": {price} }''') ``` ### PUT demo #### V3 ```python theme={null} import requests import datetime import hmac, hashlib def put_v3(base_url, request_path, request_body): api_key = '{put your api_key here}' api_secret = '{put your api_secret here}' timestamp = round(datetime.datetime.now().timestamp() * 1000) signString = str(timestamp) + 'PUT' + request_path + request_body api_signature = hmac.new(bytes(api_secret, 'utf-8'), bytes(signString, 'utf-8'), hashlib.sha256).hexdigest() headers = { 'x-api-key': api_key, 'x-api-signature': api_signature, 'x-api-timestamp': str(timestamp), 'Content-Type': 'application/json' } response = requests.put(base_url + request_path, headers=headers, data=request_body) result = response.json() print(result) return result base_url = 'https://api.woox.io' put_v3(base_url, '/v3/trade/order', '''{ "orderId": "{orderId}", "price": "{price}", "quantity": "{quantity}" }''') ``` #### Legacy V3 ```python theme={null} import requests import datetime import hmac, hashlib def put_legacy_v3(base_url, request_path, request_body): api_key = '{put your api_key here}' api_secret = '{put your api_secret here}' timestamp = round(datetime.datetime.now().timestamp() * 1000) signString = str(timestamp) + 'PUT' + request_path + request_body api_signature = hmac.new(bytes(api_secret, 'utf-8'), bytes(signString, 'utf-8'), hashlib.sha256).hexdigest() headers = { 'x-api-timestamp': str(timestamp), 'x-api-key': api_key, 'x-api-signature': api_signature, 'Content-Type': 'application/json' } response = requests.put(base_url + request_path, headers=headers, data=request_body) result = response.json() print(result) return result base_url = 'https://api.woox.io' put_legacy_v3(base_url, '/v3/algo/order/{orderId}','''{ "price": {price} }''') ``` ### DELETE demo #### V3 ```python theme={null} import requests import datetime import hmac, hashlib def delete_v3(base_url, request_path): api_key = '{put your api_key here}' api_secret = '{put your api_secret here}' timestamp = round(datetime.datetime.now().timestamp() * 1000) signString = str(timestamp) + 'DELETE' + request_path api_signature = hmac.new(bytes(api_secret, 'utf-8'), bytes(signString, 'utf-8'), hashlib.sha256).hexdigest() headers = { 'x-api-key': api_key, 'x-api-signature': api_signature, 'x-api-timestamp': str(timestamp) } response = requests.delete(base_url + request_path, headers=headers) result = response.json() print(result) return result base_url = 'https://api.woox.io' delete_v3(base_url, '/v3/trade/order?symbol={symbol}&orderId={orderId}') ``` #### Legacy V1 ```python theme={null} import requests import datetime import hmac, hashlib def delete_legacy_v1(base_url, request_path, request_parameter): api_key = '{put your api_key here}' api_secret = '{put your api_secret here}' timestamp = round(datetime.datetime.now().timestamp() * 1000) signString = str(timestamp) + 'DELETE' + request_path + request_parameter api_signature = hmac.new(bytes(api_secret, 'utf-8'), bytes(signString, 'utf-8'), hashlib.sha256).hexdigest() headers = { 'x-api-key': api_key, 'x-api-signature': api_signature, 'x-api-timestamp': str(timestamp), 'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' } response = requests.delete(base_url + request_path, headers=headers, data=request_parameter) result = response.json() print(result) return result base_url = 'https://api.woox.io' delete_legacy_v1(base_url, '/v1/order', 'order_id={orderId}&symbol={symbol}') ``` #### Legacy V3 ```python theme={null} import requests import datetime import hmac, hashlib def delete_legacy_v3(base_url, request_path): api_key = '{put your api_key here}' api_secret = '{put your api_secret here}' timestamp = round(datetime.datetime.now().timestamp() * 1000) signString = str(timestamp) + 'DELETE' + request_path api_signature = hmac.new(bytes(api_secret, 'utf-8'), bytes(signString, 'utf-8'), hashlib.sha256).hexdigest() headers = { 'x-api-key': api_key, 'x-api-signature': api_signature, 'x-api-timestamp': str(timestamp), 'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' } response = requests.delete(base_url + request_path, headers=headers) result = response.json() print(result) return result base_url = 'https://api.woox.io' delete_legacy_v3(base_url, '/v3/algo/order/{orderId}') ``` # Introduction Source: https://developer.woox.io/api-reference/websocket_introduction ### Public streams wss\://wss.woox.io/v3/public (Production) wss\://wss.staging.woox.io/v3/public (Staging) ### Private streams wss\://wss.woox.io/v3/private (Production) wss\://wss.staging.woox.io/v3/private (Staging) ### Authentication Public market data topics do not require authentication. Authentication is required for subscribing to private user data streams (e.g., order updates, account info). To authenticate: 1. **Obtain a listen key**\ Call the following endpoint to get your listenKey. 2. **Connect to the WebSocket**\ Use the WebSocket base URL and append your listen key as a query parameter at `{base_wss_url}`?key=``. Once connected, you may subscribe to various private topics using subscription commands. See subscription commands for full details. ## Additional information ### General Each WebSocket connection is valid for a maximum of 24 hours. Expect automatic disconnection at the 24-hour mark. ### Connection limits A client IP can establish a maximum of 100 connections every 5 minutes. Exceeding this will result in rejected attempts and a cooldown period. A client IP can maintain up to 100 active WebSocket connections at any given time. Any attempt to exceed this will result in new connections being denied. Note: Extensive retries after hitting limits will result in an IP ban. ### Subscription limits Each connection can subscribe to a maximum of 100 live topics simultaneously. Further subscription attempts will be rejected once this limit is reached. When submitting batch subscriptions, the server processes them sequentially. If the subscription limit is reached mid-way, the server will accept subscriptions until the limit is met. Any subscriptions that exceed the limit will be rejected. The maximum number of topics to subscribe per request is 20. While subscribing to topics within a single connection, it is not recommended to exceed 200 TPS. ### Ping-Pong mechanism The server supports a Ping-Pong mechanism for clients to verify connectivity and measure round-trip latency. This is not required for keep-alive purposes. #### Example **Client sends:** ```bash theme={null} { "cmd": "PING", "ts": 1750641291182 } ``` **Server responds:** ```bash theme={null} { "cmd": "PONG", "success": true, "time": 1750641291322 } ``` # Legacy API Source: https://developer.woox.io/changelog/release_note_v1 Refer to the API Documentation here for change logs for Legacy APIs.\ Please note: While these APIs will remain operational until their respective sunset dates, they are no longer actively maintained. Feature updates and bug fixes may be delayed or unavailable. For more information, please refer to Legacy API. # V3 API Source: https://developer.woox.io/changelog/release_note_v3 **Post Only Adjusted Order Now Live** The Post Only Adjusted Order is now supported, giving users more flexibility when providing liquidity. **How it works:** * Normal Post-Only: The order is rejected if it would cross the book and execute immediately as a taker. * Post Only Adjusted: Instead of rejecting, the order price is automatically adjusted so it can still rest on the book as a maker. * For buy orders, the price is adjusted to best ask - 1 tick. * For sell orders, the price is adjusted to best bid + 1 tick. **REST API Updates** * **Place Order** `POST /v3/trade/order`\ Added param `postOnlyAdjusted` . * **Place Order** `POST /v3/order`\ Added param `postOnlyAdjusted` . * **Place Order** `POST /v3/trade/order/trial`\ Added param `postOnlyAdjusted` . **Retail Price Improvement (RPI) Now Live** The RPI order type is now supported across REST and WebSocket V3 APIs, enabling market makers to provide improved execution for retail flow. Key API updates include:\ **REST API Updates** * **Get Instruments** `GET /v3/public/instruments` Added `isAllowedRpi` field to indicate whether RPI is enabled for the symbol. * **Market Trades** `GET /v3/public/marketTrades`\ Added `rpi` field to response to indicate whether the trade was matched via RPI. * **Market Trades History** `GET /v3/public/marketTradesHistory`\ Added `rpi` field to response to indicate whether the trade was matched via RPI. * **Orderbook Snapshot** `GET /v3/public/orderbook`\ Added `rpi` field as an optional request parameter to get the order book with both non-RPI and RPI. * **Place Order** `POST /v3/trade/order`\ Now supports submitting orders with the `RPI` order type. * **Get Orders** `GET /v3/trade/orders`\ Supports filtering by `RPI` order type. * **Transaction by Trade ID (Last 3 Months)** `GET /v3/trade/transaction`\ Added `isMatchRPI` field to response to indicate whether the trade was matched via RPI. * **Transaction History (Past 2 Years)** `GET /v3/trade/transactionHistory` Added `isMatchRPI` field to response to indicate whether the trade was matched via RPI. **WebSocket API Updates** * **Orderbook Update (RPI)** New topic providing order book updates that include both RPI and non-RPI orders. * **Best Bid/Offer (RPI)** New topic broadcasting BBO updates, including both RPI and non-RPI quotes. * **Trade Topic** Added `rpi` field to messages to indicate whether the trade was matched via RPI. * **Execution Report** Added `rpi` field to messages to indicate whether the trade was matched via RPI. **New V3 APIs Now Live**\ The latest V3 REST and WebSocket APIs are now officially live.\ They offer improved performance, reduced latency, and a more consistent developer experience. # Woo Home Page Source: https://developer.woox.io/home export function openSearch() { document.getElementById("search-bar-entry").click(); }
WOO X Documentation

Integrate. Automate. Trade.

Choose a topic below
Comprehensive details about the WOO X API. News about features and changes in WOO X.
# Legacy API Source: https://developer.woox.io/legacy-api-reference/introduction Previous API versions can be found here. These APIs are now considered legacy and will be sunset in phases: * REST API: scheduled for deprecation on **December 31, 2025** * WebSocket API: scheduled for deprecation on **December 31, 2025** While these APIs will remain operational until their respective sunset dates, they are no longer actively maintained, and updates or bug fixes may be delayed or unavailable. If you’re migrating from an earlier version, please refer to the V3 Integration Guide and Interface Mapping to streamline the transition. We strongly recommend all developers migrate to the latest V3 API for enhanced performance, lower latency, and long-term support. # Introduction overview Source: https://developer.woox.io/troubleshooting/introduction For any integration related questions please first refer to [integration FAQ](build-on-evm/integration-faqs) page A list of common issues and how to diagnose them can be found within this navigation. A customer support dashboard to retrieve user account state and history can be found [here](https://orderly-dashboard.orderly.network/) If you are still having issues, please submit a ticket on our [Customer Service Portal](https://orderly-network.atlassian.net/servicedesk/customer/portal/3) # Stuck/delayed deposits Source: https://developer.woox.io/troubleshooting/user-issues/deposit-issues Deposits do not reflect immediately in user's account. If users are having issues with deposits please do the following: Check our [Dune dashboard](https://dune.com/orderly_network/orderly-support-dashboard) and check if deposit went through to any broker. Sometimes users deposit on one broker and expect the deposit to be reflected on another broker's site. If the deposit is seen on the Dune dashboard, the funds are in the user's account and most likely a front-end issue if the balance is not displaying. Make sure to refresh the dashboard before checking. Deposits times vary based on chain. Polygon deposit requires 500 block confirmations which takes about 20 minutes. If that wasn't sucessful, please search user's wallet address on [LayerZero explorer](https://layerzeroscan.com/). A message appears with Ordelry as a destination chain for any deposits we have received. * If a message is in-flight, the deposit is processing. * If a message is delivered, the deposit was processed. * If no message appears, Orderly has not received or processed the deposit. Please proceed to next step. **Example of a processed deposit on LZ scan** If that wasn't sucessful, please send a message to Orderly with * User's address * Deposit amount * Approximate time of deposit.