CCXT

API Spec by Method

CCXT unified API specification — every method and the exchanges that implement it.

addMargin

add margin

Kind: instance
Returns: object - a margin structure

ParamTypeRequiredDescription
symbolstringYesunified market symbol
amountfloatYesamount of margin to add
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountAccountNoaccount id to use, required
Supported exchanges

borrowCrossMargin

create a loan to borrow margin

Kind: instance
Returns: object - a margin loan structure

ParamTypeRequiredDescription
codestringYesunified currency code of the currency to borrow
amountfloatYesthe amount to borrow
paramsobjectNoextra parameters specific to the exchange API endpoint
params.portfolioMarginbooleanNoset to true if you would like to borrow margin in a portfolio margin account
Supported exchanges

borrowIsolatedMargin

create a loan to borrow margin

Kind: instance
Returns: object - a margin loan structure

ParamTypeRequiredDescription
symbolstringYesunified market symbol, required for isolated margin
codestringYesunified currency code of the currency to borrow
amountfloatYesthe amount to borrow
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

calculatePricePrecision

Helper function to calculate the Hyperliquid DECIMAL_PLACES price precision

Kind: instance
Returns: int - The calculated price precision

ParamTypeDescription
pricefloatthe price to use in the calculation
amountPrecisionintthe amountPrecision to use in the calculation
maxDecimalsintthe maxDecimals to use in the calculation
Supported exchanges

cancelAllContractOrders

helper method for cancelling all contract orders

Kind: instance
Returns: Response from the exchange

ParamTypeRequiredDescription
symbolstringYesunified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
paramsobjectNoextra parameters specific to the exchange API endpoint
params.triggerobjectNoWhen true, all the trigger orders will be cancelled
Supported exchanges

cancelAllOrders

cancel all open orders in a market

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

ParamTypeRequiredDescription
symbolstringYesalpaca cancelAllOrders cannot setting symbol, it will cancel all open orders
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

cancelAllOrdersAfter

dead man's switch, cancel all orders after the given timeout

Kind: instance
Returns: object - the api result

ParamTypeRequiredDescription
timeoutnumberYestime in milliseconds, 0 represents cancel the timer
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNospot or swap market
Supported exchanges

cancelAllOrdersWs

cancel all open orders in a market

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

ParamTypeRequiredDescription
symbolstringNounified market symbol of the market to cancel orders in
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

cancelAllSpotOrders

helper method for cancelling all spot orders

Kind: instance
Returns: Response from the exchange

ParamTypeRequiredDescription
symbolstringYesunified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
paramsobjectNoextra parameters specific to the exchange API endpoint
params.triggerboolNoinvalid for isolated margin true if cancelling all stop orders
params.marginModestringNo'cross' or 'isolated'
params.orderIdsstringNostop orders only Comma separated order IDs
params.hfboolNofalse, // true for hf order
Supported exchanges

cancelAllUtaOrders

helper method for cancelling all uta orders

Kind: instance
Returns: Response from the exchange

ParamTypeRequiredDescription
symbolstringYesunified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
paramsobjectNoextra parameters specific to the exchange API endpoint
params.triggerboolNotrue if cancelling all stop orders
params.marginModestringNo'CROSS' or 'ISOLATED'
Supported exchanges

cancelContractOrder

helper method for cancelling contract orders

Kind: instance
Returns: object - An order structure

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.clientOrderIdstringNocancel order by client order id
Supported exchanges

cancelOrder

cancels an open order

Kind: instance
Returns: object - An order structure

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

cancelOrderWs

cancel multiple orders

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

ParamTypeRequiredDescription
idstringYesorder id
symbolstringNounified market symbol, default is undefined
paramsobjectNoextra parameters specific to the exchange API endpoint
params.cancelRestrictionsstring, undefinedNoSupported values: ONLY_NEW - Cancel will succeed if the order status is NEW. ONLY_PARTIALLY_FILLED - Cancel will succeed if order status is PARTIALLY_FILLED.
params.triggerbooleanNoset to true if you would like to cancel a conditional order
Supported exchanges

cancelOrders

cancel multiple orders

Kind: instance
Returns: Array<Order> - an list of order structures

ParamTypeRequiredDescription
idsArray<string>Yesorder ids
symbolstringNounified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountAccountNoaccount to cancel orders for, required
Supported exchanges

cancelOrdersForSymbols

cancel multiple orders for multiple symbols

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

ParamTypeRequiredDescription
ordersArray<CancellationRequest>Yeslist of order ids with symbol, example [{"id": "a", "symbol": "BTC/USDT"}, {"id": "b", "symbol": "ETH/USDT"}]
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

cancelOrdersRequest

build the request payload for cancelling multiple orders

Kind: instance
Returns: object - the raw request object to be sent to the exchange

ParamTypeRequiredDescription
idsArray<string>Yesorder ids
symbolstringYesunified market symbol
paramsobjectNo
Supported exchanges

cancelOrdersWs

cancel multiple orders

Kind: instance
Returns: object - a list of order structures

ParamTypeRequiredDescription
idsArray<string>Yesorder ids
symbolstringYesnot used by cex cancelOrders()
paramsobjectNoextra parameters specific to the cex api endpoint
Supported exchanges

cancelSpotOrder

helper method for cancelling spot orders

Kind: instance
Returns: Response from the exchange

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.triggerboolNoTrue if cancelling a stop order
params.hfboolNofalse, // true for hf order
params.syncboolNofalse, // true to use the hf sync call
params.marginModestringNo'cross' or 'isolated'
Supported exchanges

cancelTwapOrder

cancels a running twap order

Kind: instance
Returns: object - An order structure

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.expiresAfterintNotime in ms after which the twap order expires
params.vaultAddressstringNothe vault address for order
Supported exchanges

cancelUtaOrder

helper method for cancelling uta orders

Kind: instance
Returns: Response from the exchange

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountModestringNo'unified' or 'classic' (default is 'unified')
params.clientOrderIdstringNoclient order id, required if id is not provided
params.marginModestringNo'cross' or 'isolated', required if fetching a margin order (unified accountMode supports only cross margin)
Supported exchanges

closeAllPositions

closes all open positions for a market type

Kind: instance
Returns: Array<object> - A list of position structures

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.productTypestringNo'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
Supported exchanges

closePosition

closes open positions for a market

Kind: instance
Returns: object - an order structure

ParamTypeRequiredDescription
symbolstringYesUnified CCXT market symbol
sidestringNonot used by bingx
paramsobjectNoextra parameters specific to the bingx api endpoint
params.positionIdstring, undefinedNothe id of the position you would like to close
Supported exchanges

closePositions

closes open positions for a market

Kind: instance
Returns: Array<object> - a list of position structures

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the bingx api endpoint
params.recvWindowstringNorequest valid time window value
Supported exchanges

createAccount

creates a sub-account under the main account

Kind: instance
Returns: object - a response object

ParamTypeRequiredDescription
namestringYesthe name of the sub-account
paramsobjectNoextra parameters specific to the exchange API endpoint
params.expiresAfterintNotime in ms after which the sub-account will expire
Supported exchanges

createContractOrder

helper method for creating contract orders

Kind: instance
Returns: object - an order structure

ParamTypeRequiredDescription
symbolstringYesUnified CCXT market symbol
typestringYes'limit' or 'market'
sidestringYes'buy' or 'sell'
amountfloatYesthe amount of currency to trade
pricefloatNothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.takeProfitobjectNotakeProfit object in params containing the triggerPrice at which the attached take profit order will be triggered and the triggerPriceType
params.stopLossobjectNostopLoss object in params containing the triggerPrice at which the attached stop loss order will be triggered and the triggerPriceType
params.triggerPricefloatNoThe price a trigger order is triggered at
params.stopLossPricefloatNoprice to trigger stop-loss orders
params.takeProfitPricefloatNoprice to trigger take-profit orders
params.reduceOnlyboolNoA mark to reduce the position size only. Set to false by default. Need to set the position size when reduceOnly is true.
params.timeInForcestringNoGTC, GTT, IOC, or FOK, default is GTC, limit orders only
params.postOnlyboolNoPost only flag, invalid when timeInForce is IOC or FOK
params.costfloatNothe cost of the order in units of USDT
params.marginModestringNo'cross' or 'isolated', default is 'isolated'
params.hedgedboolNoswap and future only true for hedged mode, false for one way mode, default is false ----------------- Exchange Specific Parameters -----------------
params.leveragefloatNoLeverage size of the order (mandatory param in request, default is 1)
params.clientOidstringNoclient order id, defaults to uuid if not passed
params.remarkstringNoremark for the order, length cannot exceed 100 utf8 characters
params.stopstringNo'up' or 'down', the direction the triggerPrice is triggered from, requires triggerPrice. down: Triggers when the price reaches or goes below the triggerPrice. up: Triggers when the price reaches or goes above the triggerPrice.
params.triggerPriceTypestringNo"last", "mark", "index" - defaults to "mark"
params.stopPriceTypestringNoexchange-specific alternative for triggerPriceType: TP, IP or MP
params.closeOrderboolNoset to true to close position
params.testboolNoset to true to use the test order endpoint (does not submit order, use to validate params)
params.forceHoldboolNoA mark to forcely hold the funds for an order, even though it's an order to reduce the position size. This helps the order stay on the order book and not get canceled when the position size changes. Set to false by default.\
params.positionSidestringNoswap and future only hedged two-way position side, LONG or SHORT
Supported exchanges

createContractOrders

helper method for creating contract orders in batch

Kind: instance
Returns: object - an order structure

ParamTypeRequiredDescription
ordersArrayYeslist of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

createConvertTrade

convert from one currency to another

Kind: instance
Returns: object - a conversion structure

ParamTypeRequiredDescription
idstringYesthe id of the trade that you want to make
fromCodestringYesthe currency that you want to sell and convert from
toCodestringYesthe currency that you want to buy and convert into
amountfloatNohow much you want to trade in units of the from currency
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

createDepositAddress

create a currency deposit address

Kind: instance
Returns: object - an address structure

ParamTypeRequiredDescription
codestringYesunified currency code of the currency for the deposit address
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

createGiftCode

create gift code

Kind: instance
Returns: object - The gift code id, code, currency and amount

ParamTypeRequiredDescription
codestringYesgift code
amountfloatYesamount of currency for the gift
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

createMarkeSellOrderWithCost

create a market sell order by providing the symbol and cost

Kind: instance
Returns: object - an order structure

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
costfloatYeshow much you want to trade in units of the quote currency
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

createMarketBuyOrderWithCost

create a market buy order by providing the symbol and cost

