Type/to search
Built-in Functions
Structures
Built-in Variables and Constants
Conventions
Exchanges
Capability Matrix
Centralized Exchanges
AscendEx
Backpack
BigONE
Binance
Bitfinex
bitFlyer
Bitget
Bithumb
Bitstamp
Bybit
Coincheck
Coinone
CoinW
Crypto.com
DeepCoin
Deribit
DigiFinex
Gate
Gemini
HashKey
HitBTC
HTX
Korbit
Kraken
KuCoin
LBank
MEXC
OKX
Poloniex
Upbit
WEEX
WOO X
Zaif
Decentralized Exchanges (DEX)
Prediction Markets
Securities and Futures
On-chain & Custom

WOO (Spot): WOO X spot trading over the WOO X REST API (api.woox.io), with native take-profit, stop-loss and OCO conditional orders. The API KEY configuration needs the Access Key, Secret Key and Application Id. The account can be switched between margin mode and pure spot mode with exchange.IO("trade_margin") and exchange.IO("trade_normal"); use Futures_WOO for perpetual contracts.

Futures_WOO (Futures): WOO X perpetual contracts over the WOO X REST API (api.woox.io), with no delivery contracts; native take-profit, stop-loss and OCO conditional orders are supported. The API KEY configuration needs the Access Key, Secret Key and Application Id (all three must be filled in).

Names and Configuration
exchange.GetName()TypeAliases
WOOSpotWOOX
Futures_WOOFutures—

✓ marks the exchange objects that have the field.

FieldWOOFutures_WOORequiredDescription
Access Key✓✓Yes—
Secret Key✓✓Yes—
Application Id✓YesThe Application ID of the API KEY shown on the WOO X API management page, used to check that balance responses belong to this account; required.
Application Id✓YesThe Application ID of the API KEY shown on the WOO X API management page, used to check that account responses belong to this account; required.

Trading Pairs and Contract Codes
WOO (Spot)

Pair examples: BTC_USDT, ETH_USDT

Trading pairs are written BTC_USDT, matching the WOO X native code SPOT_BTC_USDT. This exchange object trades spot only; symbols with a contract suffix (such as BTC_USDT.swap) are rejected; use Futures_WOO for perpetual contracts.

Futures_WOO (Futures)

Pair examples: BTC_USDT

Trading pairs are written BTC_USDT, matching the WOO X native code PERP_BTC_USDT.

Contract codeDescription
swapPerpetual contract.

WOO X lists perpetual contracts only; other contract codes are rejected. Order amounts are in the base currency (CtVal is 1 in exchange.GetMarkets()).

Exchange-specific IO Commands
WOO (Spot)
CommandArgumentsDescription
trade_margin—Switches the account to margin mode (MARGIN) by sending a settings request to the exchange (POST /v1/client/account_mode); returns true once the exchange confirms. This is an account-level setting.
trade_normal—Switches the account to pure spot mode (PURE_SPOT) by sending a settings request to the exchange; returns true once the exchange confirms. This is an account-level setting.
apimethod, path[, params[, raw]]Call a WOO X endpoint directly; path may be a full URL. (more below the table)

The rest of the longer descriptions in the table:

  • api: The signing rule follows /v1/ or /v3/ in the path; GET parameters go into the query string, other methods send a form body for v1 and a JSON body for v3. Paths containing /public/ are unsigned by default and all others signed; the sign argument can set it explicitly, and unsigned requests are also sent with the given HTTP method. raw is not a request body but a parameter table (a JSON object) that replaces params entirely when non-empty and is signed as usual; for v3 JSON bodies its object, array, number and boolean values are kept as they are. Spot and futures behave the same for this command. Returns: The whole exchange response (data is not unwrapped for either v1 or v3 endpoints); an error is raised when the response success is not true.

For the common commands base and currency see exchange.IO.

Futures_WOO (Futures)
CommandArgumentsDescription
crossboolCross (true) / isolated (false) margin. Only changes the local setting without sending a request; subsequent orders, conditional orders and exchange.SetMarginLevel() carry it. Cross margin by default.
dualboolHedge (true) / one-way (false) position mode, sent to the exchange (POST /v1/client/position_mode); after it succeeds the connector places orders for hedge mode (both regular and conditional orders carry the position side).
apimethod, path[, params[, raw]]Call a WOO X endpoint directly; path may be a full URL. (more below the table)

