58 KiB
woo{docsify-ignore}
Kind: global class
Extends: Exchange
- fetchStatus
- fetchTime
- fetchMarkets
- fetchTrades
- fetchTradingFee
- fetchTradingFees
- fetchCurrencies
- createMarketBuyOrderWithCost
- createMarketSellOrderWithCost
- createTrailingAmountOrder
- createTrailingPercentOrder
- createOrder
- editOrder
- cancelOrder
- cancelAllOrders
- cancelAllOrdersAfter
- fetchOrder
- fetchOrders
- fetchOpenOrders
- fetchClosedOrders
- fetchOrderBook
- fetchOHLCV
- fetchOrderTrades
- fetchMyTrades
- fetchAccounts
- fetchBalance
- fetchDepositAddress
- fetchLedger
- fetchDeposits
- fetchWithdrawals
- fetchDepositsWithdrawals
- transfer
- fetchTransfers
- withdraw
- repayMargin
- fetchFundingHistory
- fetchFundingInterval
- fetchFundingRate
- fetchFundingRates
- fetchFundingRateHistory
- setPositionMode
- fetchLeverage
- setLeverage
- addMargin
- reduceMargin
- fetchPosition
- fetchPositions
- fetchConvertQuote
- createConvertTrade
- fetchConvertTrade
- fetchConvertTradeHistory
- fetchConvertCurrencies
- watchOrderBook
- watchTicker
- watchTickers
- watchBidsAsks
- watchOHLCV
- watchTrades
- watchOrders
- watchMyTrades
- watchPositions
- watchBalance
fetchStatus{docsify-ignore}
the latest known information on the availability of the exchange API
Kind: instance method of woo
Returns: object - a status structure
See: https://developer.woox.io/api-reference/endpoint/public_data/systemInfo
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.fetchStatus ([params])
fetchTime{docsify-ignore}
fetches the current integer timestamp in milliseconds from the exchange server
Kind: instance method of woo
Returns: int - the current integer timestamp in milliseconds from the exchange server
See: https://developer.woox.io/api-reference/endpoint/public_data/systemInfo
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.fetchTime ([params])
fetchMarkets{docsify-ignore}
retrieves data on all markets for woo
Kind: instance method of woo
Returns: Array<object> - an array of objects representing market data
See: https://developer.woox.io/api-reference/endpoint/public_data/instruments
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.fetchMarkets ([params])
fetchTrades{docsify-ignore}
get the list of most recent trades for a particular symbol
Kind: instance method of woo
Returns: Array<Trade> - a list of trade structures
See: https://developer.woox.io/api-reference/endpoint/public_data/marketTrades
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch trades for |
| since | int |
No | timestamp in ms of the earliest trade to fetch |
| limit | int |
No | the maximum amount of trades to fetch |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.fetchTrades (symbol[, since, limit, params])
fetchTradingFee{docsify-ignore}
fetch the trading fees for a market
Kind: instance method of woo
Returns: object - a fee structure
See: https://developer.woox.io/api-reference/endpoint/trading/get_tradingFee
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.portfolioMargin | boolean |
No | set to true if you would like to fetch trading fees in a portfolio margin account |
| params.subType | string |
No | "linear" or "inverse" |
woo.fetchTradingFee (symbol[, params])
fetchTradingFees{docsify-ignore}
fetch the trading fees for multiple markets
Kind: instance method of woo
Returns: object - a dictionary of fee structures indexed by market symbols
See: https://developer.woox.io/api-reference/endpoint/account/get_account_info
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.fetchTradingFees ([params])
fetchCurrencies{docsify-ignore}
fetches all available currencies on an exchange
Kind: instance method of woo
Returns: object - an associative dictionary of currencies
See: https://docs.woox.io/#available-token-public
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.fetchCurrencies ([params])
createMarketBuyOrderWithCost{docsify-ignore}
create a market buy order by providing the symbol and cost
Kind: instance method of woo
Returns: object - an order structure
See: https://docs.woox.io/#send-order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to create an order in |
| cost | float |
Yes | how much you want to trade in units of the quote currency |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.createMarketBuyOrderWithCost (symbol, cost[, params])
createMarketSellOrderWithCost{docsify-ignore}
create a market sell order by providing the symbol and cost
Kind: instance method of woo
Returns: object - an order structure
See: https://docs.woox.io/#send-order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to create an order in |
| cost | float |
Yes | how much you want to trade in units of the quote currency |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.createMarketSellOrderWithCost (symbol, cost[, params])
createTrailingAmountOrder{docsify-ignore}
create a trailing order by providing the symbol, type, side, amount, price and trailingAmount
Kind: instance method of woo
Returns: object - an order structure
See: https://docs.woox.io/#send-algo-order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to create an order in |
| type | string |
Yes | 'market' or 'limit' |
| side | string |
Yes | 'buy' or 'sell' |
| amount | float |
Yes | how much you want to trade in units of the base currency, or number of contracts |
| price | float |
No | the price for the order to be filled at, in units of the quote currency, ignored in market orders |
| trailingAmount | float |
Yes | the quote amount to trail away from the current market price |
| trailingTriggerPrice | float |
Yes | the price to activate a trailing order, default uses the price argument |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.createTrailingAmountOrder (symbol, type, side, amount[, price, trailingAmount, trailingTriggerPrice, params])
createTrailingPercentOrder{docsify-ignore}
create a trailing order by providing the symbol, type, side, amount, price and trailingPercent
Kind: instance method of woo
Returns: object - an order structure
See: https://docs.woox.io/#send-algo-order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to create an order in |
| type | string |
Yes | 'market' or 'limit' |
| side | string |
Yes | 'buy' or 'sell' |
| amount | float |
Yes | how much you want to trade in units of the base currency, or number of contracts |
| price | float |
No | the price for the order to be filled at, in units of the quote currency, ignored in market orders |
| trailingPercent | float |
Yes | the percent to trail away from the current market price |
| trailingTriggerPrice | float |
Yes | the price to activate a trailing order, default uses the price argument |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.createTrailingPercentOrder (symbol, type, side, amount[, price, trailingPercent, trailingTriggerPrice, params])
createOrder{docsify-ignore}
create a trade order
Kind: instance method of woo
Returns: object - an order structure
See
- https://developer.woox.io/api-reference/endpoint/trading/post_order
- https://developer.woox.io/api-reference/endpoint/trading/post_algo_order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to create an order in |
| type | string |
Yes | 'market' or 'limit' |
| side | string |
Yes | 'buy' or 'sell' |
| amount | float |
Yes | how much of currency you want to trade in units of base currency |
| price | float |
No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.marginMode | string |
No | for swap markets only 'cross' or 'isolated', default 'cross' |
| params.triggerPrice | float |
No | The price a trigger order is triggered at |
| params.takeProfit | object |
No | takeProfit object in params containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only) |
| params.takeProfit.triggerPrice | float |
No | take profit trigger price |
| params.stopLoss | object |
No | stopLoss object in params containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only) |
| params.stopLoss.triggerPrice | float |
No | stop loss trigger price |
| params.algoType | float |
No | 'STOP' or 'TRAILING_STOP' or 'OCO' or 'CLOSE_POSITION' |
| params.cost | float |
No | spot market buy only the quote quantity that can be used as an alternative for the amount |
| params.trailingAmount | string |
No | the quote amount to trail away from the current market price |
| params.trailingPercent | string |
No | the percent to trail away from the current market price |
| params.trailingTriggerPrice | string |
No | the price to trigger a trailing order, default uses the price argument |
| params.position_side | string |
No | 'SHORT' or 'LONG' - if position mode is HEDGE_MODE and the trading involves futures, then is required, otherwise this parameter is not required |
woo.createOrder (symbol, type, side, amount[, price, params])
editOrder{docsify-ignore}
edit a trade order
Kind: instance method of woo
Returns: object - an order structure
See
- https://docs.woox.io/#edit-order
- https://docs.woox.io/#edit-order-by-client_order_id
- https://docs.woox.io/#edit-algo-order
- https://docs.woox.io/#edit-algo-order-by-client_order_id
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | order id |
| symbol | string |
Yes | unified symbol of the market to create an order in |
| type | string |
Yes | 'market' or 'limit' |
| side | string |
Yes | 'buy' or 'sell' |
| amount | float |
Yes | how much of currency you want to trade in units of base currency |
| price | float |
No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.triggerPrice | float |
No | The price a trigger order is triggered at |
| params.stopLossPrice | float |
No | price to trigger stop-loss orders |
| params.takeProfitPrice | float |
No | price to trigger take-profit orders |
| params.trailingAmount | string |
No | the quote amount to trail away from the current market price |
| params.trailingPercent | string |
No | the percent to trail away from the current market price |
| params.trailingTriggerPrice | string |
No | the price to trigger a trailing order, default uses the price argument |
woo.editOrder (id, symbol, type, side, amount[, price, params])
cancelOrder{docsify-ignore}
cancels an open order
Kind: instance method of woo
Returns: object - An order structure
See
- https://developer.woox.io/api-reference/endpoint/trading/cancel_order
- https://developer.woox.io/api-reference/endpoint/trading/cancel_algo_order
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | order id |
| symbol | string |
Yes | unified symbol of the market the order was made in |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.trigger | boolean |
No | whether the order is a trigger/algo order |
woo.cancelOrder (id, symbol[, params])
cancelAllOrders{docsify-ignore}
cancel all open orders in a market
Kind: instance method of woo
Returns: object - an list of order structures
See
- https://developer.woox.io/api-reference/endpoint/trading/cancel_all_order
- https://developer.woox.io/api-reference/endpoint/trading/cancel_algo_orders
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.trigger | boolean |
No | whether the order is a trigger/algo order |
woo.cancelAllOrders (symbol[, params])
cancelAllOrdersAfter{docsify-ignore}
dead man's switch, cancel all orders after the given timeout
Kind: instance method of woo
Returns: object - the api result
See: https://developer.woox.io/api-reference/endpoint/trading/cancel_all_after
| Param | Type | Required | Description |
|---|---|---|---|
| timeout | number |
Yes | time in milliseconds, 0 represents cancel the timer |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.cancelAllOrdersAfter (timeout[, params])
fetchOrder{docsify-ignore}
fetches information on an order made by the user
Kind: instance method of woo
Returns: object - An order structure
See
- https://developer.woox.io/api-reference/endpoint/trading/get_order
- https://developer.woox.io/api-reference/endpoint/trading/get_algo_order
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | the order id |
| symbol | string |
Yes | unified symbol of the market the order was made in |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.trigger | boolean |
No | whether the order is a trigger/algo order |
woo.fetchOrder (id, symbol[, params])
fetchOrders{docsify-ignore}
fetches information on multiple orders made by the user
Kind: instance method of woo
Returns: Array<Order> - a list of order structures
See
- https://developer.woox.io/api-reference/endpoint/trading/get_orders
- https://developer.woox.io/api-reference/endpoint/trading/get_algo_orders
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the market orders were made in |
| since | int |
No | the earliest time in ms to fetch orders for |
| limit | int |
No | the maximum number of order structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.trigger | boolean |
No | whether the order is a trigger/algo order |
| params.isTriggered | boolean |
No | whether the order has been triggered (false by default) |
| params.side | string |
No | 'buy' or 'sell' |
| params.paginate | boolean |
No | set to true if you want to fetch orders with pagination |
woo.fetchOrders (symbol[, since, limit, params])
fetchOpenOrders{docsify-ignore}
fetches information on multiple orders made by the user
Kind: instance method of woo
Returns: Array<Order> - a list of order structures
See
- https://developer.woox.io/api-reference/endpoint/trading/get_orders
- https://developer.woox.io/api-reference/endpoint/trading/get_algo_orders
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the market orders were made in |
| since | int |
No | the earliest time in ms to fetch orders for |
| limit | int |
No | the maximum number of order structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.trigger | boolean |
No | whether the order is a trigger/algo order |
| params.isTriggered | boolean |
No | whether the order has been triggered (false by default) |
| params.side | string |
No | 'buy' or 'sell' |
| params.trailing | boolean |
No | set to true if you want to fetch trailing orders |
| params.paginate | boolean |
No | set to true if you want to fetch orders with pagination |
woo.fetchOpenOrders (symbol[, since, limit, params])
fetchClosedOrders{docsify-ignore}
fetches information on multiple orders made by the user
Kind: instance method of woo
Returns: Array<Order> - a list of order structures
See
- https://developer.woox.io/api-reference/endpoint/trading/get_orders
- https://developer.woox.io/api-reference/endpoint/trading/get_algo_orders
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the market orders were made in |
| since | int |
No | the earliest time in ms to fetch orders for |
| limit | int |
No | the maximum number of order structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.trigger | boolean |
No | whether the order is a trigger/algo order |
| params.isTriggered | boolean |
No | whether the order has been triggered (false by default) |
| params.side | string |
No | 'buy' or 'sell' |
| params.trailing | boolean |
No | set to true if you want to fetch trailing orders |
| params.paginate | boolean |
No | set to true if you want to fetch orders with pagination |
woo.fetchClosedOrders (symbol[, since, limit, params])
fetchOrderBook{docsify-ignore}
fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of woo
Returns: object - A dictionary of order book structures indexed by market symbols
See: https://developer.woox.io/api-reference/endpoint/public_data/orderbook
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the order book for |
| limit | int |
No | the maximum amount of order book entries to return |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.fetchOrderBook (symbol[, limit, params])
fetchOHLCV{docsify-ignore}
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of woo
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
See: https://developer.woox.io/api-reference/endpoint/public_data/klineHistory
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | string |
Yes | the length of time each candle represents |
| since | int |
No | timestamp in ms of the earliest candle to fetch |
| limit | int |
No | max=1000, max=100 when since is defined and is less than (now - (999 * (timeframe in ms))) |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.until | int |
No | the latest time in ms to fetch entries for |
woo.fetchOHLCV (symbol, timeframe[, since, limit, params])
fetchOrderTrades{docsify-ignore}
fetch all the trades made from a single order
Kind: instance method of woo
Returns: Array<object> - a list of trade structures
See: https://docs.woox.io/#get-trades
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | order id |
| symbol | string |
Yes | unified market symbol |
| since | int |
No | the earliest time in ms to fetch trades for |
| limit | int |
No | the maximum number of trades to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.fetchOrderTrades (id, symbol[, since, limit, params])
fetchMyTrades{docsify-ignore}
fetch all trades made by the user
Kind: instance method of woo
Returns: Array<Trade> - a list of trade structures
See: https://developer.woox.io/api-reference/endpoint/trading/get_transactions
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol |
| since | int |
No | the earliest time in ms to fetch trades for |
| limit | int |
No | the maximum number of trades structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.paginate | boolean |
No | set to true if you want to fetch trades with pagination |
woo.fetchMyTrades (symbol[, since, limit, params])
fetchAccounts{docsify-ignore}
fetch all the accounts associated with a profile
Kind: instance method of woo
Returns: object - a dictionary of account structures indexed by the account type
See
- https://developer.woox.io/api-reference/endpoint/account/get_account_info
- https://developer.woox.io/api-reference/endpoint/account/sub_accounts
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.fetchAccounts ([params])
fetchBalance{docsify-ignore}
query for balance and get the amount of funds available for trading or funds locked in orders
Kind: instance method of woo
Returns: object - a balance structure
See: https://docs.woox.io/#get-current-holding-get-balance-new
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.fetchBalance ([params])
fetchDepositAddress{docsify-ignore}
fetch the deposit address for a currency associated with this account
Kind: instance method of woo
Returns: object - an address structure
See: https://developer.woox.io/api-reference/endpoint/assets/get_wallet_deposit
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.fetchDepositAddress (code[, params])
fetchLedger{docsify-ignore}
fetch the history of changes, actions done by the user or operations that altered balance of the user
Kind: instance method of woo
Returns: object - a ledger structure
See: https://developer.woox.io/api-reference/endpoint/assets/get_wallet_history
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
No | unified currency code, default is undefined |
| since | int |
No | timestamp in ms of the earliest ledger entry, default is undefined |
| limit | int |
No | max number of ledger entries to return, default is undefined |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.fetchLedger ([code, since, limit, params])
fetchDeposits{docsify-ignore}
fetch all deposits made to an account
Kind: instance method of woo
Returns: Array<object> - a list of transaction structures
See: https://developer.woox.io/api-reference/endpoint/assets/get_wallet_history
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code |
| since | int |
No | the earliest time in ms to fetch deposits for |
| limit | int |
No | the maximum number of deposits structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.fetchDeposits (code[, since, limit, params])
fetchWithdrawals{docsify-ignore}
fetch all withdrawals made from an account
Kind: instance method of woo
Returns: Array<object> - a list of transaction structures
See: https://developer.woox.io/api-reference/endpoint/assets/get_wallet_history
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code |
| since | int |
No | the earliest time in ms to fetch withdrawals for |
| limit | int |
No | the maximum number of withdrawals structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.fetchWithdrawals (code[, since, limit, params])
fetchDepositsWithdrawals{docsify-ignore}
fetch history of deposits and withdrawals
Kind: instance method of woo
Returns: object - a list of transaction structure
See: https://developer.woox.io/api-reference/endpoint/assets/get_wallet_history
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
No | unified currency code for the currency of the deposit/withdrawals, default is undefined |
| since | int |
No | timestamp in ms of the earliest deposit/withdrawal, default is undefined |
| limit | int |
No | max number of deposit/withdrawals to return, default is undefined |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.fetchDepositsWithdrawals ([code, since, limit, params])
transfer{docsify-ignore}
transfer currency internally between wallets on the same account
Kind: instance method of woo
Returns: object - a transfer structure
See: https://docs.woox.io/#get-transfer-history
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code |
| amount | float |
Yes | amount to transfer |
| fromAccount | string |
Yes | account to transfer from |
| toAccount | string |
Yes | account to transfer to |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.transfer (code, amount, fromAccount, toAccount[, params])
fetchTransfers{docsify-ignore}
fetch a history of internal transfers made on an account
Kind: instance method of woo
Returns: Array<object> - a list of transfer structures
See: https://developer.woox.io/api-reference/endpoint/assets/get_transfer_history
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code of the currency transferred |
| since | int |
No | the earliest time in ms to fetch transfers for |
| limit | int |
No | the maximum number of transfers structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.until | int |
No | the latest time in ms to fetch entries for |
woo.fetchTransfers (code[, since, limit, params])
withdraw{docsify-ignore}
make a withdrawal
Kind: instance method of woo
Returns: object - a transaction structure
See: https://docs.woox.io/#token-withdraw
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code |
| amount | float |
Yes | the amount to withdraw |
| address | string |
Yes | the address to withdraw to |
| tag | string |
Yes | |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.withdraw (code, amount, address, tag[, params])
repayMargin{docsify-ignore}
repay borrowed margin and interest
Kind: instance method of woo
Returns: object - a margin loan structure
See: https://docs.woox.io/#repay-interest
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code of the currency to repay |
| amount | float |
Yes | the amount to repay |
| symbol | string |
Yes | not used by woo.repayMargin () |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.repayMargin (code, amount, symbol[, params])
fetchFundingHistory{docsify-ignore}
fetch the history of funding payments paid and received on this account
Kind: instance method of woo
Returns: object - a funding history structure
See: https://developer.woox.io/api-reference/endpoint/futures/get_fundingFee_history
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
No | unified market symbol |
| since | int |
No | the earliest time in ms to fetch funding history for |
| limit | int |
No | the maximum number of funding history structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters |
woo.fetchFundingHistory ([symbol, since, limit, params])
fetchFundingInterval{docsify-ignore}
fetch the current funding rate interval
Kind: instance method of woo
Returns: object - a funding rate structure
See: https://developer.woox.io/api-reference/endpoint/public_data/fundingRate
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.fetchFundingInterval (symbol[, params])
fetchFundingRate{docsify-ignore}
fetch the current funding rate
Kind: instance method of woo
Returns: object - a funding rate structure
See: https://developer.woox.io/api-reference/endpoint/public_data/fundingRate
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.fetchFundingRate (symbol[, params])
fetchFundingRates{docsify-ignore}
fetch the funding rate for multiple markets
Kind: instance method of woo
Returns: Array<object> - a list of funding rate structures, indexed by market symbols
See: https://developer.woox.io/api-reference/endpoint/public_data/fundingRate
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string>, undefined |
Yes | list of unified market symbols |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.fetchFundingRates (symbols[, params])
fetchFundingRateHistory{docsify-ignore}
fetches historical funding rate prices
Kind: instance method of woo
Returns: Array<object> - a list of funding rate structures
See: https://developer.woox.io/api-reference/endpoint/public_data/fundingRateHistory
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the funding rate history for |
| since | int |
No | timestamp in ms of the earliest funding rate to fetch |
| limit | int |
No | the maximum amount of funding rate structures to fetch |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.until | int |
No | timestamp in ms of the latest funding rate |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters |
woo.fetchFundingRateHistory (symbol[, since, limit, params])
setPositionMode{docsify-ignore}
set hedged to true or false for a market
Kind: instance method of woo
Returns: object - response from the exchange
See: https://developer.woox.io/api-reference/endpoint/futures/position_mode
| Param | Type | Required | Description |
|---|---|---|---|
| hedged | bool |
Yes | set to true to use HEDGE_MODE, false for ONE_WAY |
| symbol | string |
Yes | not used by woo setPositionMode |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.setPositionMode (hedged, symbol[, params])
fetchLeverage{docsify-ignore}
fetch the set leverage for a market
Kind: instance method of woo
Returns: object - a leverage structure
See
- https://developer.woox.io/api-reference/endpoint/account/get_account_info
- https://developer.woox.io/api-reference/endpoint/futures/get_leverage
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.marginMode | string |
No | for swap markets only 'cross' or 'isolated' |
| params.positionMode | string |
No | for swap markets only 'ONE_WAY' or 'HEDGE_MODE' |
woo.fetchLeverage (symbol[, params])
setLeverage{docsify-ignore}
set the level of leverage for a market
Kind: instance method of woo
Returns: object - response from the exchange
See
- https://developer.woox.io/api-reference/endpoint/spot_margin/set_leverage
- https://developer.woox.io/api-reference/endpoint/futures/set_leverage
| Param | Type | Required | Description |
|---|---|---|---|
| leverage | float |
Yes | the rate of leverage (1, 2, 3, 4 or 5 for spot markets, 1, 2, 3, 4, 5, 10, 15, 20 for swap markets) |
| symbol | string |
No | unified market symbol (is mandatory for swap markets) |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.marginMode | string |
No | for swap markets only 'cross' or 'isolated' |
| params.positionMode | string |
No | for swap markets only 'ONE_WAY' or 'HEDGE_MODE' |
woo.setLeverage (leverage[, symbol, params])
addMargin{docsify-ignore}
add margin
Kind: instance method of woo
Returns: object - a margin structure
See: https://docs.woox.io/#update-isolated-margin-setting
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol |
| amount | float |
Yes | amount of margin to add |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.position_side | string |
No | 'LONG' or 'SHORT' in hedge mode, 'BOTH' in one way mode |
woo.addMargin (symbol, amount[, params])
reduceMargin{docsify-ignore}
remove margin from a position
Kind: instance method of woo
Returns: object - a margin structure
See: https://docs.woox.io/#update-isolated-margin-setting
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol |
| amount | float |
Yes | amount of margin to remove |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.position_side | string |
No | 'LONG' or 'SHORT' in hedge mode, 'BOTH' in one way mode |
woo.reduceMargin (symbol, amount[, params])
fetchPosition{docsify-ignore}
fetch data on an open position
Kind: instance method of woo
Returns: object - a position structure
See: https://developer.woox.io/api-reference/endpoint/futures/get_positions
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the market the position is held in |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.fetchPosition (symbol[, params])
fetchPositions{docsify-ignore}
fetch all open positions
Kind: instance method of woo
Returns: Array<object> - a list of position structure
See: https://developer.woox.io/api-reference/endpoint/futures/get_positions
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
No | list of unified market symbols |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.fetchPositions ([symbols, params])
fetchConvertQuote{docsify-ignore}
fetch a quote for converting from one currency to another
Kind: instance method of woo
Returns: object - a conversion structure
See: https://docs.woox.io/#get-quote-rfq
| Param | Type | Required | Description |
|---|---|---|---|
| fromCode | string |
Yes | the currency that you want to sell and convert from |
| toCode | string |
Yes | the currency that you want to buy and convert into |
| amount | float |
No | how much you want to trade in units of the from currency |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.fetchConvertQuote (fromCode, toCode[, amount, params])
createConvertTrade{docsify-ignore}
convert from one currency to another
Kind: instance method of woo
Returns: object - a conversion structure
See: https://docs.woox.io/#send-quote-rft
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | the id of the trade that you want to make |
| fromCode | string |
Yes | the currency that you want to sell and convert from |
| toCode | string |
Yes | the currency that you want to buy and convert into |
| amount | float |
No | how much you want to trade in units of the from currency |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.createConvertTrade (id, fromCode, toCode[, amount, params])
fetchConvertTrade{docsify-ignore}
fetch the data for a conversion trade
Kind: instance method of woo
Returns: object - a conversion structure
See: https://docs.woox.io/#get-quote-trade
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | the id of the trade that you want to fetch |
| code | string |
No | the unified currency code of the conversion trade |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.fetchConvertTrade (id[, code, params])
fetchConvertTradeHistory{docsify-ignore}
fetch the users history of conversion trades
Kind: instance method of woo
Returns: Array<object> - a list of conversion structures
See: https://docs.woox.io/#get-quote-trades
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
No | the unified currency code |
| since | int |
No | the earliest time in ms to fetch conversions for |
| limit | int |
No | the maximum number of conversion structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.until | int |
No | timestamp in ms of the latest conversion to fetch |
woo.fetchConvertTradeHistory ([code, since, limit, params])
fetchConvertCurrencies{docsify-ignore}
fetches all available currencies that can be converted
Kind: instance method of woo
Returns: object - an associative dictionary of currencies
See: https://docs.woox.io/#get-quote-asset-info
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.fetchConvertCurrencies ([params])
watchOrderBook{docsify-ignore}
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of woo
Returns: object - A dictionary of order book structures indexed by market symbols
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the order book for |
| limit | int |
No | the maximum amount of order book entries to return. |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.method | string |
No | either (default) 'orderbook' or 'orderbookupdate', default is 'orderbook' |
woo.watchOrderBook (symbol[, limit, params])
watchTicker{docsify-ignore}
watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
Kind: instance method of woo
Returns: object - a ticker structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the ticker for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.watchTicker (symbol[, params])
watchTickers{docsify-ignore}
watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
Kind: instance method of woo
Returns: object - a ticker structure
See: https://docs.woox.io/#24h-tickers
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
Yes | unified symbol of the market to fetch the ticker for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.watchTickers (symbols[, params])
watchBidsAsks{docsify-ignore}
watches best bid & ask for symbols
Kind: instance method of woo
Returns: object - a ticker structure
See: https://docs.woox.io/#bbos
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
Yes | unified symbol of the market to fetch the ticker for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.watchBidsAsks (symbols[, params])
watchOHLCV{docsify-ignore}
watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of woo
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
See: https://docs.woox.io/#k-line
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | string |
Yes | the length of time each candle represents |
| since | int |
No | timestamp in ms of the earliest candle to fetch |
| limit | int |
No | the maximum amount of candles to fetch |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.watchOHLCV (symbol, timeframe[, since, limit, params])
watchTrades{docsify-ignore}
watches information on multiple trades made in a market
Kind: instance method of woo
Returns: Array<object> - a list of trade structures
See: https://docs.woox.io/#trade
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the market trades were made in |
| since | int |
No | the earliest time in ms to fetch trades for |
| limit | int |
No | the maximum number of trade structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.watchTrades (symbol[, since, limit, params])
watchOrders{docsify-ignore}
watches information on multiple orders made by the user
Kind: instance method of woo
Returns: Array<object> - a list of order structures
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the market orders were made in |
| since | int |
No | the earliest time in ms to fetch orders for |
| limit | int |
No | the maximum number of order structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.trigger | bool |
No | true if trigger order |
woo.watchOrders (symbol[, since, limit, params])
watchMyTrades{docsify-ignore}
watches information on multiple trades made by the user
Kind: instance method of woo
Returns: Array<object> - a list of trade structures
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the market orders were made in |
| since | int |
No | the earliest time in ms to fetch orders for |
| limit | int |
No | the maximum number of order structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.trigger | bool |
No | true if trigger order |
woo.watchMyTrades (symbol[, since, limit, params])
watchPositions{docsify-ignore}
watch all open positions
Kind: instance method of woo
Returns: Array<object> - a list of position structure
See: https://docs.woox.io/#position-push
| Param | Type | Description |
|---|---|---|
| symbols | Array<string>, undefined |
list of unified market symbols |
| since | ||
| limit | ||
| params | object |
extra parameters specific to the exchange API endpoint |
woo.watchPositions (symbols, since, limit, params[])
watchBalance{docsify-ignore}
watch balance and get the amount of funds available for trading or funds locked in orders
Kind: instance method of woo
Returns: object - a balance structure
See: https://docs.woox.io/#balance
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
woo.watchBalance ([params])