Kind: instance
Returns: object - an order structure

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
costfloatYeshow much you want to trade in units of the quote currency
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

createMarketOrderWithCost

create a market order by providing the symbol, side and cost

Kind: instance
Returns: object - an order structure

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
sidestringYes'buy' or 'sell'
costfloatYeshow much you want to trade in units of the quote currency
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

createMarketSellOrderWithCost

create a market sell order by providing the symbol and cost

Kind: instance
Returns: object - an order structure

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
costfloatYeshow much you want to trade in units of the quote currency
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

createOrder

create a trade order

Kind: instance
Returns: object - an order structure

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit'
sidestringYes'buy' or 'sell'
amountfloatYeshow much of currency you want to trade in units of base currency
pricefloatNothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.reduceOnlyboolNotrue or false whether the order is reduce-only
params.accountAccountNoaccount id to use, required
Supported exchanges

createOrderWs

create a trade order

Kind: instance
Returns: object - an order structure

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit'
sidestringYes'buy' or 'sell'
amountfloatYeshow much of currency you want to trade in units of base currency
pricefloat, undefinedNothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.testbooleanYestest order, default false
params.returnRateLimitsbooleanYesset to true to return rate limit information, default false
Supported exchanges

createOrders

create a list of trade orders

Kind: instance
Returns: object - an order structure

ParamTypeRequiredDescription
ordersArrayYeslist of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountAccountNoaccount id to use, required
Supported exchanges

createOrdersRequest

create a list of trade orders

Kind: instance
Returns: object - an order structure

ParamTypeDescription
ordersArraylist of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
Supported exchanges

createOrdersWs

create a list of trade orders

Kind: instance
Returns: object - an order structure

ParamTypeRequiredDescription
ordersArrayYeslist of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

createSpotOrder

create a trade order on spot market

Kind: instance
Returns: object - an order structure

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit' or 'LIMIT_MAKER'
sidestringYes'buy' or 'sell'
amountfloatYeshow much of you want to trade in units of the base currency
pricefloatNothe price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.costfloatNomarket buy only the quote quantity that can be used as an alternative for the amount
params.testboolNowhether to use the test endpoint or not, default is false
params.postOnlyboolNoif true, the order will only be posted to the order book and not executed immediately
params.timeInForcestringNo'GTC', 'IOC', or 'PO'
params.clientOrderIdstringNoa unique id for the order
Supported exchanges

createSpotOrders

helper method for creating spot orders in batch

Kind: instance
Returns: object - an order structure

ParamTypeRequiredDescription
ordersArrayYeslist of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
paramsobjectNoextra parameters specific to the exchange API endpoint
params.hfboolNofalse, // true for hf orders
params.syncboolNofalse, // true to use the hf sync call
Supported exchanges

createSubAccount

creates a sub-account under the main account

Kind: instance
Returns: object - a response object

ParamTypeRequiredDescription
namestringYesunused argument
paramsobjectNoextra parameters specific to the exchange API endpoint
params.expiryWindowintNotime to live in milliseconds
params.subAccountAddressstringNoThe public key (address) of the sub-account to use for creation
params.subAccountPrivateKeystringNoThe private key of the sub-account to use for creation
Supported exchanges

createSwapOrder

create a trade order on swap market

Kind: instance
Returns: object - an order structure

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit' or 'STOP'
sidestringYes'buy' or 'sell'
amountfloatYeshow much of you want to trade in units of the base currency
pricefloatNothe price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.postOnlyboolNoif true, the order will only be posted to the order book and not executed immediately
params.reduceOnlyboolNotrue or false whether the order is reduce only
params.triggerPricefloatNoThe price at which a trigger order is triggered at
params.timeInForcestringNo'GTC', 'FOK', 'IOC', 'LIMIT_MAKER' or 'PO'
params.clientOrderIdstringNoa unique id for the order
Supported exchanges

createTrailingAmountOrder

create a trailing order by providing the symbol, type, side, amount, price and trailingAmount

Kind: instance
Returns: object - an order structure

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit'
sidestringYes'buy' or 'sell'
amountfloatYeshow much you want to trade in units of the base currency, or number of contracts
pricefloatNothe price for the order to be filled at, in units of the quote currency, ignored in market orders
trailingAmountfloatYesthe quote amount to trail away from the current market price
trailingTriggerPricefloatYesthe price to activate a trailing order, default uses the price argument
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

createTrailingPercentOrder

create a trailing order by providing the symbol, type, side, amount, price and trailingPercent

Kind: instance
Returns: object - an order structure

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit'
sidestringYes'buy' or 'sell'
amountfloatYeshow much you want to trade in units of the base currency, or number of contracts
pricefloatNothe price for the order to be filled at, in units of the quote currency, ignored in market orders
trailingPercentfloatYesthe percent to trail away from the current market price
trailingTriggerPricefloatYesthe price to activate a trailing order, default uses the price argument
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

createTwapOrder

create a trade order that is executed as a TWAP order over a specified duration.

Kind: instance
Returns: object - an order structure

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
sidestringYes'buy' or 'sell'
amountfloatYeshow much of currency you want to trade in units of base currency
durationintYesthe duration of the TWAP order in milliseconds
paramsobjectNoextra parameters specific to the exchange API endpoint
params.randomizeboolNowhether to randomize the time intervals of the TWAP order slices (default is false, meaning equal intervals)
params.reduceOnlyboolNotrue or false whether the order is reduce-only
params.expiresAfterintNotime in ms after which the twap order expires
params.vaultAddressstringNothe vault address for order
Supported exchanges

createUtaOrder

helper method for creating uta orders

Kind: instance
Returns: object - an order structure

ParamTypeRequiredDescription
symbolstringYesUnified CCXT market symbol
typestringYes'limit' or 'market'
sidestringYes'buy' or 'sell'
amountfloatYesthe amount of currency to trade
pricefloatNothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.clientOrderIdstringNoclient order id, defaults to uuid if not passed
params.costfloatNothe cost of the order in units of quote currency
params.timeInForcestringNoGTC, GTD, IOC, FOK or PO
params.postOnlyboolNoPost only flag, invalid when timeInForce is IOC or FOK (default is false)
params.reduceOnlyboolNocontract markets only A mark to reduce the position size only. Set to false by default
params.triggerPricefloatNoThe price a trigger order is triggered at
params.triggerDirectionstringNo'ascending' or 'descending', the direction the triggerPrice is triggered from, requires triggerPrice
params.triggerPriceTypestringNocontract markets only "last", "mark", "index" - defaults to "mark"
params.stopLossPricefloatNoprice to trigger stop-loss orders
params.takeProfitPricefloatNoprice to trigger take-profit orders
params.marginModestringNo'cross' or 'isolated', (default is 'cross' for margin orders, default is 'isolated' for contract orders) Exchange-specific parameters -------------------------------------------------
params.accountModestringNo'unified' or 'classic', default is 'unified'
params.stpstringNo'', // self trade prevention, CN, CO, CB or DC
params.cancelAfterintNoCancel After N Seconds (Calculated from the time of entering the matching engine), only effective when timeInForce is GTD
params.sizeUnitstringNocontracts only 'BASECCY' (amount of base currency) or 'UNIT' (number of contracts), default is 'UNIT' Classic account parameters
params.autoBorrowboolNoclassic margin orders only
params.autoRepayboolNoclassic margin orders only
params.hedgedstringNoclassic contract orders only true for hedged mode, false for one way mode, default is false
params.leverageintNoclassic contract orders with isolated marginMode only Leverage size of the order
Supported exchanges

createVault

creates a value

Kind: instance
Returns: object - the api result

ParamTypeRequiredDescription
namestringYesThe name of the vault
descriptionstringYesThe description of the vault
initialUsdnumberYesThe initialUsd of the vault
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

deposit

make a deposit

Kind: instance
Returns: object - a transaction structure

ParamTypeRequiredDescription
codestringYesunified currency code
amountfloatYesthe amount to deposit
idstringYesthe payment method id to be used for the deposit, can be retrieved from v2PrivateGetPaymentMethods
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountIdstringNothe id of the account to deposit into
Supported exchanges

editContractOrder

edit a trade order

Kind: instance
Returns: object - an order structure

ParamTypeRequiredDescription
idstringYescancel order id
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit'
sidestringYes'buy' or 'sell'
amountfloatYeshow much of currency you want to trade in units of base currency
pricefloatNothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.portfolioMarginbooleanNoset to true if you would like to edit an order in a portfolio margin account
Supported exchanges

editOrder

edit a trade order

Kind: instance
Returns: object - an order structure

ParamTypeRequiredDescription
idstringYesorder id
symbolstringNounified symbol of the market to create an order in
typestringNo'market', 'limit' or 'stop_limit'
sidestringNo'buy' or 'sell'
amountfloatNohow much of the currency you want to trade in units of the base currency
pricefloatNothe price for the order, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.triggerPricestringNothe price to trigger a stop order
params.timeInForcestringNofor crypto trading either 'gtc' or 'ioc' can be used
params.clientOrderIdstringNoa unique identifier for the order, automatically generated if not sent
Supported exchanges

editOrderWs

edit a trade order

Kind: instance
Returns: object - an order structure

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit'
sidestringYes'buy' or 'sell'
amountfloatYeshow much of the currency you want to trade in units of the base currency
pricefloat, undefinedNothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

editOrders

edit a list of trade orders

Kind: instance
Returns: object - an order structure

ParamTypeRequiredDescription
ordersArrayYeslist of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

enableDemoTrading

enables or disables demo trading mode

Kind: instance

ParamTypeRequiredDescription
enablebooleanNotrue if demo trading should be enabled, false otherwise
Supported exchanges

enableUserDexAbstraction

If set, actions on HIP-3 perps will automatically transfer collateral from validator-operated USDC perps balance for HIP-3 DEXs where USDC is the collateral token, and spot otherwise

Kind: instance
Returns: dictionary response from the exchange

ParamTypeRequiredDescription
enabledbooleanYeswhether to enable user dex abstraction
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNo'userDexAbstraction' or 'agentEnableDexAbstraction' default is 'userDexAbstraction'
Supported exchanges

fetchADLRank

fetches the auto deleveraging rank and risk percentage for a symbol

Kind: instance
Returns: object - an auto de leverage structure

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the auto deleveraging rank for
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchAccount

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

Kind: instance
Returns: object - a balance structure

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchAccountIdByType

fetch all the accounts by a type and marginModeassociated with a profile

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

ParamTypeRequiredDescription
typestringYes'spot', 'swap' or 'future
marginModestringNo'cross' or 'isolated'
symbolstringNounified ccxt market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchAccountSettings

