Skip to content
github-actions[bot] edited this page Jun 11, 2026 · 3 revisions

oxfun{docsify-ignore}

Kind: global class
Extends: Exchange

fetchMarkets{docsify-ignore}

retrieves data on all markets for bitmex

Kind: instance method of oxfun
Returns: Array<object> - an array of objects representing market data

See: https://docs.ox.fun/?json#get-v3-markets

Param Type Required Description
params object No extra parameters specific to the exchange API endpoint
oxfun.fetchMarkets (params?)

fetchCurrencies{docsify-ignore}

fetches all available currencies on an exchange

Kind: instance method of oxfun
Returns: dict - an associative dictionary of currencies

See: https://docs.ox.fun/?json#get-v3-assets

Param Type Required Description
params dict No extra parameters specific to the exchange API endpoint
oxfun.fetchCurrencies (params?)

fetchTickers{docsify-ignore}

fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market

Kind: instance method of oxfun
Returns: object - a dictionary of ticker structures

See: https://docs.ox.fun/?json#get-v3-tickers

Param Type Required Description
symbols Array<string>, undefined Yes unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
params object No extra parameters specific to the exchange API endpoint
oxfun.fetchTickers (symbols, params?)

fetchTicker{docsify-ignore}

fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market

Kind: instance method of oxfun
Returns: object - a ticker structure