The rest of the longer descriptions in the table:

  • api: The signing rule follows /v1/ or /v3/ in the path; GET parameters go into the query string, other methods send a form body for v1 and a JSON body for v3. Paths containing /public/ are unsigned by default and all others signed; the sign argument can set it explicitly, and unsigned requests are also sent with the given HTTP method. raw is not a request body but a parameter table (a JSON object) that replaces params entirely when non-empty and is signed as usual; for v3 JSON bodies its object, array, number and boolean values are kept as they are. Spot and futures behave the same for this command. Returns: The whole exchange response (data is not unwrapped for either v1 or v3 endpoints); an error is raised when the response success is not true.

For the common commands base and currency see exchange.IO.

Function Support
All exchange objects

Not supported (the call fails with an error and returns null): exchange.GetTickers.

WOO (Spot)

Served through a fallback:

  • exchange.GetRecords: Native periods are 1m, 5m, 15m, 30m, 1h, 4h, 12h, 1d, 1w, 1M; other periods are synthesized by the docker.
Futures_WOO (Futures)

Served through a fallback:

  • exchange.GetRecords: Native periods are 1m, 5m, 15m, 30m, 1h, 4h, 12h, 1d, 1w, 1M, 1y; other periods are synthesized by the docker.

Margin, Account and Simulation
Futures_WOO (Futures)

Margin mode: Choose cross/isolated margin with exchange.IO("cross", bool); it is a local setting carried with every order (cross by default). exchange.SetMarginLevel() sets leverage per contract and carries the current cross/isolated setting.

Position mode: Switch hedge/one-way mode with exchange.IO("dual", bool). The connector does not detect the account's position mode: if the account is already in hedge mode, call exchange.IO("dual", true) at the start of every run, otherwise orders lack the position side and are rejected by the exchange. In hedge mode exchange.SetMarginLevel() sets the same leverage on both the long and the short side in one call (it fails if either side fails, and the error names the side that was already set), regardless of the direction set by exchange.SetDirection(); in one-way mode it is set once.

Notes
All exchange objects
  • exchange.ModifyOrder() modifies the price and amount in place, keeping the order ID.
WOO (Spot)
  • The amount of a market buy order is the quote-currency amount to spend (WOO X's order_amount); a market sell order is in the base currency. When queried, both Amount and DealAmount of a regular market buy order are the filled base-currency quantity.
  • WOO X spot has no 24-hour ticker endpoint; exchange.GetTicker() is built from the latest 24 one-hour K-lines (open, high, low, volume) and the order book (best bid and ask), requesting two endpoints per call.
  • Conditional orders support take-profit, stop-loss and OCO; exchange.ModifyConditionOrder() can modify take-profit and stop-loss orders only, not OCO conditional orders.
  • exchange.GetConditionOrders() queries one trading pair only: when omitted or empty it queries the current trading pair.
  • exchange.GetHistoryOrders() and exchange.GetHistoryConditionOrders() query one trading pair only: without symbol they query the current trading pair, and an empty string fails.
Futures_WOO (Futures)
  • Conditional orders support take-profit, stop-loss and OCO, with the trigger price type fixed to MARKET_PRICE; exchange.ModifyConditionOrder() can modify take-profit and stop-loss orders only (trigger price, order price and amount, keeping the order ID), not OCO conditional orders.
  • The Rate of exchange.GetFundings() is the exchange's estimated funding rate for the next settlement and Time is the next settlement time; batch queries are supported.
  • In exchange.GetPositions(), Profit is computed as (mark price − average open price) × position size and Margin is estimated as average open price × position size ÷ leverage; the position's margin mode is the marginMode in the exchange's position data (one account can hold both cross and isolated positions), independent of the local exchange.IO("cross", bool) order setting.
  • Like the open-order queries, exchange.GetHistoryOrders() and exchange.GetHistoryConditionOrders() accept ranges such as USDT.swap: the exchange is queried without a trading pair and the results are filtered by the range, with limit counting only orders inside the range.