fetch account's market settings. Settings are cached for walletAddress. To refresh the cache, call loadAccountSettings with refresh=true

Kind: instance
Returns: object - Dict repacked from list by symbol key

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountstringNowill default to walletAddress if not provided
Supported exchanges

fetchAccounts

query for accounts owned by the walletAddress. An Account is needed for all trading methods.

Kind: instance
Returns: Array - a list of account structures

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchAllGreeks

fetches all option contracts greeks, financial metrics used to measure the factors that affect the price of an options contract

Kind: instance
Returns: object - a greeks structure

ParamTypeRequiredDescription
symbolsArray<string>Nounified symbols of the markets to fetch greeks for, all markets are returned if not assigned
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchBalance

query for balance and get the amount of funds available for trading or funds locked in positions

Kind: instance
Returns: object - a balance structure

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountstringNoaccount object ID, required
Supported exchanges

fetchBalanceWs

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

Kind: instance
Returns: object - a balance structure

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestring, undefinedNo'future', 'delivery', 'savings', 'funding', or 'spot'
params.marginModestring, undefinedNo'cross' or 'isolated', for margin trading, uses this.options.defaultMarginMode if not passed, defaults to undefined/None/null
params.symbolsArray<string>, undefinedNounified market symbols, only used in isolated margin mode
params.methodstring, undefinedNomethod to use. Can be account.balance, account.status, v2/account.balance or v2/account.status
Supported exchanges

fetchBidsAsks

fetches the bid and ask price and volume for multiple markets

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

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYesunified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
paramsobjectNoextra parameters specific to the exchange API endpoint
params.subTypestringNo"linear" or "inverse"
Supported exchanges

fetchBorrowInterest

fetch the interest owed by the user for borrowing currency for margin trading

Kind: instance
Returns: Array<object> - a list of borrow interest structures

ParamTypeRequiredDescription
codestringNounified currency code
symbolstringNounified market symbol when fetch interest in isolated markets
sinceintNothe earliest time in ms to fetch borrrow interest for
limitintNothe maximum number of structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.portfolioMarginbooleanNoset to true if you would like to fetch the borrow interest in a portfolio margin account
Supported exchanges

fetchBorrowRateHistories

retrieves a history of a multiple currencies borrow interest rate at specific time slots, returns all currencies if no symbols passed, default is undefined

Kind: instance
Returns: object - a dictionary of borrow rate structures indexed by the market symbol

ParamTypeRequiredDescription
codesArray<string>, undefinedYeslist of unified currency codes, default is undefined
sinceintNotimestamp in ms of the earliest borrowRate, default is undefined
limitintNomax number of borrow rate prices to return, default is undefined
paramsobjectNoextra parameters specific to the exchange API endpoint
params.marginModestringNo'cross' or 'isolated' default is 'cross'
params.untilintNothe latest time in ms to fetch entries for
Supported exchanges

fetchBorrowRateHistory

retrieves a history of a currencies borrow interest rate at specific time slots

Kind: instance
Returns: Array<object> - an array of borrow rate structures

ParamTypeRequiredDescription
codestringYesunified currency code
sinceintNotimestamp for the earliest borrow rate
limitintNothe maximum number of borrow rate structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchCanceledAndClosedOrders

fetches information on multiple canceled orders made by the user

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market the orders were made in
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.portfolioMarginbooleanNoset to true if you would like to fetch orders in a portfolio margin account
params.triggerbooleanNoset to true if you would like to fetch portfolio margin account trigger or conditional orders
Supported exchanges

fetchCanceledOrders

fetches information on multiple canceled orders made by the user

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market the orders were made in
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.portfolioMarginbooleanNoset to true if you would like to fetch orders in a portfolio margin account
params.triggerbooleanNoset to true if you would like to fetch portfolio margin account trigger or conditional orders
Supported exchanges

fetchClosedOrder

fetch an open order by it's id

Kind: instance
Returns: object - an order structure

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified market symbol, default is undefined
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchClosedOrders

fetches information on multiple closed orders made by the user

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market orders were made in
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch orders for
Supported exchanges

fetchClosedOrdersWs

fetch closed orders

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch open orders for
limitintNothe maximum number of open orders structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchContractBalance

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

Kind: instance
Returns: object - a balance structure

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.codeobjectNothe unified currency code to fetch the balance for, if not provided, the default .options['fetchBalance']['code'] will be used
Supported exchanges

fetchContractDepositAddress

fetch the deposit address for a currency associated with this account

Kind: instance
Returns: object - an address structure

ParamTypeRequiredDescription
codestringYesunified currency code
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchContractDeposits

helper method for fetching deposits for futures accounts

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

ParamTypeRequiredDescription
codestringYesunified currency code
sinceintNothe earliest time in ms to fetch deposits for
limitintNothe maximum number of deposits structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchContractOrder

fetc contract order

Kind: instance
Returns: object - An order structure

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchContractOrdersByStatus

fetches a list of contract orders placed on the exchange

Kind: instance
Returns: An array of order structures

ParamTypeRequiredDescription
statusstringYes'active' or 'closed', only 'active' is valid for stop orders
symbolstringYesunified symbol for the market to retrieve orders from
sinceintNotimestamp in ms of the earliest order to retrieve
limitintNoThe maximum number of orders to retrieve
paramsobjectNoexchange specific parameters
params.triggerboolNoset to true to retrieve untriggered stop orders
params.untilintNoEnd time in ms
params.sidestringNobuy or sell
params.typestringNolimit or market
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
Supported exchanges

fetchContractWithdrawals

helper method for fetching withdrawals for futures accounts

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

ParamTypeRequiredDescription
codestringYesunified currency code
sinceintNothe earliest time in ms to fetch withdrawals for
limitintNothe maximum number of withdrawals structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchConvertCurrencies

fetches all available currencies that can be converted

Kind: instance
Returns: object - an associative dictionary of currencies

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchConvertQuote

fetch a quote for converting from one currency to another

Kind: instance
Returns: object - a conversion structure

ParamTypeRequiredDescription
fromCodestringYesthe currency that you want to sell and convert from
toCodestringYesthe currency that you want to buy and convert into
amountfloatYeshow much you want to trade in units of the from currency
paramsobjectNoextra parameters specific to the exchange API endpoint
params.walletTypestringNoeither 'SPOT' or 'FUNDING', the default is 'SPOT'
Supported exchanges

fetchConvertTrade

fetch the data for a conversion trade

Kind: instance
Returns: object - a conversion structure

ParamTypeRequiredDescription
idstringYesthe id of the trade that you want to fetch
codestringNothe unified currency code of the conversion trade
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchConvertTradeHistory

fetch the users history of conversion trades

Kind: instance
Returns: Array<object> - a list of conversion structures

ParamTypeRequiredDescription
codestringNothe unified currency code
sinceintNothe earliest time in ms to fetch conversions for
limitintNothe maximum number of conversion structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNotimestamp in ms of the latest conversion to fetch
Supported exchanges

fetchCrossBorrowRate

fetch the rate of interest to borrow a currency for margin trading

Kind: instance
Returns: object - a borrow rate structure

ParamTypeRequiredDescription
codestringYesunified currency code
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchCrossBorrowRates

fetch the borrow interest rates of all currencies

Kind: instance
Returns: object - a list of borrow rate structures

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchCurrencies

fetches all available currencies on an exchange

Kind: instance
Returns: object - an associative dictionary of currencies

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchCurrenciesWs

fetches all available currencies on an exchange

Kind: instance
Returns: object - an associative dictionary of currencies

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the bitvavo api endpoint
Supported exchanges

fetchDeposit

fetch information on a deposit

Kind: instance
Returns: object - a transaction structure

ParamTypeRequiredDescription
idstringYesdeposit id
codestringYesnot used by bitmart fetchDeposit ()
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchDepositAddress

fetch the deposit address for a currency associated with this account

Kind: instance
Returns: object - an address structure

ParamTypeRequiredDescription
codestringYesunified currency code
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchDepositAddresses

fetch deposit addresses for multiple currencies (when available)

Kind: instance
Returns: object - a dictionary of address structures indexed by currency code

ParamTypeRequiredDescription
codesArray<string>Nolist of unified currency codes, default is undefined (all currencies)
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountIdstringNoaccount ID to fetch deposit addresses for
Supported exchanges

fetchDepositAddressesByNetwork

fetch the deposit addresses for a currency associated with this account

Kind: instance
Returns: object - a dictionary address structures, indexed by the network

ParamTypeRequiredDescription
codestringYesunified currency code
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchDepositMethodId

fetch the deposit id for a fiat currency associated with this account

Kind: instance
Returns: object - a deposit id structure

ParamTypeRequiredDescription
idstringYesthe deposit payment method id
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchDepositMethodIds

fetch the deposit id for a fiat currency associated with this account

Kind: instance
Returns: object - an array of deposit id structures

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchDepositMethods

fetch deposit methods for a currency associated with this account

Kind: instance
Returns: object - of deposit methods

ParamTypeRequiredDescription
codestringYesunified currency code
paramsobjectNoextra parameters specific to the kraken api endpoint
Supported exchanges

fetchDepositWithdrawFee

fetch the fee for deposits and withdrawals

Kind: instance
Returns: object - a fee structure

ParamTypeRequiredDescription
codestringYesunified currency code
paramsobjectNoextra parameters specific to the exchange API endpoint
params.networkstringNothe network code of the currency
Supported exchanges

fetchDepositWithdrawFees

fetch deposit and withdraw fees

Kind: instance
Returns: object - a list of fee structures

ParamTypeRequiredDescription
codesArray<string>, undefinedYeslist of unified currency codes
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchDeposits

fetch all deposits made to an account

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

ParamTypeRequiredDescription
codestringNounified currency code
sinceintNothe earliest time in ms to fetch deposits for
limitintNothe maximum number of deposit structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchDepositsWithdrawals

fetch history of deposits and withdrawals

Kind: instance
Returns: object - a list of transaction structure

ParamTypeRequiredDescription
codestringNounified currency code for the currency of the deposit/withdrawals, default is undefined
sinceintNotimestamp in ms of the earliest deposit/withdrawal, default is undefined
limitintNomax number of deposit/withdrawals to return, default is undefined
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchDepositsWs

fetch all deposits made to an account

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

ParamTypeRequiredDescription
codestringYesunified currency code
sinceintNothe earliest time in ms to fetch deposits for
limitintNothe maximum number of deposits structures to retrieve
paramsobjectNoextra parameters specific to the bitvavo api endpoint
Supported exchanges

fetchFundingHistory