See: https://docs.ox.fun/?json#get-v3-tickers

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
oxfun.fetchTicker (symbol, 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 oxfun
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume

See: https://docs.ox.fun/?json#get-v3-candles

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 (default 24 hours ago)
limit int No the maximum amount of candles to fetch (default 200, max 500)
params object No extra parameters specific to the exchange API endpoint
params.until int No timestamp in ms of the latest candle to fetch (default now)
oxfun.fetchOHLCV (symbol, timeframe, 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 oxfun
Returns: object - A dictionary of order book structures indexed by market symbols

See: https://docs.ox.fun/?json#get-v3-depth

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 (default 5, max 100)
params object No extra parameters specific to the exchange API endpoint
oxfun.fetchOrderBook (symbol, limit?, params?)

fetchFundingRates{docsify-ignore}

fetch the current funding rates for multiple markets

Kind: instance method of oxfun
Returns: Array<Order> - an array of funding rate structures

See: https://docs.ox.fun/?json#get-v3-funding-estimates

Param Type Required Description
symbols Array<string> Yes unified market symbols
params object No extra parameters specific to the exchange API endpoint
oxfun.fetchFundingRates (symbols, params?)

fetchFundingRate{docsify-ignore}

fetch the current funding rates for a symbol

Kind: instance method of oxfun
Returns: Array<Order> - an array of funding rate structures

See: https://docs.ox.fun/?json#get-v3-funding-estimates

Param Type Required Description
symbol string Yes unified market symbols
params object No extra parameters specific to the exchange API endpoint
oxfun.fetchFundingRate (symbol, params?)

fetchFundingRateHistory{docsify-ignore}

Fetches the history of funding rates

Kind: instance method of oxfun
Returns: Array<Trade> - a list of trade structures

See: https://docs.ox.fun/?json#get-v3-funding-rates

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 (default 24 hours ago)
limit int No the maximum amount of trades to fetch (default 200, max 500)
params object No extra parameters specific to the exchange API endpoint
params.until int No timestamp in ms of the latest trade to fetch (default now)
oxfun.fetchFundingRateHistory (symbol, since?, limit?, params?)

fetchFundingHistory{docsify-ignore}

fetches the history of funding payments

Kind: instance method of oxfun
Returns: Array<Trade> - a list of trade structures

See: https://docs.ox.fun/?json#get-v3-funding

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 (default 24 hours ago)
limit int No the maximum amount of trades to fetch (default 200, max 500)
params object No extra parameters specific to the exchange API endpoint
params.until int No timestamp in ms of the latest trade to fetch (default now)
oxfun.fetchFundingHistory (symbol, since?, limit?, params?)

fetchLeverageTiers{docsify-ignore}

retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes, if a market has a leverage tier of 0, then the leverage tiers cannot be obtained for this market

Kind: instance method of oxfun
Returns: object - a dictionary of leverage tiers structures, indexed by market symbols

See: https://docs.ox.fun/?json#get-v3-leverage-tiers

Param Type Required Description
symbols Array<string> No list of unified market symbols
params object No extra parameters specific to the exchange API endpoint
oxfun.fetchLeverageTiers (symbols?, params?)

fetchTrades{docsify-ignore}

get the list of most recent trades for a particular symbol

Kind: instance method of oxfun
Returns: Array<Trade> - a list of trade structures

See: https://docs.ox.fun/?json#get-v3-exchange-trades

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 (default 24 hours ago)
limit int No the maximum amount of trades to fetch (default 200, max 500)
params object No extra parameters specific to the exchange API endpoint
params.until int No timestamp in ms of the latest trade to fetch (default now)
oxfun.fetchTrades (symbol, since?, limit?, params?)

fetchMyTrades{docsify-ignore}

fetch all trades made by the user

Kind: instance method of oxfun
Returns: Array<Trade> - a list of trade structures

See: https://docs.ox.fun/?json#get-v3-trades

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 amount of trades to fetch (default 200, max 500)
params object No extra parameters specific to the exchange API endpoint
params.until int No timestamp in ms of the latest trade to fetch (default now)
oxfun.fetchMyTrades (symbol, since?, limit?, 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 oxfun
Returns: object - a balance structure

See: https://docs.ox.fun/?json#get-v3-balances

Param Type Required Description
params object No extra parameters specific to the exchange API endpoint
params.asset string No currency id, if empty the exchange returns info about all currencies
params.subAcc string No Name of sub account. If no subAcc is given, then the response contains only the account linked to the API-Key.
oxfun.fetchBalance (params?)

fetchAccounts{docsify-ignore}

fetch subaccounts associated with a profile

Kind: instance method of oxfun
Returns: object - a dictionary of account structures indexed by the account type

See: https://docs.ox.fun/?json#get-v3-account-names

Param Type Required Description
params object No extra parameters specific to the exchange API endpoint
oxfun.fetchAccounts (params?)

transfer{docsify-ignore}

transfer currency internally between wallets on the same account

Kind: instance method of oxfun
Returns: object - a transfer structure

See: https://docs.ox.fun/?json#post-v3-transfer

Param Type Required Description
code string Yes unified currency code
amount float Yes amount to transfer
fromAccount string Yes account id to transfer from
toAccount string Yes account id to transfer to
params object No extra parameters specific to the exchange API endpoint
oxfun.transfer (code, amount, fromAccount, toAccount, params?)

fetchTransfers{docsify-ignore}

fetch a history of internal transfers made on an account

Kind: instance method of oxfun
Returns: Array<object> - a list of transfer structures

See: https://docs.ox.fun/?json#get-v3-transfer

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 (default 24 hours ago)
limit int No the maximum number of transfer structures to retrieve (default 50, max 200)
params object No extra parameters specific to the exchange API endpoint
params.until int No the latest time in ms to fetch transfers for (default time now)
oxfun.fetchTransfers (code, since?, limit?, params?)

fetchDepositAddress{docsify-ignore}

fetch the deposit address for a currency associated with this account

Kind: instance method of oxfun
Returns: object - an address structure

See: https://docs.ox.fun/?json#get-v3-deposit-addresses

Param Type Required Description
code string Yes unified currency code
params object No extra parameters specific to the exchange API endpoint
params.network string No network for fetch deposit address
oxfun.fetchDepositAddress (code, params?)

fetchDeposits{docsify-ignore}

fetch all deposits made to an account

Kind: instance method of oxfun
Returns: Array<object> - a list of transfer structures

See: https://docs.ox.fun/?json#get-v3-deposit

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 (default 24 hours ago)
limit int No the maximum number of transfer structures to retrieve (default 50, max 200)
params object No extra parameters specific to the exchange API endpoint
params.until int No the latest time in ms to fetch transfers for (default time now)
oxfun.fetchDeposits (code, since?, limit?, params?)

fetchWithdrawals{docsify-ignore}

fetch all withdrawals made from an account

Kind: instance method of oxfun
Returns: Array<object> - a list of transaction structures

See: https://docs.ox.fun/?json#get-v3-withdrawal

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 (default 24 hours ago)
limit int No the maximum number of transfer structures to retrieve (default 50, max 200)
params object No extra parameters specific to the exchange API endpoint
params.until int No the latest time in ms to fetch transfers for (default time now)
oxfun.fetchWithdrawals (code, since?, limit?, params?)

withdraw{docsify-ignore}

make a withdrawal

Kind: instance method of oxfun
Returns: object - a transaction structure

See: https://docs.ox.fun/?json#post-v3-withdrawal

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
params.network string No network for withdraw
params.externalFee bool No if false, then the fee is taken from the quantity, also with the burn fee for asset SOLO EXCHANGE SPECIFIC PARAMETERS
params.tfaType string No GOOGLE, or AUTHY_SECRET, or YUBIKEY, for 2FA
params.code string No 2FA code
oxfun.withdraw (code, amount, address, tag, params?)

fetchPositions{docsify-ignore}

fetch all open positions

Kind: instance method of oxfun
Returns: Array<object> - a list of position structure

See: https://docs.ox.fun/?json#get-v3-positions

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
params.subAcc boolean No
oxfun.fetchPositions (symbols, params?)

createOrder{docsify-ignore}

create a trade order

Kind: instance method of oxfun
Returns: object - an order structure

See: https://docs.ox.fun/?json#post-v3-orders-place

Param Type Required Description
symbol string Yes unified symbol of the market to create an order in
type string Yes 'market', 'limit', 'STOP_LIMIT' or 'STOP_MARKET'
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.clientOrderId int No a unique id for the order
params.timestamp int No in milliseconds. If an order reaches the matching engine and the current timestamp exceeds timestamp + recvWindow, then the order will be rejected.
params.recvWindow int No in milliseconds. If an order reaches the matching engine and the current timestamp exceeds timestamp + recvWindow, then the order will be rejected. If timestamp is provided without recvWindow, then a default recvWindow of 1000ms is used.
params.responseType string No FULL or ACK
params.cost float No the quote quantity that can be used as an alternative for the amount for market buy orders
params.triggerPrice float No The price at which a trigger order is triggered at
params.limitPrice float No Limit price for the STOP_LIMIT order
params.postOnly bool No if true, the order will only be posted if it will be a maker order
params.timeInForce string No GTC (default), IOC, FOK, PO, MAKER_ONLY or MAKER_ONLY_REPRICE (reprices order to the best maker only price if the specified price were to lead to a taker trade)
params.selfTradePrevention string No NONE, EXPIRE_MAKER, EXPIRE_TAKER or EXPIRE_BOTH for more info check here https://docs.ox.fun/?json#self-trade-prevention-modes
params.displayQuantity string No for an iceberg order, pass both quantity and displayQuantity fields in the order request
oxfun.createOrder (symbol, type, side, amount, price?, params?)

createOrders{docsify-ignore}

create a list of trade orders

Kind: instance method of oxfun
Returns: object - an order structure

See: https://docs.ox.fun/?json#post-v3-orders-place

Param Type Required Description
orders Array Yes list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
params object No extra parameters specific to the exchange API endpoint
params.timestamp int No for all orders in milliseconds. If orders reach the matching engine and the current timestamp exceeds timestamp + recvWindow, then all orders will be rejected.
params.recvWindow int No for all orders in milliseconds. If orders reach the matching engine and the current timestamp exceeds timestamp + recvWindow, then all orders will be rejected. If timestamp is provided without recvWindow, then a default recvWindow of 1000ms is used.
params.responseType string No for all orders FULL or ACK
oxfun.createOrders (orders, params?)

createMarketBuyOrderWithCost{docsify-ignore}

create a market buy order by providing the symbol and cost

Kind: instance method of oxfun
Returns: object - an order structure

See: https://open.big.one/docs/spot_orders.html#create-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
oxfun.createMarketBuyOrderWithCost (symbol, cost, params?)

fetchOrder{docsify-ignore}

fetches information on an order made by the user

Kind: instance method of oxfun
Returns: object - An order structure

See: https://docs.ox.fun/?json#get-v3-orders-status

Param Type Required Description
id string Yes a unique id for the order
symbol string No not used by oxfun fetchOrder
params object No extra parameters specific to the exchange API endpoint
params.clientOrderId int No the client order id of the order
oxfun.fetchOrder (id, symbol?, params?)

fetchOpenOrders{docsify-ignore}

fetch all unfilled currently open orders

Kind: instance method of oxfun
Returns: Array<Order> - a list of order structures

See: https://docs.ox.fun/?json#get-v3-orders-working

Param Type Required Description
symbol string Yes unified market symbol
since int No the earliest time in ms to fetch open orders for
limit int No the maximum number of open orders structures to retrieve
params object No extra parameters specific to the exchange API endpoint
params.orderId int No a unique id for the order
params.clientOrderId int No the client order id of the order
oxfun.fetchOpenOrders (symbol, since?, limit?, params?)

cancelOrder{docsify-ignore}

cancels an open order

Kind: instance method of oxfun
Returns: object - An order structure

See: https://docs.ox.fun/?json#delete-v3-orders-cancel

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.clientOrderId int No a unique id for the order
params.timestamp int No in milliseconds
params.recvWindow int No in milliseconds
params.responseType string No 'FULL' or 'ACK'
oxfun.cancelOrder (id, symbol, params?)

cancelAllOrders{docsify-ignore}

cancel all open orders

Kind: instance method of oxfun
Returns: object - response from exchange

See: https://docs.ox.fun/?json#delete-v3-orders-cancel-all

Param Type Required Description
symbol string Yes unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
params object No extra parameters specific to the exchange API endpoint
oxfun.cancelAllOrders (symbol, params?)

cancelOrders{docsify-ignore}

cancel multiple orders

Kind: instance method of oxfun
Returns: object - an list of order structures

See: https://docs.ox.fun/?json#delete-v3-orders-cancel

Param Type Required Description
ids Array<string> Yes order ids
symbol string No unified market symbol
params object No extra parameters specific to the exchange API endpoint
params.timestamp int No in milliseconds
params.recvWindow int No in milliseconds
params.responseType string No 'FULL' or 'ACK'
oxfun.cancelOrders (ids, symbol?, params?)

watchTrades{docsify-ignore}

watches information on multiple trades made in a market

Kind: instance method of oxfun
Returns: Array<object> - a list of trade structures

See: https://docs.ox.fun/?json#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 orders for
limit int No the maximum number of trade structures to retrieve
params object No extra parameters specific to the exchange API endpoint
params.tag int, string No If given it will be echoed in the reply and the max size of tag is 32
oxfun.watchTrades (symbol, since?, limit?, params?)

watchTradesForSymbols{docsify-ignore}

get the list of most recent trades for a particular symbol

Kind: instance method of oxfun
Returns: Array<object> - a list of trade structures

See: https://docs.ox.fun/?json#trade

Param Type Required Description
symbols Array<string> Yes
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
params.tag int, string No If given it will be echoed in the reply and the max size of tag is 32
oxfun.watchTradesForSymbols (symbols, since?, limit?, 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 oxfun
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume

See: https://docs.ox.fun/?json#candles

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
params.tag int, string No If given it will be echoed in the reply and the max size of tag is 32
oxfun.watchOHLCV (symbol, timeframe, since?, limit?, params?)

watchOHLCVForSymbols{docsify-ignore}

watches historical candlestick data containing the open, high, low, and close price, and the volume of a market

Kind: instance method of oxfun
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume

See: https://docs.ox.fun/?json#candles

Param Type Required Description
symbolsAndTimeframes Array<Array<string>> Yes array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example 'BTC/USDT', '1m'], ['LTC/USDT', '5m'
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
params.tag int, string No If given it will be echoed in the reply and the max size of tag is 32
oxfun.watchOHLCVForSymbols (symbolsAndTimeframes, since?, limit?, params?)

watchOrderBook{docsify-ignore}

watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data

Kind: instance method of oxfun
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
oxfun.watchOrderBook (symbol, limit?, params?)

watchOrderBookForSymbols{docsify-ignore}

watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data

Kind: instance method of oxfun
Returns: object - A dictionary of order book structures indexed by market symbols

See

Param Type Required Description
symbols Array<string> Yes unified array of symbols
limit int No the maximum amount of order book entries to return
params object No extra parameters specific to the exchange API endpoint
params.tag int, string No If given it will be echoed in the reply and the max size of tag is 32
oxfun.watchOrderBookForSymbols (symbols, 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 oxfun
Returns: object - a ticker structure

See: https://docs.ox.fun/?json#ticker

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
params.tag int, string No If given it will be echoed in the reply and the max size of tag is 32
oxfun.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 oxfun
Returns: object - a ticker structure

See: https://docs.ox.fun/?json#ticker

Param Type Required Description
symbols Array<string> No unified symbol of the market to fetch the ticker for
params object No extra parameters specific to the exchange API endpoint
params.tag int, string No If given it will be echoed in the reply and the max size of tag is 32
oxfun.watchTickers (symbols?, params?)

watchBidsAsks{docsify-ignore}

watches best bid & ask for symbols

Kind: instance method of oxfun
Returns: object - a ticker structure

See: https://docs.ox.fun/?json#best-bid-ask

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
oxfun.watchBidsAsks (symbols, params?)

watchBalance{docsify-ignore}

watch balance and get the amount of funds available for trading or funds locked in orders

Kind: instance method of oxfun
Returns: object - a balance structure

See: https://docs.ox.fun/?json#balance-channel

Param Type Required Description
params object No extra parameters specific to the exchange API endpoint
params.tag int, string No If given it will be echoed in the reply and the max size of tag is 32
oxfun.watchBalance (params?)

watchPositions{docsify-ignore}

watch all open positions

Kind: instance method of oxfun
Returns: Array<object> - a list of position structure

See: https://docs.ox.fun/?json#position-channel

Param Type Required Description
symbols Array<string> No list of unified market symbols
since int No timestamp in ms of the earliest position to fetch
limit int No the maximum number of positions to fetch
params object No extra parameters specific to the exchange API endpoint
params.tag int, string No If given it will be echoed in the reply and the max size of tag is 32
oxfun.watchPositions (symbols?, since?, limit?, params?)

watchOrders{docsify-ignore}

watches information on multiple orders made by the user

Kind: instance method of oxfun
Returns: Array<object> - a list of order structures

See: https://docs.ox.fun/?json#order-channel

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.tag int, string No If given it will be echoed in the reply and the max size of tag is 32
oxfun.watchOrders (symbol, since?, limit?, params?)

createOrderWs{docsify-ignore}

create a trade order

Kind: instance method of oxfun
Returns: object - an order structure

See: https://docs.ox.fun/?json#order-commands

Param Type Required Description
symbol string Yes unified symbol of the market to create an order in
type string Yes 'market', 'limit', 'STOP_LIMIT' or 'STOP_MARKET'
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.clientOrderId int No a unique id for the order
params.timestamp int No in milliseconds. If an order reaches the matching engine and the current timestamp exceeds timestamp + recvWindow, then the order will be rejected.
params.recvWindow int No in milliseconds. If an order reaches the matching engine and the current timestamp exceeds timestamp + recvWindow, then the order will be rejected. If timestamp is provided without recvWindow, then a default recvWindow of 1000ms is used.
params.cost float No the quote quantity that can be used as an alternative for the amount for market buy orders
params.triggerPrice float No The price at which a trigger order is triggered at
params.limitPrice float No Limit price for the STOP_LIMIT order
params.postOnly bool No if true, the order will only be posted if it will be a maker order
params.timeInForce string No GTC (default), IOC, FOK, PO, MAKER_ONLY or MAKER_ONLY_REPRICE (reprices order to the best maker only price if the specified price were to lead to a taker trade)
params.selfTradePreventionMode string No NONE, EXPIRE_MAKER, EXPIRE_TAKER or EXPIRE_BOTH for more info check here https://docs.ox.fun/?json#self-trade-prevention-modes
params.displayQuantity string No for an iceberg order, pass both quantity and displayQuantity fields in the order request
oxfun.createOrderWs (symbol, type, side, amount, price?, params?)

editOrderWs{docsify-ignore}

edit a trade order

Kind: instance method of oxfun
Returns: object - an order structure

See: https://docs.ox.fun/?json#modify-order

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 the currency you want to trade in units of the base currency
price float, undefined 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.timestamp int No in milliseconds. If an order reaches the matching engine and the current timestamp exceeds timestamp + recvWindow, then the order will be rejected.
params.recvWindow int No in milliseconds. If an order reaches the matching engine and the current timestamp exceeds timestamp + recvWindow, then the order will be rejected. If timestamp is provided without recvWindow, then a default recvWindow of 1000ms is used.
oxfun.editOrderWs (id, symbol, type, side, amount, price?, params?)

cancelOrderWs{docsify-ignore}

cancels an open order

Kind: instance method of oxfun
Returns: object - an list of order structures

See: https://docs.ox.fun/?json#cancel-order

Param Type Required Description
id string Yes order id
symbol string Yes unified market symbol, default is undefined
params object No extra parameters specific to the exchange API endpoint
oxfun.cancelOrderWs (id, symbol, params?)

cancelOrdersWs{docsify-ignore}

cancel multiple orders

Kind: instance method of oxfun
Returns: object - an list of order structures

See: https://www.okx.com/docs-v5/en/#order-book-trading-trade-ws-mass-cancel-order

Param Type Required Description
ids Array<string> Yes order ids
symbol string Yes unified market symbol, default is undefined
params object No extra parameters specific to the exchange API endpoint
oxfun.cancelOrdersWs (ids, symbol, params?)

Clone this wiki locally