fetches information on multiple orders made by the user classic accounts only

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market orders were made in
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve, default 100
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilobjectNoend time, ms
params.sidebooleanNoBUY or SELL
params.pagebooleanNoPage numbers start from 0
Supported exchanges

fetchFundingInterval

fetch the current funding rate interval

Kind: instance
Returns: object - a funding rate structure

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
Supported exchanges

fetchFundingIntervals

fetch the funding rate interval for multiple markets

Kind: instance
Returns: Array<object> - a list of funding rate structures

ParamTypeRequiredDescription
symbolsArray<string>Nolist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchFundingLimits

fetch the deposit and withdrawal limits for a currency

Kind: instance
Returns: object - a funding limits structure

ParamTypeRequiredDescription
codesArray<string>, undefinedYesunified currency codes
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchFundingRate

fetch the current funding rate

Kind: instance
Returns: object - a funding rate structure

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchFundingRateHistory

fetches historical funding rate prices

Kind: instance
Returns: Array<object> - a list of funding rate structures

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the funding rate history for
sinceintNotimestamp in ms of the earliest funding rate to fetch
limitintNothe maximum amount of funding rate structures to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNotimestamp in ms of the latest funding rate
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
Supported exchanges

fetchFundingRates

fetch the funding rate for multiple markets

Kind: instance
Returns: Array<object> - a list of funding rates structures, indexe by market symbols

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYeslist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchGreeks

fetches an option contracts greeks, financial metrics used to measure the factors that affect the price of an options contract

Kind: instance
Returns: object - a greeks structure

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch greeks for
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchHip3Markets

retrieves data on all hip3 markets for hyperliquid

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

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchIsolatedBorrowRate

fetch the rate of interest to borrow a currency for margin trading

Kind: instance
Returns: object - an isolated borrow rate structure

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint EXCHANGE SPECIFIC PARAMETERS
params.vipLevelobjectNouser's current specific margin data will be returned if viplevel is omitted
Supported exchanges

fetchIsolatedBorrowRates

fetch the borrow interest rates of all currencies

Kind: instance
Returns: object - a borrow rate structure

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.symbolobjectNounified market symbol EXCHANGE SPECIFIC PARAMETERS
params.vipLevelobjectNouser's current specific margin data will be returned if viplevel is omitted
Supported exchanges

fetchL3OrderBook

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

Kind: instance
Returns: object - an order book structure

ParamTypeRequiredDescription
symbolstringYesunified market symbol
limitintNomax number of orders to return, default is undefined
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchLastPrices

fetches the last price for multiple markets

Kind: instance
Returns: object - a dictionary of lastprices structures

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYesunified symbols of the markets to fetch the last prices
paramsobjectNoextra parameters specific to the exchange API endpoint
params.subTypestringNo"linear" or "inverse"
Supported exchanges

fetchLedger

fetch the history of changes, actions done by the user or operations that altered the balance of the user

Kind: instance
Returns: object - a ledger structure

ParamTypeRequiredDescription
codestringNounified currency code
sinceintNotimestamp in ms of the earliest ledger entry
limitintNomax number of ledger entries to return
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNotimestamp in ms of the latest ledger entry
Supported exchanges

fetchLedgerEntry

fetch the history of changes, actions done by the user or operations that altered the balance of the user

Kind: instance
Returns: object - a ledger structure

ParamTypeRequiredDescription
idstringYesthe identification number of the ledger entry
codestringYesunified currency code
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchLeverage

fetch the set leverage for a market

Kind: instance
Returns: object - a leverage structure

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchLeverageTiers

retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes

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

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYeslist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchLeverages

fetch the set leverage for all contract markets

Kind: instance
Returns: object - a list of leverage structures

ParamTypeRequiredDescription
symbolsArray<string>Noa list of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchLiquidations

retrieves the public liquidations of a trading pair

Kind: instance
Returns: object - an array of liquidation structures

ParamTypeRequiredDescription
symbolstringYesunified CCXT market symbol
sinceintNothe earliest time in ms to fetch liquidations for
limitintNothe maximum number of liquidation structures to retrieve
paramsobjectNoexchange specific parameters
params.untilintNotimestamp in ms of the latest liquidation
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
Supported exchanges

fetchLongShortRatioHistory

fetches the long short ratio history for a unified market symbol

Kind: instance
Returns: Array<object> - an array of long short ratio structures

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the long short ratio for
timeframestringNothe period for the ratio, default is 24 hours
sinceintNothe earliest time in ms to fetch ratios for
limitintNothe maximum number of long short ratio structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNotimestamp in ms of the latest ratio to fetch
Supported exchanges

fetchMarginAdjustmentHistory

fetches the history of margin added or reduced from contract isolated positions

Kind: instance
Returns: Array<object> - a list of margin structures

ParamTypeRequiredDescription
symbolstringYesunified market symbol
typestringNo"add" or "reduce"
sinceintNotimestamp in ms of the earliest change to fetch
limitintNothe maximum amount of changes to fetch
paramsobjectYesextra parameters specific to the exchange api endpoint
params.untilintNotimestamp in ms of the latest change to fetch
Supported exchanges

fetchMarginMode

fetches the margin mode of a specific symbol

Kind: instance
Returns: object - a margin mode structure

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.subTypestringNo"linear" or "inverse"
Supported exchanges

fetchMarginModes

fetches the set margin mode of the user

Kind: instance
Returns: object - a list of margin mode structures

ParamTypeRequiredDescription
symbolsArray<string>Noa list of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchMarkPrice

fetches mark price for the market

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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.subTypestringNo"linear" or "inverse"
Supported exchanges

fetchMarkPrices

fetches mark prices for multiple markets

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

ParamTypeRequiredDescription
symbolsArray<string>Nounified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
paramsobjectNoextra parameters specific to the exchange API endpoint
params.subTypestringNo"linear" or "inverse"
Supported exchanges

fetchMarketLeverageTiers

retrieve information on the maximum leverage, for different trade sizes for a single market

Kind: instance
Returns: object - a leverage tiers structure

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchMarkets

retrieves data on all markets for woo

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

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchMarketsWs

retrieves data on all markets for bitvavo

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

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange api endpoint
Supported exchanges

fetchMyContractTrades

fetch all contract trades made by the user

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trades structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNoEnd time in ms
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
Supported exchanges

fetchMyDustTrades

fetch all dust trades made by the user

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

ParamTypeRequiredDescription
symbolstringYesnot used by binance fetchMyDustTrades ()
sinceintNothe earliest time in ms to fetch my dust trades for
limitintNothe maximum number of dust trades to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNo'spot' or 'margin', default spot
Supported exchanges

fetchMyLiquidations

retrieves the users liquidated positions

Kind: instance
Returns: object - an array of liquidation structures

ParamTypeRequiredDescription
symbolstringNounified CCXT market symbol
sinceintNothe earliest time in ms to fetch liquidations for
limitintNothe maximum number of liquidation structures to retrieve
paramsobjectNoexchange specific parameters for the binance api endpoint
params.untilintNotimestamp in ms of the latest liquidation
params.paginatebooleanNospot only default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.portfolioMarginbooleanNoset to true if you would like to fetch liquidations in a portfolio margin account
params.typestringNo"spot"
params.subTypestringNo"linear" or "inverse"
Supported exchanges

fetchMySettlementHistory

fetches historical settlement records of the user

Kind: instance
Returns: Array<object> - a list of [settlement history objects]

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the settlement history
sinceintNotimestamp in ms
limitintNonumber of records
paramsobjectNoexchange specific params
Supported exchanges

fetchMySpotTrades

fetch all spot trades made by the user

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trades structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch entries for
params.hfboolNofalse, // true for hf order
params.marginModestringNo'cross' or 'isolated', only for margin trades
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
Supported exchanges

fetchMyTrades

fetch all trades made by the user

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

ParamTypeRequiredDescription
symbolstringNounified market symbol
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trade structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch trades for
params.page_tokenstringNopage_token - used for paging
Supported exchanges

fetchMyTradesWs

fetch all trades made by the user

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceint, undefinedNothe earliest time in ms to fetch trades for
limitint, undefinedNothe maximum number of trades structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.endTimeintNothe latest time in ms to fetch trades for
params.fromIdintNofirst trade Id to fetch
Supported exchanges

fetchMyUtaTrades

fetch all trades made by the user

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trades structures to retrieve (default is 50, max is 200)
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch entries for
params.accountModestringNo'unified' or 'classic', defaults to 'unified'
params.marginModestringNo'cross' or 'isolated', only for margin trades (unified accountMode support only cross margin)
params.sidestringNo'BUY' or 'SELL' (both if not provided)
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
Supported exchanges

fetchOHLCV

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

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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch OHLCV data for
timeframestringYesthe length of time each candle represents
sinceintNotimestamp in ms of the earliest candle to fetch
limitintNomax=1000, max=100 when since is defined and is less than (now - (999 * (timeframe in ms)))
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchOHLCVWs

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

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

ParamTypeDescription
symbolstringunified symbol of the market to query OHLCV data for
timeframestringthe length of time each candle represents
sinceinttimestamp in ms of the earliest candle to fetch
limitintthe maximum amount of candles to fetch
paramsobjectextra parameters specific to the exchange API endpoint
params.untilinttimestamp in ms of the earliest candle to fetch EXCHANGE SPECIFIC PARAMETERS
params.timeZonestringdefault=0 (UTC)
Supported exchanges

fetchOpenInterest

retrieves the open interest of a contract trading pair

Kind: instance
Returns: object - an open interest structure/docs/manual#open-interest-structure

ParamTypeRequiredDescription
symbolstringYesunified CCXT market symbol
paramsobjectNoexchange specific parameters
Supported exchanges

fetchOpenInterestHistory

Retrieves the open interest history of a currency

Kind: instance
Returns: object - an array of open interest structure

ParamTypeRequiredDescription
symbolstringYesUnified CCXT market symbol
timeframestringYes"5m","15m","30m","1h","2h","4h","6h","12h", or "1d"
sinceintNothe time(ms) of the earliest record to retrieve as a unix timestamp
limitintNodefault 30, max 500
paramsobjectNoexchange specific parameters
params.untilintNothe time(ms) of the latest record to retrieve as a unix timestamp
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
Supported exchanges

fetchOpenInterests

Retrieves the open interest for a list of symbols

Kind: instance
Returns: Array<object> - a list of open interest structures

ParamTypeRequiredDescription
symbolsArray<string>Noa list of unified CCXT market symbols
paramsobjectNoexchange specific parameters
Supported exchanges

fetchOpenOrder

fetch an open order by the id

Kind: instance
Returns: object - an order structure

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchOpenOrders

fetch all unfilled currently open orders

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch open orders for
limitintNothe maximum number of open orders structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountNumberintNoaccount number to query orders for, required
Supported exchanges

fetchOpenOrdersWs

fetch all unfilled currently open orders

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceint, undefinedNothe earliest time in ms to fetch open orders for
limitint, undefinedNothe maximum number of open orders structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchOption

fetches option data that is commonly found in an option chain

Kind: instance
Returns: object - an option chain structure

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchOptionChain

fetches data for an underlying asset that is commonly found in an option chain

Kind: instance
Returns: object - a list of option chain structures

ParamTypeRequiredDescription
codestringYesbase currency to fetch an option chain for
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchOptionPositions

fetch data on open options positions

Kind: instance
Returns: Array<object> - a list of position structures

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYeslist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchOrder

fetches information on an order made by the user

Kind: instance
Returns: object - An order structure

ParamTypeRequiredDescription
idstringYesthe order id
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchOrderBook

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

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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
limitintNothe maximum amount of order book entries to return
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchOrderBookWs

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

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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
limitintNothe maximum amount of order book entries to return
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchOrderBooks

fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data for multiple markets

Kind: instance
Returns: object - a dictionary of order book structures indexed by market symbol

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYeslist of unified market symbols, all symbols fetched if undefined, default is undefined
limitintNomax number of entries per orderbook to return, default is undefined
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchOrderClassic

fetches information on an order made by the user classic accounts only

Kind: instance
Returns: object - An order structure

ParamTypeRequiredDescription
idstringYesthe order id
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchOrderTrades

fetch all the trades made from a single order

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

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trades to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchOrderWs

fetches information on an order made by the user

Kind: instance
Returns: object - An order structure

ParamTypeRequiredDescription
idstringYesorder id
symbolstringNounified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchOrders

fetches information on multiple orders made by the user

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market orders were made in
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch orders for
Supported exchanges

fetchOrdersByIds

fetch orders by the list of order id

Kind: instance
Returns: Array<object> - a list of order structure

ParamTypeRequiredDescription
idsArray<string>Nolist of order id
symbolstringNounified ccxt market symbol
paramsobjectNoextra parameters specific to the kraken api endpoint
Supported exchanges

fetchOrdersByStatus

fetch a list of orders

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

ParamTypeRequiredDescription
statusstringYesorder status to fetch for
symbolstringYesunified market symbol of the market orders were made in
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.triggerbooleanNoset to true for fetching trigger orders
params.marginModestringNo'cross' or 'isolated' for fetching spot margin orders
Supported exchanges

fetchOrdersClassic

fetches information on multiple orders made by the user classic accounts only

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market orders were made in
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.triggerbooleanNotrue if trigger order
params.stopbooleanNoalias for trigger
params.typestringNomarket type, ['swap', 'option', 'spot']
params.subTypestringNomarket subType, ['linear', 'inverse']
params.orderFilterstringNo'Order' or 'StopOrder' or 'tpslOrder'
params.untilintNothe latest time in ms to fetch entries for
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
Supported exchanges

fetchOrdersWs

fetches information on multiple orders made by the user

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market orders were made in
sinceint, undefinedNothe earliest time in ms to fetch orders for
limitint, undefinedNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.orderIdintNoorder id to begin at
params.startTimeintNoearliest time in ms to retrieve orders for
params.endTimeintNolatest time in ms to retrieve orders for
params.limitintNothe maximum number of order structures to retrieve
Supported exchanges

fetchPortfolioDetails

Fetch details for a specific portfolio by UUID

Kind: instance
Returns: Array<any> - An account structure </docs/manual#account-structure>

ParamTypeRequiredDescription
portfolioUuidstringYesThe unique identifier of the portfolio to fetch
paramsDictNoExtra parameters specific to the exchange API endpoint
Supported exchanges

fetchPortfolios

fetch all the portfolios

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

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchPosition

fetch data on an open position

Kind: instance
Returns: object - a position structure

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market the position is held in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountNumberintNoaccount number to query positions for, required
Supported exchanges

fetchPositionADLRank

fetches the auto deleveraging rank and risk percentage for a list of symbols

Kind: instance
Returns: object - an array of auto de leverage structures

ParamTypeRequiredDescription
symbolsArray<string>Nolist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
params.codestringNothe currency code to fetch ranks for, USD, BTC or USDT, USDT is the default
params.methodstringNoUSDT contracts only 'privateGetGAccountsAccountPositions' or 'privateGetGAccountsAccountPositions' default is 'privateGetGAccountsAccountPositions'
Supported exchanges

fetchPositionHistory

fetches historical positions

Kind: instance
Returns: Array<object> - a list of position structures

ParamTypeRequiredDescription
symbolstringYesunified contract symbol
sinceintNothe earliest time in ms to fetch positions for
limitintNothe maximum amount of records to fetch
paramsobjectNoextra parameters specific to the exchange api endpoint
params.untilintNothe latest time in ms to fetch positions for
Supported exchanges

fetchPositionMode

fetchs the position mode, hedged or one way, hedged for aster is set identically for all linear markets or all inverse markets

Kind: instance
Returns: object - an object detailing whether the market is in hedged or one-way mode

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchPositionWs

fetch data on an open position

Kind: instance
Returns: object - a position structure

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market the position is held in
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchPositions

fetch all open positions

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

ParamTypeRequiredDescription
symbolsArray<string>Yeslist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountNumberintNoaccount number to query positions for, required
Supported exchanges

fetchPositionsADLRank

fetches the auto deleveraging rank and risk percentage for a list of symbols that have open positions

Kind: instance
Returns: Array<object> - an array of auto de leverage structure

ParamTypeRequiredDescription
symbolsArray<string>Nolist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
params.portfolioMarginbooleanNoset to true for the portfolio margin account
Supported exchanges

fetchPositionsForSymbol

fetch all open positions for specific symbol

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.contractTypestringNoFUTURE or DELIVERY, default is FUTURE
Supported exchanges

fetchPositionsHistory

fetches historical positions

Kind: instance
Returns: Array<object> - a list of position structures

ParamTypeRequiredDescription
symbolsArray<string>Nounified contract symbols
sinceintNotimestamp in ms of the earliest position to fetch, default=3 months ago, max range for params["until"] - since is 3 months
limitintNothe maximum amount of records to fetch, default=20, max=100
paramsobjectYesextra parameters specific to the exchange api endpoint
params.untilintNotimestamp in ms of the latest position to fetch, max range for params["until"] - since is 3 months
params.productTypestringNoUSDT-FUTURES (default), COIN-FUTURES, USDC-FUTURES, SUSDT-FUTURES, SCOIN-FUTURES, or SUSDC-FUTURES
params.utabooleanNoset to true for the unified trading account (uta), defaults to false
Supported exchanges

fetchPositionsRisk

fetch positions risk

Kind: instance
Returns: object - data on the positions risk

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYeslist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchPositionsWs

fetch all open positions

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

ParamTypeRequiredDescription
symbolsArray<string>Nolist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
params.returnRateLimitsbooleanNoset to true to return rate limit informations, defaults to false.
params.methodstring, undefinedNomethod to use. Can be account.position or v2/account.position
Supported exchanges

fetchSettlementHistory

fetches historical settlement records

Kind: instance
Returns: Array<object> - a list of settlement history objects

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the settlement history
sinceintNotimestamp in ms
limitintNonumber of records, default 100, max 100
paramsobjectNoexchange specific params
Supported exchanges

fetchSpotMarkets

retrieves data on all spot markets for hyperliquid

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

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchSpotOrder

fetch a spot order

Kind: instance
Returns: An order structure

ParamTypeRequiredDescription
idstringYesOrder id
symbolstringYesnot sent to exchange except for trigger orders with clientOid, but used internally by CCXT to filter
paramsobjectNoexchange specific parameters
params.triggerboolNotrue if fetching a trigger order
params.hfboolNofalse, // true for hf order
params.clientOidboolNounique order id created by users to identify their orders
params.marginModeobjectNo'cross' or 'isolated'
Supported exchanges

fetchSpotOrdersByStatus

fetch a list of spot orders

Kind: instance
Returns: An array of order structures

ParamTypeRequiredDescription
statusstringYesnot used for stop orders 'open' or 'closed'
symbolstringYesunified market symbol
sinceintNotimestamp in ms of the earliest order
limitintNomax number of orders to return
paramsobjectNoexchange specific params
params.untilintNoend time in ms
params.sidestringNobuy or sell
params.typestringNolimit, market, limit_stop or market_stop
params.tradeTypestringNoTRADE for spot trading, MARGIN_TRADE or MARGIN_ISOLATED_TRADE for Margin Trading
params.currentPageintNotrigger orders only current page
params.orderIdsstringNotrigger orders only comma separated order ID list
params.triggerboolNoTrue if fetching a trigger order
params.hfboolNofalse, // true for hf order
params.marginModestringNo'cross' or 'isolated', only for margin orders
Supported exchanges

fetchStatus

the latest known information on the availability of the exchange API

Kind: instance
Returns: object - a status structure

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchSwapMarkets

retrieves data on all swap markets for hyperliquid

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

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchTicker

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

Kind: instance
Returns: object - a ticker structure

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchTickerWs

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

Kind: instance
Returns: object - a ticker structure

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.methodstringNomethod to use can be ticker.price or ticker.book
params.returnRateLimitsbooleanNoreturn the rate limits for the exchange
Supported exchanges

fetchTickers

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

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

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbols of the markets to fetch tickers for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.locstringNocrypto location, default: us
Supported exchanges

fetchTime

fetches the current integer timestamp in milliseconds from the exchange server

Kind: instance
Returns: int - the current integer timestamp in milliseconds from the exchange server

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchTrades

get the list of most recent trades for a particular symbol

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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch trades for
sinceintNotimestamp in ms of the earliest trade to fetch
limitintNothe maximum amount of trades to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch trades for
Supported exchanges

fetchTradesWs

fetch all trades made by the user

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trades structures to retrieve, default=500, max=1000
paramsobjectNoextra parameters specific to the exchange API endpoint EXCHANGE SPECIFIC PARAMETERS
params.fromIdintNotrade ID to begin at
Supported exchanges

fetchTradingFee

fetch the trading fees for a market

Kind: instance
Returns: object - a fee structure

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchTradingFees

fetch the trading fees for multiple markets

Kind: instance
Returns: object - a dictionary of fee structures indexed by market symbols

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchTradingFeesWs

fetch the trading fees for multiple markets

Kind: instance
Returns: object - a dictionary of fee structures indexed by market symbols

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the bitvavo api endpoint
Supported exchanges

fetchTradingLimits

fetch the trading limits for a market

Kind: instance
Returns: object - a trading limits structure

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchTransactionFee

please use fetchDepositWithdrawFee instead

Kind: instance
Returns: object - a fee structure

ParamTypeRequiredDescription
codestringYesunified currency code
paramsobjectNoextra parameters specific to the exchange API endpoint
params.networkstringNothe network code of the currency
Supported exchanges

fetchTransactionFees

please use fetchDepositWithdrawFees instead

Kind: instance
Returns: Array<object> - a list of fee structures

ParamTypeRequiredDescription
codesArray<string>, undefinedYesnot used by binance fetchTransactionFees ()
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchTransactions

fetch history of deposits, withdrawals, and transfers

Kind: instance
Returns: Array<Transaction> - a list of transaction structures

ParamTypeRequiredDescription
codestringNounified currency code
sinceintNothe earliest time in ms to fetch transactions for
limitintNothe maximum number of transaction structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
Supported exchanges

fetchTransfer

fetches a transfer

Kind: instance
Returns: object - a transfer structure

ParamTypeRequiredDescription
idstringYestransfer id
codestringNounified currency code of the currency transferred
paramsobjectNoextra parameters specific to the bitvavo api endpoint
Supported exchanges

fetchTransfers

fetch a history of internal transfers made on an account

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

ParamTypeRequiredDescription
codestringYesunified currency code of the currency transferred
sinceintNothe earliest time in ms to fetch transfers for
limitintNothe maximum number of transfers structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch transfers for
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.internalbooleanNodefault false, when true will fetch pay trade history
Supported exchanges

fetchUnderlyingAssets

fetches the market ids of underlying assets for a specific contract market type

Kind: instance
Returns: Array<object> - a list of underlying assets

ParamTypeRequiredDescription
paramsobjectNoexchange specific params
params.typestringNothe contract market type, 'option', 'swap' or 'future', the default is 'option'
Supported exchanges

fetchUtaBalance

helper method for fetching balance with unified trading account (uta) endpoint

Kind: instance
Returns: object - a balance structure

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNo'unified', 'spot', 'funding', 'cross', 'isolated' or 'swap' (default is 'unified')
params.marginModestringNo'cross' or 'isolated', margin type for fetching margin balance, only applicable if type is margin (default is cross)
Supported exchanges

fetchUtaOrder

fetch uta order

Kind: instance
Returns: object - An order structure

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountModestringNo'unified' or 'classic' (default is 'unified')
params.clientOrderIdstringNoclient order id, required if id is not provided
params.marginModestringNo'cross' or 'isolated', required if fetching a margin order (unified accountMode supports only cross margin)
Supported exchanges

fetchUtaOrdersByStatus

helper method for fetching orders by status with uta endpoint

Kind: instance
Returns: An array of order structures

ParamTypeRequiredDescription
statusstringYes'active' or 'closed', only 'active' is valid for stop orders
symbolstringYesunified symbol for the market to retrieve orders from
sinceintNotimestamp in ms of the earliest order to retrieve
limitintNoThe maximum number of orders to retrieve
paramsobjectNoexchange specific parameters
params.untilintNoEnd time in ms
params.sidestringNoclosed orders only 'BUY' or 'SELL'
params.accountModestringNo'unified' or 'classic' (default is unified)
params.marginModestringNo'cross' or 'isolated', only for margin orders (unified accountMode supports only cross margin)
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
Supported exchanges

fetchVolatilityHistory

fetch the historical volatility of an option market based on an underlying asset

Kind: instance
Returns: Array<object> - a list of volatility history objects

ParamTypeRequiredDescription
codestringYesunified currency code
paramsobjectNoextra parameters specific to the exchange API endpoint
params.periodintNothe period in days to fetch the volatility for: 7,14,21,30,60,90,180,270
Supported exchanges

fetchWithdrawal

fetch data on a currency withdrawal via the withdrawal id

Kind: instance
Returns: object - a transaction structure

ParamTypeRequiredDescription
idstringYeswithdrawal id
codestringYesnot used by bitmart.fetchWithdrawal
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchWithdrawals

fetch all withdrawals made from an account

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

ParamTypeRequiredDescription
codestringNounified currency code
sinceintNothe earliest time in ms to fetch withdrawals for
limitintNothe maximum number of withdrawal structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

fetchWithdrawalsWs

fetch all withdrawals made from an account

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

ParamTypeRequiredDescription
codestringYesunified currency code
sinceintNothe earliest time in ms to fetch withdrawals for
limitintNothe maximum number of withdrawals structures to retrieve
paramsobjectNoextra parameters specific to the bitvavo api endpoint
Supported exchanges

isUTAEnabled

returns true or false so the user can check if unified account is enabled

Kind: instance
Returns: boolean - true if unified account is enabled, false otherwise

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

isUnifiedEnabled

returns [enableUnifiedMargin, enableUnifiedAccount] so the user can check if unified account is enabled

Kind: instance
Returns: any - [enableUnifiedMargin, enableUnifiedAccount]

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

loadMigrationStatus

loads the migration status for the account (hf or not)

Kind: instance
Returns: any - ignore

ParamTypeDescription
forcebooleanload account state for non hf
Supported exchanges

loadUnifiedStatus

returns unifiedAccount so the user can check if the unified account is enabled

Kind: instance
Returns: boolean - true or false if the enabled unified account is enabled or not and sets the unifiedAccount option if it is undefined

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

market

calculates the presumptive fee that would be charged for an order

Kind: instance
Returns: object - contains the rate, the percentage multiplied to the order amount to obtain the fee amount, and cost, the total value of the fee in units of the quote currency, for the order

ParamTypeDescription
symbolstringunified market symbol
typestringnot used by btcmarkets.calculateFee
sidestringnot used by btcmarkets.calculateFee
amountfloathow much you want to trade, in units of the base currency on most exchanges, or number of contracts
pricefloatthe price for the order to be filled at, in units of the quote currency
takerOrMakerstring'taker' or 'maker'
paramsobject
Supported exchanges

preLoadLighterLibrary

if the required credentials are available in options, it will pre-load the lighter Signer to avoid delaying sensitive calls like createOrder the first time they're executed

Kind: instance
Returns: boolean - true if the signer was loaded, false otherwise

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

redeemGiftCode

redeem gift code

Kind: instance
Returns: object - response from the exchange

ParamTypeRequiredDescription
giftcardCodestringYes
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

reduceMargin

remove margin from a position

Kind: instance
Returns: object - a margin structure

ParamTypeRequiredDescription
symbolstringYesunified market symbol
amountfloatYesamount of margin to remove
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountAccountNoaccount id to use, required
Supported exchanges

repayCrossMargin

repay borrowed margin and interest

Kind: instance
Returns: object - a margin loan structure

ParamTypeRequiredDescription
codestringYesunified currency code of the currency to repay
amountfloatYesthe amount to repay
paramsobjectNoextra parameters specific to the exchange API endpoint
params.portfolioMarginbooleanNoset to true if you would like to repay margin in a portfolio margin account
params.repayCrossMarginMethodstringNoportfolio margin only 'papiPostRepayLoan' (default), 'papiPostMarginRepayDebt' (alternative)
params.specifyRepayAssetsstringNoportfolio margin papiPostMarginRepayDebt only specific asset list to repay debt
Supported exchanges

repayIsolatedMargin

repay borrowed margin and interest

Kind: instance
Returns: object - a margin loan structure

ParamTypeRequiredDescription
symbolstringYesunified market symbol, required for isolated margin
codestringYesunified currency code of the currency to repay
amountfloatYesthe amount to repay
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

repayMargin

repay borrowed margin and interest

Kind: instance
Returns: object - a margin loan structure

ParamTypeRequiredDescription
codestringYesunified currency code of the currency to repay
amountfloatYesthe amount to repay
symbolstringYesnot used by woo.repayMargin ()
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

reserveRequestWeight

Instead of trading to increase the address based rate limits, this action allows reserving additional actions for 0.0005 USDC per request. The cost is paid from the Perps balance.

Kind: instance
Returns: object - a response object

ParamTypeRequiredDescription
weightnumberYesthe weight to reserve, 1 weight = 1 action, 0.0005 USDC per action
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

setAgentAbstraction

set agent abstraction mode

Kind: instance
Returns: dictionary response from the exchange

ParamTypeRequiredDescription
abstractionstringYesone of the strings ["i", "u", "p"] where "i" is "disabled", "u" is "unifiedAccount", and "p" is "portfolioMargin"
paramsobjectNo
Supported exchanges

setContractLeverage

set the level of leverage for a market

Kind: instance
Returns: object - response from the exchange

ParamTypeRequiredDescription
leveragefloatYesthe rate of leverage
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.utabooleanNoset to true for the unified trading account (uta)
Supported exchanges

setLeverage

set the level of leverage for a market

Kind: instance
Returns: object - response from the exchange

ParamTypeRequiredDescription
leveragefloatYesthe rate of leverage
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountAccountNoaccount id to use, required
Supported exchanges

setMargin

Either adds or reduces margin in an isolated position in order to set the margin to a specific value

Kind: instance
Returns: object - A margin structure

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market to set margin in
amountfloatYesthe amount to set the margin to
paramsobjectNoparameters specific to the bingx api endpoint
Supported exchanges

setMarginMode

set margin mode to 'cross' or 'isolated'

Kind: instance
Returns: object - response from the exchange

ParamTypeRequiredDescription
marginModestringYes'cross' or 'isolated'
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

setPositionMode

set hedged to true or false for a market

Kind: instance
Returns: object - response from the exchange

ParamTypeRequiredDescription
hedgedboolYesset to true to use dualSidePosition
symbolstringYesnot used by bingx setPositionMode ()
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

setSandboxMode

enables or disables demo trading mode, if enabled will send PAPTRADING=1 in headers

Kind: instance

Param
enabled
Supported exchanges

setUserAbstraction

set user abstraction mode

Kind: instance
Returns: dictionary response from the exchange

ParamTypeRequiredDescription
abstractionstringYesone of the strings ["disabled", "unifiedAccount", "portfolioMargin"],
paramsobjectNo
params.typestringNo'userSetAbstraction' or 'agentSetAbstraction' default is 'userSetAbstraction'
Supported exchanges

signIn

sign in, must be called prior to using other authenticated methods

Kind: instance
Returns: response from exchange

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

signTxEd25519

Helper to sign some transaction bytes and return a generic transaction execution request.

Kind: instance
Returns: object - the input transaction bytes and the signed digest

ParamTypeRequiredDescription
txobjectNotransaction bytes and the signing digest for them
Supported exchanges

transfer

transfer currency internally between wallets on the same account

Kind: instance
Returns: object - a transfer structure

ParamTypeRequiredDescription
codestringYesunified currency code
amountfloatYesamount to transfer
fromAccountstringYesaccount to transfer from
toAccountstringYesaccount to transfer to
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

transferClassic

transfer currency internally between wallets on the same account with classic endpoints

Kind: instance
Returns: object - a transfer structure

ParamTypeRequiredDescription
codestringYesunified currency code
amountfloatYesamount to transfer
fromAccountstringYesaccount to transfer from
toAccountstringYesaccount to transfer to
paramsobjectNoextra parameters specific to the exchange API endpoint
params.transferTypestringNoINTERNAL, PARENT_TO_SUB, SUB_TO_PARENT (default is INTERNAL)
params.fromUserIdstringNorequired if transferType is SUB_TO_PARENT
params.toUserIdstringNorequired if transferType is PARENT_TO_SUB
Supported exchanges

transferOut

transfer from spot wallet to futures wallet

Kind: instance
Returns: a transfer structure

ParamTypeRequiredDescription
codestrYesUnified currency code
amountfloatYesSize of the transfer
paramsdictNoExchange specific parameters
Supported exchanges

transferUta

transfer currency internally between wallets on the same account with uta endpoint

Kind: instance
Returns: object - a transfer structure

ParamTypeRequiredDescription
codestringYesunified currency code
amountfloatYesamount to transfer
fromAccountstringYesaccount to transfer from
toAccountstringYesaccount to transfer to
paramsobjectNoextra parameters specific to the exchange API endpoint
params.transferTypestringNoINTERNAL, PARENT_TO_SUB, SUB_TO_PARENT, SUB_TO_SUB (default is INTERNAL)
params.fromUserIdstringNorequired if transferType is SUB_TO_PARENT or SUB_TO_SUB
params.toUserIdstringNorequired if transferType is PARENT_TO_SUB or SUB_TO_SUB
Supported exchanges

unWatchBalance

unWatches balance

Kind: instance
Returns: object - status of the unwatch request

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

unWatchBidsAsks

unWatches best bid & ask for symbols

Kind: instance
Returns: object - a ticker structure

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

unWatchFundingRate

unWatches the current funding rate for a symbol

Kind: instance
Returns: object - a funding rate structure

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

unWatchMarkPrice

unWatches a mark price for a specific market

Kind: instance
Returns: object - a ticker structure

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.use1sFreqbooleanNodefault is true if set to true, the mark price will be updated every second, otherwise every 3 seconds
Supported exchanges

unWatchMarkPrices

watches the mark price for all markets

Kind: instance
Returns: object - a ticker structure

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.use1sFreqbooleanNodefault is true if set to true, the mark price will be updated every second, otherwise every 3 seconds
Supported exchanges

unWatchMyTrades

unWatches information on multiple trades made by the user

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market orders were made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.unifiedMarginbooleanNouse unified margin account
params.executionFastbooleanNouse fast execution
Supported exchanges

unWatchOHLCV

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

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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch OHLCV data for
timeframestringYesthe length of time each candle represents
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

unWatchOHLCVForSymbols

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

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

ParamTypeRequiredDescription
symbolsAndTimeframesArray<Array<string>>Yesarray of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

unWatchOrderBook

unsubscribe from the orderbook channel

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

ParamTypeRequiredDescription
symbolstringYessymbol of the market to unwatch the trades for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.limitintNoorderbook limit, default is undefined
Supported exchanges

unWatchOrderBookForSymbols

unsubscribe from the orderbook channel

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

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to unwatch the trades for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.limitintNoorderbook limit, default is undefined
Supported exchanges

unWatchOrders

unWatches information on multiple orders made by the user

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

ParamTypeRequiredDescription
symbolstringNounified market symbol of the market orders were made in
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

unWatchPositions

unWatches from the stream channel

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

ParamTypeRequiredDescription
symbolsArray<string>Nolist of unified market symbols to watch positions for
paramsobjectYesextra parameters specific to the exchange API endpoint
Supported exchanges

unWatchTicker

unWatches a price ticker

Kind: instance
Returns: object - a ticker structure

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

unWatchTickers

unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list

Kind: instance
Returns: object - a ticker structure

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

unWatchTrades

unsubscribe from the trades channel

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market trades were made in
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

unWatchTradesForSymbols

unsubscribe from the trades channel

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

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch trades for
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

upgradeUnifiedTradeAccount

upgrades the account to unified trade account warning this is irreversible

Kind: instance
Returns: any - nothing

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

verifyGiftCode

verify gift code

Kind: instance
Returns: object - response from the exchange

ParamTypeRequiredDescription
idstringYesreference number id
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

watchBalance

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

Kind: instance
Returns: object - a balance structure

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

watchBidsAsks

watches best bid & ask for symbols

Kind: instance
Returns: object - a ticker structure

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

watchFundingRate

watch the current funding rate

Kind: instance
Returns: object - a funding rate structure

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

watchFundingRates

watch the funding rate for multiple markets

Kind: instance
Returns: object - a dictionary of funding rate structures, indexed by market symbols

ParamTypeRequiredDescription
symbolsArray<string>Yesa list of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

watchLiquidations

watch the public liquidations of a trading pair

Kind: instance
Returns: object - an array of liquidation structures

ParamTypeRequiredDescription
symbolstringYesunified CCXT market symbol
sinceintNothe earliest time in ms to fetch liquidations for
limitintNothe maximum number of liquidation structures to retrieve
paramsobjectNoexchange specific parameters for the bitmex api endpoint
Supported exchanges

watchLiquidationsForSymbols

watch the public liquidations of a trading pair

Kind: instance
Returns: object - an array of liquidation structures

ParamTypeRequiredDescription
symbolsArray<string>Yeslist of unified market symbols
sinceintNothe earliest time in ms to fetch liquidations for
limitintNothe maximum number of liquidation structures to retrieve
paramsobjectNoexchange specific parameters for the bitmex api endpoint
Supported exchanges

watchMarkPrice

watches a mark price for a specific market

Kind: instance
Returns: object - a ticker structure

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.use1sFreqbooleanNodefault is true if set to true, the mark price will be updated every second, otherwise every 3 seconds
Supported exchanges

watchMarkPrices

watches the mark price for all markets

Kind: instance
Returns: object - a ticker structure

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
params.use1sFreqbooleanNodefault is true if set to true, the mark price will be updated every second, otherwise every 3 seconds
Supported exchanges

watchMyLiquidations

watch the private liquidations of a trading pair

Kind: instance
Returns: object - an array of liquidation structures

ParamTypeRequiredDescription
symbolstringYesunified CCXT market symbol
sinceintNothe earliest time in ms to fetch liquidations for
limitintNothe maximum number of liquidation structures to retrieve
paramsobjectNoexchange specific parameters for the bitmex api endpoint
Supported exchanges

watchMyLiquidationsForSymbols

watch the private liquidations of a trading pair

Kind: instance
Returns: object - an array of liquidation structures

ParamTypeRequiredDescription
symbolsArray<string>Yeslist of unified market symbols
sinceintNothe earliest time in ms to fetch liquidations for
limitintNothe maximum number of liquidation structures to retrieve
paramsobjectNoexchange specific parameters for the bitmex api endpoint
Supported exchanges

watchMyTrades

watches information on multiple trades made by the user

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market trades were made in
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trade structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.unifiedMarginbooleanNouse unified margin account
Supported exchanges

watchMyTradesForSymbols

watches information on multiple trades made by the user

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

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch trades for
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trade structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

watchOHLCV

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

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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch OHLCV data for
timeframestringYesthe length of time each candle represents
sinceintNotimestamp in ms of the earliest candle to fetch
limitintNothe maximum amount of candles to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

watchOHLCVForSymbols

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

Kind: instance
Returns: object - A list of candles ordered as timestamp, open, high, low, close, volume

ParamTypeRequiredDescription
symbolsAndTimeframesArray<Array<string>>Yesarray of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
sinceintNotimestamp in ms of the earliest candle to fetch
limitintNothe maximum amount of candles to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

watchOrderBook

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

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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
limitintNothe maximum amount of order book entries to return.
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

watchOrderBookForSymbols

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

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

ParamTypeRequiredDescription
symbolsArray<string>Yesunified array of symbols
limitintNothe maximum amount of order book entries to return.
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

watchOrders

watches information on multiple orders made by the user

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market orders were made in
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

watchOrdersForSymbols

watches information on multiple orders made by the user across multiple symbols

Kind: instance
Returns: Array<object> - a list of [order structures]{@link /docs/manual#order-structure

ParamTypeRequiredDescription
symbolsArray<string>Yes
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of order structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.triggerbooleanNoset to true for trigger orders
Supported exchanges

watchPosition

watch open positions for a specific symbol

Kind: instance
Returns: object - a position structure

ParamTypeDescription
symbolstring, undefinedunified market symbol
paramsobjectextra parameters specific to the exchange API endpoint
Supported exchanges

watchPositions

watch all open positions

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

ParamTypeRequiredDescription
symbolsArray<string>Nolist of unified market symbols
sinceintNothe earliest time in ms to fetch positions for
limitintNothe maximum number of positions to retrieve
paramsobjectYesextra parameters specific to the exchange API endpoint
Supported exchanges

watchTicker

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

Kind: instance
Returns: object - a ticker structure

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

watchTickers

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
Returns: object - a ticker structure

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

watchTrades

watches information on multiple trades made in a market

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market trades were made in
sinceintNothe earliest time in ms to fetch orders for
limitintNothe maximum number of trade structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

watchTradesForSymbols

get the list of most recent trades for a list of symbols

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

ParamTypeRequiredDescription
symbolsArray<string>Yesunified symbol of the market to fetch trades for
sinceintNotimestamp in ms of the earliest trade to fetch
limitintNothe maximum amount of trades to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
Supported exchanges

withdraw

make a withdrawal

Kind: instance
Returns: object - a transaction structure

ParamTypeRequiredDescription
codestringYesunified currency code
amountfloatYesthe amount to withdraw
addressstringYesthe address to withdraw to
tagstringYes
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountAccountNoaccount id to use, required
Supported exchanges

withdrawWs

make a withdrawal

Kind: instance
Returns: object - a transaction structure

ParamTypeRequiredDescription
codestringYesunified currency code
amountfloatYesthe amount to withdraw
addressstringYesthe address to withdraw to
tagstringYes
paramsobjectNoextra parameters specific to the bitvavo api endpoint
Supported exchanges

本页内容

addMarginSupported exchangesborrowCrossMarginSupported exchangesborrowIsolatedMarginSupported exchangescalculatePricePrecisionSupported exchangescancelAllContractOrdersSupported exchangescancelAllOrdersSupported exchangescancelAllOrdersAfterSupported exchangescancelAllOrdersWsSupported exchangescancelAllSpotOrdersSupported exchangescancelAllUtaOrdersSupported exchangescancelContractOrderSupported exchangescancelOrderSupported exchangescancelOrderWsSupported exchangescancelOrdersSupported exchangescancelOrdersForSymbolsSupported exchangescancelOrdersRequestSupported exchangescancelOrdersWsSupported exchangescancelSpotOrderSupported exchangescancelTwapOrderSupported exchangescancelUtaOrderSupported exchangescloseAllPositionsSupported exchangesclosePositionSupported exchangesclosePositionsSupported exchangescreateAccountSupported exchangescreateContractOrderSupported exchangescreateContractOrdersSupported exchangescreateConvertTradeSupported exchangescreateDepositAddressSupported exchangescreateGiftCodeSupported exchangescreateMarkeSellOrderWithCostSupported exchangescreateMarketBuyOrderWithCostSupported exchangescreateMarketOrderWithCostSupported exchangescreateMarketSellOrderWithCostSupported exchangescreateOrderSupported exchangescreateOrderWsSupported exchangescreateOrdersSupported exchangescreateOrdersRequestSupported exchangescreateOrdersWsSupported exchangescreateSpotOrderSupported exchangescreateSpotOrdersSupported exchangescreateSubAccountSupported exchangescreateSwapOrderSupported exchangescreateTrailingAmountOrderSupported exchangescreateTrailingPercentOrderSupported exchangescreateTwapOrderSupported exchangescreateUtaOrderSupported exchangescreateVaultSupported exchangesdepositSupported exchangeseditContractOrderSupported exchangeseditOrderSupported exchangeseditOrderWsSupported exchangeseditOrdersSupported exchangesenableDemoTradingSupported exchangesenableUserDexAbstractionSupported exchangesfetchADLRankSupported exchangesfetchAccountSupported exchangesfetchAccountIdByTypeSupported exchangesfetchAccountSettingsSupported exchangesfetchAccountsSupported exchangesfetchAllGreeksSupported exchangesfetchBalanceSupported exchangesfetchBalanceWsSupported exchangesfetchBidsAsksSupported exchangesfetchBorrowInterestSupported exchangesfetchBorrowRateHistoriesSupported exchangesfetchBorrowRateHistorySupported exchangesfetchCanceledAndClosedOrdersSupported exchangesfetchCanceledOrdersSupported exchangesfetchClosedOrderSupported exchangesfetchClosedOrdersSupported exchangesfetchClosedOrdersWsSupported exchangesfetchContractBalanceSupported exchangesfetchContractDepositAddressSupported exchangesfetchContractDepositsSupported exchangesfetchContractOrderSupported exchangesfetchContractOrdersByStatusSupported exchangesfetchContractWithdrawalsSupported exchangesfetchConvertCurrenciesSupported exchangesfetchConvertQuoteSupported exchangesfetchConvertTradeSupported exchangesfetchConvertTradeHistorySupported exchangesfetchCrossBorrowRateSupported exchangesfetchCrossBorrowRatesSupported exchangesfetchCurrenciesSupported exchangesfetchCurrenciesWsSupported exchangesfetchDepositSupported exchangesfetchDepositAddressSupported exchangesfetchDepositAddressesSupported exchangesfetchDepositAddressesByNetworkSupported exchangesfetchDepositMethodIdSupported exchangesfetchDepositMethodIdsSupported exchangesfetchDepositMethodsSupported exchangesfetchDepositWithdrawFeeSupported exchangesfetchDepositWithdrawFeesSupported exchangesfetchDepositsSupported exchangesfetchDepositsWithdrawalsSupported exchangesfetchDepositsWsSupported exchangesfetchFundingHistorySupported exchangesfetchFundingIntervalSupported exchangesfetchFundingIntervalsSupported exchangesfetchFundingLimitsSupported exchangesfetchFundingRateSupported exchangesfetchFundingRateHistorySupported exchangesfetchFundingRatesSupported exchangesfetchGreeksSupported exchangesfetchHip3MarketsSupported exchangesfetchIsolatedBorrowRateSupported exchangesfetchIsolatedBorrowRatesSupported exchangesfetchL3OrderBookSupported exchangesfetchLastPricesSupported exchangesfetchLedgerSupported exchangesfetchLedgerEntrySupported exchangesfetchLeverageSupported exchangesfetchLeverageTiersSupported exchangesfetchLeveragesSupported exchangesfetchLiquidationsSupported exchangesfetchLongShortRatioHistorySupported exchangesfetchMarginAdjustmentHistorySupported exchangesfetchMarginModeSupported exchangesfetchMarginModesSupported exchangesfetchMarkPriceSupported exchangesfetchMarkPricesSupported exchangesfetchMarketLeverageTiersSupported exchangesfetchMarketsSupported exchangesfetchMarketsWsSupported exchangesfetchMyContractTradesSupported exchangesfetchMyDustTradesSupported exchangesfetchMyLiquidationsSupported exchangesfetchMySettlementHistorySupported exchangesfetchMySpotTradesSupported exchangesfetchMyTradesSupported exchangesfetchMyTradesWsSupported exchangesfetchMyUtaTradesSupported exchangesfetchOHLCVSupported exchangesfetchOHLCVWsSupported exchangesfetchOpenInterestSupported exchangesfetchOpenInterestHistorySupported exchangesfetchOpenInterestsSupported exchangesfetchOpenOrderSupported exchangesfetchOpenOrdersSupported exchangesfetchOpenOrdersWsSupported exchangesfetchOptionSupported exchangesfetchOptionChainSupported exchangesfetchOptionPositionsSupported exchangesfetchOrderSupported exchangesfetchOrderBookSupported exchangesfetchOrderBookWsSupported exchangesfetchOrderBooksSupported exchangesfetchOrderClassicSupported exchangesfetchOrderTradesSupported exchangesfetchOrderWsSupported exchangesfetchOrdersSupported exchangesfetchOrdersByIdsSupported exchangesfetchOrdersByStatusSupported exchangesfetchOrdersClassicSupported exchangesfetchOrdersWsSupported exchangesfetchPortfolioDetailsSupported exchangesfetchPortfoliosSupported exchangesfetchPositionSupported exchangesfetchPositionADLRankSupported exchangesfetchPositionHistorySupported exchangesfetchPositionModeSupported exchangesfetchPositionWsSupported exchangesfetchPositionsSupported exchangesfetchPositionsADLRankSupported exchangesfetchPositionsForSymbolSupported exchangesfetchPositionsHistorySupported exchangesfetchPositionsRiskSupported exchangesfetchPositionsWsSupported exchangesfetchSettlementHistorySupported exchangesfetchSpotMarketsSupported exchangesfetchSpotOrderSupported exchangesfetchSpotOrdersByStatusSupported exchangesfetchStatusSupported exchangesfetchSwapMarketsSupported exchangesfetchTickerSupported exchangesfetchTickerWsSupported exchangesfetchTickersSupported exchangesfetchTimeSupported exchangesfetchTradesSupported exchangesfetchTradesWsSupported exchangesfetchTradingFeeSupported exchangesfetchTradingFeesSupported exchangesfetchTradingFeesWsSupported exchangesfetchTradingLimitsSupported exchangesfetchTransactionFeeSupported exchangesfetchTransactionFeesSupported exchangesfetchTransactionsSupported exchangesfetchTransferSupported exchangesfetchTransfersSupported exchangesfetchUnderlyingAssetsSupported exchangesfetchUtaBalanceSupported exchangesfetchUtaOrderSupported exchangesfetchUtaOrdersByStatusSupported exchangesfetchVolatilityHistorySupported exchangesfetchWithdrawalSupported exchangesfetchWithdrawalsSupported exchangesfetchWithdrawalsWsSupported exchangesisUTAEnabledSupported exchangesisUnifiedEnabledSupported exchangesloadMigrationStatusSupported exchangesloadUnifiedStatusSupported exchangesmarketSupported exchangespreLoadLighterLibrarySupported exchangesredeemGiftCodeSupported exchangesreduceMarginSupported exchangesrepayCrossMarginSupported exchangesrepayIsolatedMarginSupported exchangesrepayMarginSupported exchangesreserveRequestWeightSupported exchangessetAgentAbstractionSupported exchangessetContractLeverageSupported exchangessetLeverageSupported exchangessetMarginSupported exchangessetMarginModeSupported exchangessetPositionModeSupported exchangessetSandboxModeSupported exchangessetUserAbstractionSupported exchangessignInSupported exchangessignTxEd25519Supported exchangestransferSupported exchangestransferClassicSupported exchangestransferOutSupported exchangestransferUtaSupported exchangesunWatchBalanceSupported exchangesunWatchBidsAsksSupported exchangesunWatchFundingRateSupported exchangesunWatchMarkPriceSupported exchangesunWatchMarkPricesSupported exchangesunWatchMyTradesSupported exchangesunWatchOHLCVSupported exchangesunWatchOHLCVForSymbolsSupported exchangesunWatchOrderBookSupported exchangesunWatchOrderBookForSymbolsSupported exchangesunWatchOrdersSupported exchangesunWatchPositionsSupported exchangesunWatchTickerSupported exchangesunWatchTickersSupported exchangesunWatchTradesSupported exchangesunWatchTradesForSymbolsSupported exchangesupgradeUnifiedTradeAccountSupported exchangesverifyGiftCodeSupported exchangeswatchBalanceSupported exchangeswatchBidsAsksSupported exchangeswatchFundingRateSupported exchangeswatchFundingRatesSupported exchangeswatchLiquidationsSupported exchangeswatchLiquidationsForSymbolsSupported exchangeswatchMarkPriceSupported exchangeswatchMarkPricesSupported exchangeswatchMyLiquidationsSupported exchangeswatchMyLiquidationsForSymbolsSupported exchangeswatchMyTradesSupported exchangeswatchMyTradesForSymbolsSupported exchangeswatchOHLCVSupported exchangeswatchOHLCVForSymbolsSupported exchangeswatchOrderBookSupported exchangeswatchOrderBookForSymbolsSupported exchangeswatchOrdersSupported exchangeswatchOrdersForSymbolsSupported exchangeswatchPositionSupported exchangeswatchPositionsSupported exchangeswatchTickerSupported exchangeswatchTickersSupported exchangeswatchTradesSupported exchangeswatchTradesForSymbolsSupported exchangeswithdrawSupported exchangeswithdrawWsSupported exchanges