Back to Ccxt

BaseSpec

wiki/baseSpec.md

4.5.52373.8 KB
Original Source

<a name="addMargin" id="addmargin"></a>

addMargin

add margin

Kind: instance
Returns: <code>object</code> - a margin structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
amount<code>float</code>Yesamount of margin to add
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>Account</code>Noaccount id to use, required
Supported exchanges

<a name="borrowCrossMargin" id="borrowcrossmargin"></a>

borrowCrossMargin

create a loan to borrow margin

Kind: instance
Returns: <code>object</code> - a margin loan structure

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code of the currency to borrow
amount<code>float</code>Yesthe amount to borrow
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.portfolioMargin<code>boolean</code>Noset to true if you would like to borrow margin in a portfolio margin account
Supported exchanges

<a name="borrowIsolatedMargin" id="borrowisolatedmargin"></a>

borrowIsolatedMargin

create a loan to borrow margin

Kind: instance
Returns: <code>object</code> - a margin loan structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol, required for isolated margin
code<code>string</code>Yesunified currency code of the currency to borrow
amount<code>float</code>Yesthe amount to borrow
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="calculatePricePrecision" id="calculatepriceprecision"></a>

calculatePricePrecision

Helper function to calculate the Hyperliquid DECIMAL_PLACES price precision

Kind: instance
Returns: <code>int</code> - The calculated price precision

ParamTypeDescription
price<code>float</code>the price to use in the calculation
amountPrecision<code>int</code>the amountPrecision to use in the calculation
maxDecimals<code>int</code>the maxDecimals to use in the calculation
Supported exchanges

<a name="cancelAllContractOrders" id="cancelallcontractorders"></a>

cancelAllContractOrders

helper method for cancelling all contract orders

Kind: instance
Returns: Response from the exchange

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.trigger<code>object</code>NoWhen true, all the trigger orders will be cancelled
Supported exchanges

<a name="cancelAllOrders" id="cancelallorders"></a>

cancelAllOrders

cancel all open orders in a market

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesalpaca cancelAllOrders cannot setting symbol, it will cancel all open orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="cancelAllOrdersAfter" id="cancelallordersafter"></a>

cancelAllOrdersAfter

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

Kind: instance
Returns: <code>object</code> - the api result

ParamTypeRequiredDescription
timeout<code>number</code>Yestime in milliseconds, 0 represents cancel the timer
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.type<code>string</code>Nospot or swap market
Supported exchanges

<a name="cancelAllOrdersWs" id="cancelallordersws"></a>

cancelAllOrdersWs

cancel all open orders in a market

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

ParamTypeRequiredDescription
symbol<code>string</code>Nounified market symbol of the market to cancel orders in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="cancelAllSpotOrders" id="cancelallspotorders"></a>

cancelAllSpotOrders

helper method for cancelling all spot orders

Kind: instance
Returns: Response from the exchange

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.trigger<code>bool</code>Noinvalid for isolated margin true if cancelling all stop orders
params.marginMode<code>string</code>No'cross' or 'isolated'
params.orderIds<code>string</code>Nostop orders only Comma separated order IDs
params.hf<code>bool</code>Nofalse, // true for hf order
Supported exchanges

<a name="cancelAllUtaOrders" id="cancelallutaorders"></a>

cancelAllUtaOrders

helper method for cancelling all uta orders

Kind: instance
Returns: Response from the exchange

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.trigger<code>bool</code>Notrue if cancelling all stop orders
params.marginMode<code>string</code>No'CROSS' or 'ISOLATED'
Supported exchanges

<a name="cancelContractOrder" id="cancelcontractorder"></a>

cancelContractOrder

helper method for cancelling contract orders

Kind: instance
Returns: <code>object</code> - An order structure

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.clientOrderId<code>string</code>Nocancel order by client order id
Supported exchanges

<a name="cancelOrder" id="cancelorder"></a>

cancelOrder

cancels an open order

Kind: instance
Returns: <code>object</code> - An order structure

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="cancelOrderWs" id="cancelorderws"></a>

cancelOrderWs

cancel multiple orders

Kind: instance
Returns: <code>object</code> - an list of order structures

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Nounified market symbol, default is undefined
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.cancelRestrictions<code>string</code>, <code>undefined</code>NoSupported 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.trigger<code>boolean</code>Noset to true if you would like to cancel a conditional order
Supported exchanges

<a name="cancelOrders" id="cancelorders"></a>

cancelOrders

cancel multiple orders

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

ParamTypeRequiredDescription
ids<code>Array<string></code>Yesorder ids
symbol<code>string</code>Nounified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>Account</code>Noaccount to cancel orders for, required
Supported exchanges

<a name="cancelOrdersForSymbols" id="cancelordersforsymbols"></a>

cancelOrdersForSymbols

cancel multiple orders for multiple symbols

Kind: instance
Returns: <code>object</code> - an list of order structures

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

<a name="cancelOrdersRequest" id="cancelordersrequest"></a>

cancelOrdersRequest

build the request payload for cancelling multiple orders

Kind: instance
Returns: <code>object</code> - the raw request object to be sent to the exchange

ParamTypeRequiredDescription
ids<code>Array<string></code>Yesorder ids
symbol<code>string</code>Yesunified market symbol
params<code>object</code>No
Supported exchanges

<a name="cancelOrdersWs" id="cancelordersws"></a>

cancelOrdersWs

cancel multiple orders

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

ParamTypeRequiredDescription
ids<code>Array<string></code>Yesorder ids
symbol<code>string</code>Yesnot used by cex cancelOrders()
params<code>object</code>Noextra parameters specific to the cex api endpoint
Supported exchanges

<a name="cancelSpotOrder" id="cancelspotorder"></a>

cancelSpotOrder

helper method for cancelling spot orders

Kind: instance
Returns: Response from the exchange

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.trigger<code>bool</code>NoTrue if cancelling a stop order
params.hf<code>bool</code>Nofalse, // true for hf order
params.sync<code>bool</code>Nofalse, // true to use the hf sync call
params.marginMode<code>string</code>No'cross' or 'isolated'
Supported exchanges

<a name="cancelTwapOrder" id="canceltwaporder"></a>

cancelTwapOrder

cancels a running twap order

Kind: instance
Returns: <code>object</code> - An order structure

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.expiresAfter<code>int</code>Notime in ms after which the twap order expires
params.vaultAddress<code>string</code>Nothe vault address for order
Supported exchanges

<a name="cancelUtaOrder" id="cancelutaorder"></a>

cancelUtaOrder

helper method for cancelling uta orders

Kind: instance
Returns: Response from the exchange

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.accountMode<code>string</code>No'unified' or 'classic' (default is 'unified')
params.clientOrderId<code>string</code>Noclient order id, required if id is not provided
params.marginMode<code>string</code>No'cross' or 'isolated', required if fetching a margin order (unified accountMode supports only cross margin)
Supported exchanges

<a name="closeAllPositions" id="closeallpositions"></a>

closeAllPositions

closes all open positions for a market type

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

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.productType<code>string</code>No'USDT-FUTURES', 'USDC-FUTURES', 'COIN-FUTURES', 'SUSDT-FUTURES', 'SUSDC-FUTURES' or 'SCOIN-FUTURES'
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
Supported exchanges

<a name="closePosition" id="closeposition"></a>

closePosition

closes open positions for a market

Kind: instance
Returns: <code>object</code> - an order structure

ParamTypeRequiredDescription
symbol<code>string</code>YesUnified CCXT market symbol
side<code>string</code>Nonot used by bingx
params<code>object</code>Noextra parameters specific to the bingx api endpoint
params.positionId<code>string</code>, <code>undefined</code>Nothe id of the position you would like to close
Supported exchanges

<a name="closePositions" id="closepositions"></a>

closePositions

closes open positions for a market

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

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the bingx api endpoint
params.recvWindow<code>string</code>Norequest valid time window value
Supported exchanges

<a name="createAccount" id="createaccount"></a>

createAccount

creates a sub-account under the main account

Kind: instance
Returns: <code>object</code> - a response object

ParamTypeRequiredDescription
name<code>string</code>Yesthe name of the sub-account
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.expiresAfter<code>int</code>Notime in ms after which the sub-account will expire
Supported exchanges

<a name="createContractOrder" id="createcontractorder"></a>

createContractOrder

helper method for creating contract orders

Kind: instance
Returns: <code>object</code> - an order structure

ParamTypeRequiredDescription
symbol<code>string</code>YesUnified CCXT market symbol
type<code>string</code>Yes'limit' or 'market'
side<code>string</code>Yes'buy' or 'sell'
amount<code>float</code>Yesthe amount of currency to trade
price<code>float</code>Nothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.takeProfit<code>object</code>NotakeProfit object in params containing the triggerPrice at which the attached take profit order will be triggered and the triggerPriceType
params.stopLoss<code>object</code>NostopLoss object in params containing the triggerPrice at which the attached stop loss order will be triggered and the triggerPriceType
params.triggerPrice<code>float</code>NoThe price a trigger order is triggered at
params.stopLossPrice<code>float</code>Noprice to trigger stop-loss orders
params.takeProfitPrice<code>float</code>Noprice to trigger take-profit orders
params.reduceOnly<code>bool</code>NoA mark to reduce the position size only. Set to false by default. Need to set the position size when reduceOnly is true.
params.timeInForce<code>string</code>NoGTC, GTT, IOC, or FOK, default is GTC, limit orders only
params.postOnly<code>bool</code>NoPost only flag, invalid when timeInForce is IOC or FOK
params.cost<code>float</code>Nothe cost of the order in units of USDT
params.marginMode<code>string</code>No'cross' or 'isolated', default is 'isolated'
params.hedged<code>bool</code>Noswap and future only true for hedged mode, false for one way mode, default is false ----------------- Exchange Specific Parameters -----------------
params.leverage<code>float</code>NoLeverage size of the order (mandatory param in request, default is 1)
params.clientOid<code>string</code>Noclient order id, defaults to uuid if not passed
params.remark<code>string</code>Noremark for the order, length cannot exceed 100 utf8 characters
params.stop<code>string</code>No'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.triggerPriceType<code>string</code>No"last", "mark", "index" - defaults to "mark"
params.stopPriceType<code>string</code>Noexchange-specific alternative for triggerPriceType: TP, IP or MP
params.closeOrder<code>bool</code>Noset to true to close position
params.test<code>bool</code>Noset to true to use the test order endpoint (does not submit order, use to validate params)
params.forceHold<code>bool</code>NoA 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.positionSide<code>string</code>Noswap and future only hedged two-way position side, LONG or SHORT
Supported exchanges

<a name="createContractOrders" id="createcontractorders"></a>

createContractOrders

helper method for creating contract orders in batch

Kind: instance
Returns: <code>object</code> - an order structure

ParamTypeRequiredDescription
orders<code>Array</code>Yeslist of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="createConvertTrade" id="createconverttrade"></a>

createConvertTrade

convert from one currency to another

Kind: instance
Returns: <code>object</code> - a conversion structure

ParamTypeRequiredDescription
id<code>string</code>Yesthe id of the trade that you want to make
fromCode<code>string</code>Yesthe currency that you want to sell and convert from
toCode<code>string</code>Yesthe currency that you want to buy and convert into
amount<code>float</code>Nohow much you want to trade in units of the from currency
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="createDepositAddress" id="createdepositaddress"></a>

createDepositAddress

create a currency deposit address

Kind: instance
Returns: <code>object</code> - an address structure

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code of the currency for the deposit address
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="createGiftCode" id="creategiftcode"></a>

createGiftCode

create gift code

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

ParamTypeRequiredDescription
code<code>string</code>Yesgift code
amount<code>float</code>Yesamount of currency for the gift
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="createMarkeSellOrderWithCost" id="createmarkesellorderwithcost"></a>

createMarkeSellOrderWithCost

create a market sell order by providing the symbol and cost

Kind: instance
Returns: <code>object</code> - an order structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to create an order in
cost<code>float</code>Yeshow much you want to trade in units of the quote currency
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="createMarketBuyOrderWithCost" id="createmarketbuyorderwithcost"></a>

createMarketBuyOrderWithCost

create a market buy order by providing the symbol and cost

Kind: instance
Returns: <code>object</code> - an order structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to create an order in
cost<code>float</code>Yeshow much you want to trade in units of the quote currency
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="createMarketOrderWithCost" id="createmarketorderwithcost"></a>

createMarketOrderWithCost

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

Kind: instance
Returns: <code>object</code> - an order structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to create an order in
side<code>string</code>Yes'buy' or 'sell'
cost<code>float</code>Yeshow much you want to trade in units of the quote currency
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="createMarketSellOrderWithCost" id="createmarketsellorderwithcost"></a>

createMarketSellOrderWithCost

create a market sell order by providing the symbol and cost

Kind: instance
Returns: <code>object</code> - an order structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to create an order in
cost<code>float</code>Yeshow much you want to trade in units of the quote currency
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="createOrder" id="createorder"></a>

createOrder

create a trade order

Kind: instance
Returns: <code>object</code> - an order structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to create an order in
type<code>string</code>Yes'market' or 'limit'
side<code>string</code>Yes'buy' or 'sell'
amount<code>float</code>Yeshow much of currency you want to trade in units of base currency
price<code>float</code>Nothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.reduceOnly<code>bool</code>Notrue or false whether the order is reduce-only
params.account<code>Account</code>Noaccount id to use, required
Supported exchanges

<a name="createOrderWs" id="createorderws"></a>

createOrderWs

create a trade order

Kind: instance
Returns: <code>object</code> - an order structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to create an order in
type<code>string</code>Yes'market' or 'limit'
side<code>string</code>Yes'buy' or 'sell'
amount<code>float</code>Yeshow much of currency you want to trade in units of base currency
price<code>float</code>, <code>undefined</code>Nothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.test<code>boolean</code>Yestest order, default false
params.returnRateLimits<code>boolean</code>Yesset to true to return rate limit information, default false
Supported exchanges

<a name="createOrders" id="createorders"></a>

createOrders

create a list of trade orders

Kind: instance
Returns: <code>object</code> - an order structure

ParamTypeRequiredDescription
orders<code>Array</code>Yeslist of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>Account</code>Noaccount id to use, required
Supported exchanges

<a name="createOrdersRequest" id="createordersrequest"></a>

createOrdersRequest

create a list of trade orders

Kind: instance
Returns: <code>object</code> - an order structure

ParamTypeDescription
orders<code>Array</code>list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
Supported exchanges

<a name="createOrdersWs" id="createordersws"></a>

createOrdersWs

create a list of trade orders

Kind: instance
Returns: <code>object</code> - an order structure

ParamTypeRequiredDescription
orders<code>Array</code>Yeslist of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="createSpotOrder" id="createspotorder"></a>

createSpotOrder

create a trade order on spot market

Kind: instance
Returns: <code>object</code> - an order structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to create an order in
type<code>string</code>Yes'market' or 'limit' or 'LIMIT_MAKER'
side<code>string</code>Yes'buy' or 'sell'
amount<code>float</code>Yeshow much of you want to trade in units of the base currency
price<code>float</code>Nothe price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.cost<code>float</code>Nomarket buy only the quote quantity that can be used as an alternative for the amount
params.test<code>bool</code>Nowhether to use the test endpoint or not, default is false
params.postOnly<code>bool</code>Noif true, the order will only be posted to the order book and not executed immediately
params.timeInForce<code>string</code>No'GTC', 'IOC', or 'PO'
params.clientOrderId<code>string</code>Noa unique id for the order
Supported exchanges

<a name="createSpotOrders" id="createspotorders"></a>

createSpotOrders

helper method for creating spot orders in batch

Kind: instance
Returns: <code>object</code> - an order structure

ParamTypeRequiredDescription
orders<code>Array</code>Yeslist of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.hf<code>bool</code>Nofalse, // true for hf orders
params.sync<code>bool</code>Nofalse, // true to use the hf sync call
Supported exchanges

<a name="createSubAccount" id="createsubaccount"></a>

createSubAccount

creates a sub-account under the main account

Kind: instance
Returns: <code>object</code> - a response object

ParamTypeRequiredDescription
name<code>string</code>Yesunused argument
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.expiryWindow<code>int</code>Notime to live in milliseconds
params.subAccountAddress<code>string</code>NoThe public key (address) of the sub-account to use for creation
params.subAccountPrivateKey<code>string</code>NoThe private key of the sub-account to use for creation
Supported exchanges

<a name="createSwapOrder" id="createswaporder"></a>

createSwapOrder

create a trade order on swap market

Kind: instance
Returns: <code>object</code> - an order structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to create an order in
type<code>string</code>Yes'market' or 'limit' or 'STOP'
side<code>string</code>Yes'buy' or 'sell'
amount<code>float</code>Yeshow much of you want to trade in units of the base currency
price<code>float</code>Nothe price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.postOnly<code>bool</code>Noif true, the order will only be posted to the order book and not executed immediately
params.reduceOnly<code>bool</code>Notrue or false whether the order is reduce only
params.triggerPrice<code>float</code>NoThe price at which a trigger order is triggered at
params.timeInForce<code>string</code>No'GTC', 'FOK', 'IOC', 'LIMIT_MAKER' or 'PO'
params.clientOrderId<code>string</code>Noa unique id for the order
Supported exchanges

<a name="createTrailingAmountOrder" id="createtrailingamountorder"></a>

createTrailingAmountOrder

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

Kind: instance
Returns: <code>object</code> - an order structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to create an order in
type<code>string</code>Yes'market' or 'limit'
side<code>string</code>Yes'buy' or 'sell'
amount<code>float</code>Yeshow much you want to trade in units of the base currency, or number of contracts
price<code>float</code>Nothe price for the order to be filled at, in units of the quote currency, ignored in market orders
trailingAmount<code>float</code>Yesthe quote amount to trail away from the current market price
trailingTriggerPrice<code>float</code>Yesthe price to activate a trailing order, default uses the price argument
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="createTrailingPercentOrder" id="createtrailingpercentorder"></a>

createTrailingPercentOrder

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

Kind: instance
Returns: <code>object</code> - an order structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to create an order in
type<code>string</code>Yes'market' or 'limit'
side<code>string</code>Yes'buy' or 'sell'
amount<code>float</code>Yeshow much you want to trade in units of the base currency, or number of contracts
price<code>float</code>Nothe price for the order to be filled at, in units of the quote currency, ignored in market orders
trailingPercent<code>float</code>Yesthe percent to trail away from the current market price
trailingTriggerPrice<code>float</code>Yesthe price to activate a trailing order, default uses the price argument
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="createTwapOrder" id="createtwaporder"></a>

createTwapOrder

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

Kind: instance
Returns: <code>object</code> - an order structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to create an order in
side<code>string</code>Yes'buy' or 'sell'
amount<code>float</code>Yeshow much of currency you want to trade in units of base currency
duration<code>int</code>Yesthe duration of the TWAP order in milliseconds
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.randomize<code>bool</code>Nowhether to randomize the time intervals of the TWAP order slices (default is false, meaning equal intervals)
params.reduceOnly<code>bool</code>Notrue or false whether the order is reduce-only
params.expiresAfter<code>int</code>Notime in ms after which the twap order expires
params.vaultAddress<code>string</code>Nothe vault address for order
Supported exchanges

<a name="createUtaOrder" id="createutaorder"></a>

createUtaOrder

helper method for creating uta orders

Kind: instance
Returns: <code>object</code> - an order structure

ParamTypeRequiredDescription
symbol<code>string</code>YesUnified CCXT market symbol
type<code>string</code>Yes'limit' or 'market'
side<code>string</code>Yes'buy' or 'sell'
amount<code>float</code>Yesthe amount of currency to trade
price<code>float</code>Nothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.clientOrderId<code>string</code>Noclient order id, defaults to uuid if not passed
params.cost<code>float</code>Nothe cost of the order in units of quote currency
params.timeInForce<code>string</code>NoGTC, GTD, IOC, FOK or PO
params.postOnly<code>bool</code>NoPost only flag, invalid when timeInForce is IOC or FOK (default is false)
params.reduceOnly<code>bool</code>Nocontract markets only A mark to reduce the position size only. Set to false by default
params.triggerPrice<code>float</code>NoThe price a trigger order is triggered at
params.triggerDirection<code>string</code>No'ascending' or 'descending', the direction the triggerPrice is triggered from, requires triggerPrice
params.triggerPriceType<code>string</code>Nocontract markets only "last", "mark", "index" - defaults to "mark"
params.stopLossPrice<code>float</code>Noprice to trigger stop-loss orders
params.takeProfitPrice<code>float</code>Noprice to trigger take-profit orders
params.marginMode<code>string</code>No'cross' or 'isolated', (default is 'cross' for margin orders, default is 'isolated' for contract orders) Exchange-specific parameters -------------------------------------------------
params.accountMode<code>string</code>No'unified' or 'classic', default is 'unified'
params.stp<code>string</code>No'', // self trade prevention, CN, CO, CB or DC
params.cancelAfter<code>int</code>NoCancel After N Seconds (Calculated from the time of entering the matching engine), only effective when timeInForce is GTD
params.sizeUnit<code>string</code>Nocontracts only 'BASECCY' (amount of base currency) or 'UNIT' (number of contracts), default is 'UNIT' Classic account parameters
params.autoBorrow<code>bool</code>Noclassic margin orders only
params.autoRepay<code>bool</code>Noclassic margin orders only
params.hedged<code>string</code>Noclassic contract orders only true for hedged mode, false for one way mode, default is false
params.leverage<code>int</code>Noclassic contract orders with isolated marginMode only Leverage size of the order
Supported exchanges

<a name="createVault" id="createvault"></a>

createVault

creates a value

Kind: instance
Returns: <code>object</code> - the api result

ParamTypeRequiredDescription
name<code>string</code>YesThe name of the vault
description<code>string</code>YesThe description of the vault
initialUsd<code>number</code>YesThe initialUsd of the vault
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="deposit" id="deposit"></a>

deposit

make a deposit

Kind: instance
Returns: <code>object</code> - a transaction structure

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
amount<code>float</code>Yesthe amount to deposit
id<code>string</code>Yesthe payment method id to be used for the deposit, can be retrieved from v2PrivateGetPaymentMethods
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.accountId<code>string</code>Nothe id of the account to deposit into
Supported exchanges

<a name="editContractOrder" id="editcontractorder"></a>

editContractOrder

edit a trade order

Kind: instance
Returns: <code>object</code> - an order structure

ParamTypeRequiredDescription
id<code>string</code>Yescancel order id
symbol<code>string</code>Yesunified symbol of the market to create an order in
type<code>string</code>Yes'market' or 'limit'
side<code>string</code>Yes'buy' or 'sell'
amount<code>float</code>Yeshow much of currency you want to trade in units of base currency
price<code>float</code>Nothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.portfolioMargin<code>boolean</code>Noset to true if you would like to edit an order in a portfolio margin account
Supported exchanges

<a name="editOrder" id="editorder"></a>

editOrder

edit a trade order

Kind: instance
Returns: <code>object</code> - an order structure

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Nounified symbol of the market to create an order in
type<code>string</code>No'market', 'limit' or 'stop_limit'
side<code>string</code>No'buy' or 'sell'
amount<code>float</code>Nohow much of the currency you want to trade in units of the base currency
price<code>float</code>Nothe price for the order, in units of the quote currency, ignored in market orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.triggerPrice<code>string</code>Nothe price to trigger a stop order
params.timeInForce<code>string</code>Nofor crypto trading either 'gtc' or 'ioc' can be used
params.clientOrderId<code>string</code>Noa unique identifier for the order, automatically generated if not sent
Supported exchanges

<a name="editOrderWs" id="editorderws"></a>

editOrderWs

edit a trade order

Kind: instance
Returns: <code>object</code> - an order structure

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified symbol of the market to create an order in
type<code>string</code>Yes'market' or 'limit'
side<code>string</code>Yes'buy' or 'sell'
amount<code>float</code>Yeshow much of the currency you want to trade in units of the base currency
price<code>float</code>, <code>undefined</code>Nothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="editOrders" id="editorders"></a>

editOrders

edit a list of trade orders

Kind: instance
Returns: <code>object</code> - an order structure

ParamTypeRequiredDescription
orders<code>Array</code>Yeslist of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="enableDemoTrading" id="enabledemotrading"></a>

enableDemoTrading

enables or disables demo trading mode

Kind: instance

ParamTypeRequiredDescription
enable<code>boolean</code>Notrue if demo trading should be enabled, false otherwise
Supported exchanges

<a name="enableUserDexAbstraction" id="enableuserdexabstraction"></a>

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
enabledYes
paramsYes
params.type<code>string</code>No'userDexAbstraction' or 'agentEnableDexAbstraction' default is 'userDexAbstraction'
Supported exchanges

<a name="fetchADLRank" id="fetchadlrank"></a>

fetchADLRank

fetches the auto deleveraging rank and risk percentage for a symbol

Kind: instance
Returns: <code>object</code> - an auto de leverage structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the auto deleveraging rank for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchAccount" id="fetchaccount"></a>

fetchAccount

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

Kind: instance
Returns: <code>object</code> - a balance structure

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchAccountIdByType" id="fetchaccountidbytype"></a>

fetchAccountIdByType

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

Kind: instance
Returns: <code>object</code> - a dictionary of account structures indexed by the account type

ParamTypeRequiredDescription
type<code>string</code>Yes'spot', 'swap' or 'future
marginMode<code>string</code>No'cross' or 'isolated'
symbol<code>string</code>Nounified ccxt market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchAccountSettings" id="fetchaccountsettings"></a>

fetchAccountSettings

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

Kind: instance
Returns: <code>object</code> - Dict repacked from list by symbol key

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>string</code>Nowill default to walletAddress if not provided
Supported exchanges

<a name="fetchAccounts" id="fetchaccounts"></a>

fetchAccounts

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

Kind: instance
Returns: <code>Array</code> - a list of account structures

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchAllGreeks" id="fetchallgreeks"></a>

fetchAllGreeks

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

Kind: instance
Returns: <code>object</code> - a greeks structure

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nounified symbols of the markets to fetch greeks for, all markets are returned if not assigned
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchBalance" id="fetchbalance"></a>

fetchBalance

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

Kind: instance
Returns: <code>object</code> - a balance structure

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>string</code>Noaccount object ID, required
Supported exchanges

<a name="fetchBalanceWs" id="fetchbalancews"></a>

fetchBalanceWs

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

Kind: instance
Returns: <code>object</code> - a balance structure

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.type<code>string</code>, <code>undefined</code>No'future', 'delivery', 'savings', 'funding', or 'spot'
params.marginMode<code>string</code>, <code>undefined</code>No'cross' or 'isolated', for margin trading, uses this.options.defaultMarginMode if not passed, defaults to undefined/None/null
params.symbols<code>Array<string></code>, <code>undefined</code>Nounified market symbols, only used in isolated margin mode
params.method<code>string</code>, <code>undefined</code>Nomethod to use. Can be account.balance, account.status, v2/account.balance or v2/account.status
Supported exchanges

<a name="fetchBidsAsks" id="fetchbidsasks"></a>

fetchBidsAsks

fetches the bid and ask price and volume for multiple markets

Kind: instance
Returns: <code>object</code> - a dictionary of ticker structures

ParamTypeRequiredDescription
symbols<code>Array<string></code>, <code>undefined</code>Yesunified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.subType<code>string</code>No"linear" or "inverse"
Supported exchanges

<a name="fetchBorrowInterest" id="fetchborrowinterest"></a>

fetchBorrowInterest

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

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

ParamTypeRequiredDescription
code<code>string</code>Nounified currency code
symbol<code>string</code>Nounified market symbol when fetch interest in isolated markets
since<code>int</code>Nothe earliest time in ms to fetch borrrow interest for
limit<code>int</code>Nothe maximum number of structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.portfolioMargin<code>boolean</code>Noset to true if you would like to fetch the borrow interest in a portfolio margin account
Supported exchanges

<a name="fetchBorrowRateHistories" id="fetchborrowratehistories"></a>

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: <code>object</code> - a dictionary of borrow rate structures indexed by the market symbol

ParamTypeRequiredDescription
codes<code>Array<string></code>, <code>undefined</code>Yeslist of unified currency codes, default is undefined
since<code>int</code>Notimestamp in ms of the earliest borrowRate, default is undefined
limit<code>int</code>Nomax number of borrow rate prices to return, default is undefined
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.marginMode<code>string</code>No'cross' or 'isolated' default is 'cross'
params.until<code>int</code>Nothe latest time in ms to fetch entries for
Supported exchanges

<a name="fetchBorrowRateHistory" id="fetchborrowratehistory"></a>

fetchBorrowRateHistory

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

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

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
since<code>int</code>Notimestamp for the earliest borrow rate
limit<code>int</code>Nothe maximum number of borrow rate structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchCanceledAndClosedOrders" id="fetchcanceledandclosedorders"></a>

fetchCanceledAndClosedOrders

fetches information on multiple canceled orders made by the user

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market the orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.portfolioMargin<code>boolean</code>Noset to true if you would like to fetch orders in a portfolio margin account
params.trigger<code>boolean</code>Noset to true if you would like to fetch portfolio margin account trigger or conditional orders
Supported exchanges

<a name="fetchCanceledOrders" id="fetchcanceledorders"></a>

fetchCanceledOrders

fetches information on multiple canceled orders made by the user

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market the orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.portfolioMargin<code>boolean</code>Noset to true if you would like to fetch orders in a portfolio margin account
params.trigger<code>boolean</code>Noset to true if you would like to fetch portfolio margin account trigger or conditional orders
Supported exchanges

<a name="fetchClosedOrder" id="fetchclosedorder"></a>

fetchClosedOrder

fetch an open order by it's id

Kind: instance
Returns: <code>object</code> - an order structure

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified market symbol, default is undefined
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchClosedOrders" id="fetchclosedorders"></a>

fetchClosedOrders

fetches information on multiple closed orders made by the user

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Nothe latest time in ms to fetch orders for
Supported exchanges

<a name="fetchClosedOrdersWs" id="fetchclosedordersws"></a>

fetchClosedOrdersWs

fetch closed orders

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch open orders for
limit<code>int</code>Nothe maximum number of open orders structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchContractBalance" id="fetchcontractbalance"></a>

fetchContractBalance

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

Kind: instance
Returns: <code>object</code> - a balance structure

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.code<code>object</code>Nothe unified currency code to fetch the balance for, if not provided, the default .options['fetchBalance']['code'] will be used
Supported exchanges

<a name="fetchContractDepositAddress" id="fetchcontractdepositaddress"></a>

fetchContractDepositAddress

fetch the deposit address for a currency associated with this account

Kind: instance
Returns: <code>object</code> - an address structure

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchContractDeposits" id="fetchcontractdeposits"></a>

fetchContractDeposits

helper method for fetching deposits for futures accounts

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

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
since<code>int</code>Nothe earliest time in ms to fetch deposits for
limit<code>int</code>Nothe maximum number of deposits structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchContractOrder" id="fetchcontractorder"></a>

fetchContractOrder

fetc contract order

Kind: instance
Returns: <code>object</code> - An order structure

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchContractOrdersByStatus" id="fetchcontractordersbystatus"></a>

fetchContractOrdersByStatus

fetches a list of contract orders placed on the exchange

Kind: instance
Returns: An array of order structures

ParamTypeRequiredDescription
status<code>string</code>Yes'active' or 'closed', only 'active' is valid for stop orders
symbol<code>string</code>Yesunified symbol for the market to retrieve orders from
since<code>int</code>Notimestamp in ms of the earliest order to retrieve
limit<code>int</code>NoThe maximum number of orders to retrieve
params<code>object</code>Noexchange specific parameters
params.trigger<code>bool</code>Noset to true to retrieve untriggered stop orders
params.until<code>int</code>NoEnd time in ms
params.side<code>string</code>Nobuy or sell
params.type<code>string</code>Nolimit or market
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
Supported exchanges

<a name="fetchContractWithdrawals" id="fetchcontractwithdrawals"></a>

fetchContractWithdrawals

helper method for fetching withdrawals for futures accounts

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

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
since<code>int</code>Nothe earliest time in ms to fetch withdrawals for
limit<code>int</code>Nothe maximum number of withdrawals structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchConvertCurrencies" id="fetchconvertcurrencies"></a>

fetchConvertCurrencies

fetches all available currencies that can be converted

Kind: instance
Returns: <code>object</code> - an associative dictionary of currencies

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchConvertQuote" id="fetchconvertquote"></a>

fetchConvertQuote

fetch a quote for converting from one currency to another

Kind: instance
Returns: <code>object</code> - a conversion structure

ParamTypeRequiredDescription
fromCode<code>string</code>Yesthe currency that you want to sell and convert from
toCode<code>string</code>Yesthe currency that you want to buy and convert into
amount<code>float</code>Yeshow much you want to trade in units of the from currency
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.walletType<code>string</code>Noeither 'SPOT' or 'FUNDING', the default is 'SPOT'
Supported exchanges

<a name="fetchConvertTrade" id="fetchconverttrade"></a>

fetchConvertTrade

fetch the data for a conversion trade

Kind: instance
Returns: <code>object</code> - a conversion structure

ParamTypeRequiredDescription
id<code>string</code>Yesthe id of the trade that you want to fetch
code<code>string</code>Nothe unified currency code of the conversion trade
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchConvertTradeHistory" id="fetchconverttradehistory"></a>

fetchConvertTradeHistory

fetch the users history of conversion trades

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

ParamTypeRequiredDescription
code<code>string</code>Nothe unified currency code
since<code>int</code>Nothe earliest time in ms to fetch conversions for
limit<code>int</code>Nothe maximum number of conversion structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Notimestamp in ms of the latest conversion to fetch
Supported exchanges

<a name="fetchCrossBorrowRate" id="fetchcrossborrowrate"></a>

fetchCrossBorrowRate

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

Kind: instance
Returns: <code>object</code> - a borrow rate structure

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchCrossBorrowRates" id="fetchcrossborrowrates"></a>

fetchCrossBorrowRates

fetch the borrow interest rates of all currencies

Kind: instance
Returns: <code>object</code> - a list of borrow rate structures

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchCurrencies" id="fetchcurrencies"></a>

fetchCurrencies

fetches all available currencies on an exchange

Kind: instance
Returns: <code>object</code> - an associative dictionary of currencies

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchCurrenciesWs" id="fetchcurrenciesws"></a>

fetchCurrenciesWs

fetches all available currencies on an exchange

Kind: instance
Returns: <code>object</code> - an associative dictionary of currencies

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the bitvavo api endpoint
Supported exchanges

<a name="fetchDeposit" id="fetchdeposit"></a>

fetchDeposit

fetch information on a deposit

Kind: instance
Returns: <code>object</code> - a transaction structure

ParamTypeRequiredDescription
id<code>string</code>Yesdeposit id
code<code>string</code>Yesnot used by bitmart fetchDeposit ()
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchDepositAddress" id="fetchdepositaddress"></a>

fetchDepositAddress

fetch the deposit address for a currency associated with this account

Kind: instance
Returns: <code>object</code> - an address structure

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchDepositAddresses" id="fetchdepositaddresses"></a>

fetchDepositAddresses

fetch deposit addresses for multiple currencies (when available)

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

ParamTypeRequiredDescription
codes<code>Array<string></code>Nolist of unified currency codes, default is undefined (all currencies)
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.accountId<code>string</code>Noaccount ID to fetch deposit addresses for
Supported exchanges

<a name="fetchDepositAddressesByNetwork" id="fetchdepositaddressesbynetwork"></a>

fetchDepositAddressesByNetwork

fetch the deposit addresses for a currency associated with this account

Kind: instance
Returns: <code>object</code> - a dictionary address structures, indexed by the network

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchDepositMethodId" id="fetchdepositmethodid"></a>

fetchDepositMethodId

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

Kind: instance
Returns: <code>object</code> - a deposit id structure

ParamTypeRequiredDescription
id<code>string</code>Yesthe deposit payment method id
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchDepositMethodIds" id="fetchdepositmethodids"></a>

fetchDepositMethodIds

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

Kind: instance
Returns: <code>object</code> - an array of deposit id structures

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchDepositMethods" id="fetchdepositmethods"></a>

fetchDepositMethods

fetch deposit methods for a currency associated with this account

Kind: instance
Returns: <code>object</code> - of deposit methods

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
params<code>object</code>Noextra parameters specific to the kraken api endpoint
Supported exchanges

<a name="fetchDepositWithdrawFee" id="fetchdepositwithdrawfee"></a>

fetchDepositWithdrawFee

fetch the fee for deposits and withdrawals

Kind: instance
Returns: <code>object</code> - a fee structure

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.network<code>string</code>Nothe network code of the currency
Supported exchanges

<a name="fetchDepositWithdrawFees" id="fetchdepositwithdrawfees"></a>

fetchDepositWithdrawFees

fetch deposit and withdraw fees

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

ParamTypeRequiredDescription
codes<code>Array<string></code>, <code>undefined</code>Yeslist of unified currency codes
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchDeposits" id="fetchdeposits"></a>

fetchDeposits

fetch all deposits made to an account

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

ParamTypeRequiredDescription
code<code>string</code>Nounified currency code
since<code>int</code>Nothe earliest time in ms to fetch deposits for
limit<code>int</code>Nothe maximum number of deposit structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchDepositsWithdrawals" id="fetchdepositswithdrawals"></a>

fetchDepositsWithdrawals

fetch history of deposits and withdrawals

Kind: instance
Returns: <code>object</code> - a list of transaction structure

ParamTypeRequiredDescription
code<code>string</code>Nounified currency code for the currency of the deposit/withdrawals, default is undefined
since<code>int</code>Notimestamp in ms of the earliest deposit/withdrawal, default is undefined
limit<code>int</code>Nomax number of deposit/withdrawals to return, default is undefined
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchDepositsWs" id="fetchdepositsws"></a>

fetchDepositsWs

fetch all deposits made to an account

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

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
since<code>int</code>Nothe earliest time in ms to fetch deposits for
limit<code>int</code>Nothe maximum number of deposits structures to retrieve
params<code>object</code>Noextra parameters specific to the bitvavo api endpoint
Supported exchanges

<a name="fetchFundingHistory" id="fetchfundinghistory"></a>

fetchFundingHistory

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

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve, default 100
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>object</code>Noend time, ms
params.side<code>boolean</code>NoBUY or SELL
params.page<code>boolean</code>NoPage numbers start from 0
Supported exchanges

<a name="fetchFundingInterval" id="fetchfundinginterval"></a>

fetchFundingInterval

fetch the current funding rate interval

Kind: instance
Returns: <code>object</code> - a funding rate structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
Supported exchanges

<a name="fetchFundingIntervals" id="fetchfundingintervals"></a>

fetchFundingIntervals

fetch the funding rate interval for multiple markets

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nolist of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchFundingLimits" id="fetchfundinglimits"></a>

fetchFundingLimits

fetch the deposit and withdrawal limits for a currency

Kind: instance
Returns: <code>object</code> - a funding limits structure

ParamTypeRequiredDescription
codes<code>Array<string></code>, <code>undefined</code>Yesunified currency codes
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchFundingRate" id="fetchfundingrate"></a>

fetchFundingRate

fetch the current funding rate

Kind: instance
Returns: <code>object</code> - a funding rate structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchFundingRateHistory" id="fetchfundingratehistory"></a>

fetchFundingRateHistory

fetches historical funding rate prices

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the funding rate history for
since<code>int</code>Notimestamp in ms of the earliest funding rate to fetch
limit<code>int</code>Nothe maximum amount of funding rate structures to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Notimestamp in ms of the latest funding rate
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
Supported exchanges

<a name="fetchFundingRates" id="fetchfundingrates"></a>

fetchFundingRates

fetch the funding rate for multiple markets

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>, <code>undefined</code>Yeslist of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchGreeks" id="fetchgreeks"></a>

fetchGreeks

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

Kind: instance
Returns: <code>object</code> - a greeks structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch greeks for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchHip3Markets" id="fetchhip3markets"></a>

fetchHip3Markets

retrieves data on all hip3 markets for hyperliquid

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

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchIsolatedBorrowRate" id="fetchisolatedborrowrate"></a>

fetchIsolatedBorrowRate

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

Kind: instance
Returns: <code>object</code> - an isolated borrow rate structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint EXCHANGE SPECIFIC PARAMETERS
params.vipLevel<code>object</code>Nouser's current specific margin data will be returned if viplevel is omitted
Supported exchanges

<a name="fetchIsolatedBorrowRates" id="fetchisolatedborrowrates"></a>

fetchIsolatedBorrowRates

fetch the borrow interest rates of all currencies

Kind: instance
Returns: <code>object</code> - a borrow rate structure

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.symbol<code>object</code>Nounified market symbol EXCHANGE SPECIFIC PARAMETERS
params.vipLevel<code>object</code>Nouser's current specific margin data will be returned if viplevel is omitted
Supported exchanges

<a name="fetchL3OrderBook" id="fetchl3orderbook"></a>

fetchL3OrderBook

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

Kind: instance
Returns: <code>object</code> - an order book structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
limit<code>int</code>Nomax number of orders to return, default is undefined
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchLastPrices" id="fetchlastprices"></a>

fetchLastPrices

fetches the last price for multiple markets

Kind: instance
Returns: <code>object</code> - a dictionary of lastprices structures

ParamTypeRequiredDescription
symbols<code>Array<string></code>, <code>undefined</code>Yesunified symbols of the markets to fetch the last prices
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.subType<code>string</code>No"linear" or "inverse"
Supported exchanges

<a name="fetchLedger" id="fetchledger"></a>

fetchLedger

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

Kind: instance
Returns: <code>object</code> - a ledger structure

ParamTypeRequiredDescription
code<code>string</code>Nounified currency code
since<code>int</code>Notimestamp in ms of the earliest ledger entry
limit<code>int</code>Nomax number of ledger entries to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Notimestamp in ms of the latest ledger entry
Supported exchanges

<a name="fetchLedgerEntry" id="fetchledgerentry"></a>

fetchLedgerEntry

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

Kind: instance
Returns: <code>object</code> - a ledger structure

ParamTypeRequiredDescription
id<code>string</code>Yesthe identification number of the ledger entry
code<code>string</code>Yesunified currency code
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchLeverage" id="fetchleverage"></a>

fetchLeverage

fetch the set leverage for a market

Kind: instance
Returns: <code>object</code> - a leverage structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchLeverageTiers" id="fetchleveragetiers"></a>

fetchLeverageTiers

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

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>, <code>undefined</code>Yeslist of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchLeverages" id="fetchleverages"></a>

fetchLeverages

fetch the set leverage for all contract markets

Kind: instance
Returns: <code>object</code> - a list of leverage structures

ParamTypeRequiredDescription
symbols<code>Array<string></code>Noa list of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchLiquidations" id="fetchliquidations"></a>

fetchLiquidations

retrieves the public liquidations of a trading pair

Kind: instance
Returns: <code>object</code> - an array of liquidation structures

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified CCXT market symbol
since<code>int</code>Nothe earliest time in ms to fetch liquidations for
limit<code>int</code>Nothe maximum number of liquidation structures to retrieve
params<code>object</code>Noexchange specific parameters
params.until<code>int</code>Notimestamp in ms of the latest liquidation
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
Supported exchanges

<a name="fetchLongShortRatioHistory" id="fetchlongshortratiohistory"></a>

fetchLongShortRatioHistory

fetches the long short ratio history for a unified market symbol

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the long short ratio for
timeframe<code>string</code>Nothe period for the ratio, default is 24 hours
since<code>int</code>Nothe earliest time in ms to fetch ratios for
limit<code>int</code>Nothe maximum number of long short ratio structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Notimestamp in ms of the latest ratio to fetch
Supported exchanges

<a name="fetchMarginAdjustmentHistory" id="fetchmarginadjustmenthistory"></a>

fetchMarginAdjustmentHistory

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

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
type<code>string</code>No"add" or "reduce"
since<code>int</code>Notimestamp in ms of the earliest change to fetch
limit<code>int</code>Nothe maximum amount of changes to fetch
params<code>object</code>Yesextra parameters specific to the exchange api endpoint
params.until<code>int</code>Notimestamp in ms of the latest change to fetch
Supported exchanges

<a name="fetchMarginMode" id="fetchmarginmode"></a>

fetchMarginMode

fetches the margin mode of a specific symbol

Kind: instance
Returns: <code>object</code> - a margin mode structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.subType<code>string</code>No"linear" or "inverse"
Supported exchanges

<a name="fetchMarginModes" id="fetchmarginmodes"></a>

fetchMarginModes

fetches the set margin mode of the user

Kind: instance
Returns: <code>object</code> - a list of margin mode structures

ParamTypeRequiredDescription
symbols<code>Array<string></code>Noa list of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchMarkPrice" id="fetchmarkprice"></a>

fetchMarkPrice

fetches mark price for the market

Kind: instance
Returns: <code>object</code> - a dictionary of ticker structures

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.subType<code>string</code>No"linear" or "inverse"
Supported exchanges

<a name="fetchMarkPrices" id="fetchmarkprices"></a>

fetchMarkPrices

fetches mark prices for multiple markets

Kind: instance
Returns: <code>object</code> - a dictionary of ticker structures

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nounified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.subType<code>string</code>No"linear" or "inverse"
Supported exchanges

<a name="fetchMarketLeverageTiers" id="fetchmarketleveragetiers"></a>

fetchMarketLeverageTiers

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

Kind: instance
Returns: <code>object</code> - a leverage tiers structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchMarkets" id="fetchmarkets"></a>

fetchMarkets

retrieves data on all markets for woo

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

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchMarketsWs" id="fetchmarketsws"></a>

fetchMarketsWs

retrieves data on all markets for bitvavo

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

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange api endpoint
Supported exchanges

<a name="fetchMyContractTrades" id="fetchmycontracttrades"></a>

fetchMyContractTrades

fetch all contract trades made by the user

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch trades for
limit<code>int</code>Nothe maximum number of trades structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>NoEnd time in ms
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
Supported exchanges

<a name="fetchMyDustTrades" id="fetchmydusttrades"></a>

fetchMyDustTrades

fetch all dust trades made by the user

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesnot used by binance fetchMyDustTrades ()
since<code>int</code>Nothe earliest time in ms to fetch my dust trades for
limit<code>int</code>Nothe maximum number of dust trades to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.type<code>string</code>No'spot' or 'margin', default spot
Supported exchanges

<a name="fetchMyLiquidations" id="fetchmyliquidations"></a>

fetchMyLiquidations

retrieves the users liquidated positions

Kind: instance
Returns: <code>object</code> - an array of liquidation structures

ParamTypeRequiredDescription
symbol<code>string</code>Nounified CCXT market symbol
since<code>int</code>Nothe earliest time in ms to fetch liquidations for
limit<code>int</code>Nothe maximum number of liquidation structures to retrieve
params<code>object</code>Noexchange specific parameters for the binance api endpoint
params.until<code>int</code>Notimestamp in ms of the latest liquidation
params.paginate<code>boolean</code>Nospot only default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.portfolioMargin<code>boolean</code>Noset to true if you would like to fetch liquidations in a portfolio margin account
params.type<code>string</code>No"spot"
params.subType<code>string</code>No"linear" or "inverse"
Supported exchanges

<a name="fetchMySettlementHistory" id="fetchmysettlementhistory"></a>

fetchMySettlementHistory

fetches historical settlement records of the user

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the settlement history
since<code>int</code>Notimestamp in ms
limit<code>int</code>Nonumber of records
params<code>object</code>Noexchange specific params
Supported exchanges

<a name="fetchMySpotTrades" id="fetchmyspottrades"></a>

fetchMySpotTrades

fetch all spot trades made by the user

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch trades for
limit<code>int</code>Nothe maximum number of trades structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Nothe latest time in ms to fetch entries for
params.hf<code>bool</code>Nofalse, // true for hf order
params.marginMode<code>string</code>No'cross' or 'isolated', only for margin trades
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
Supported exchanges

<a name="fetchMyTrades" id="fetchmytrades"></a>

fetchMyTrades

fetch all trades made by the user

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

ParamTypeRequiredDescription
symbol<code>string</code>Nounified market symbol
since<code>int</code>Nothe earliest time in ms to fetch trades for
limit<code>int</code>Nothe maximum number of trade structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Nothe latest time in ms to fetch trades for
params.page_token<code>string</code>Nopage_token - used for paging
Supported exchanges

<a name="fetchMyTradesWs" id="fetchmytradesws"></a>

fetchMyTradesWs

fetch all trades made by the user

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
since<code>int</code>, <code>undefined</code>Nothe earliest time in ms to fetch trades for
limit<code>int</code>, <code>undefined</code>Nothe maximum number of trades structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.endTime<code>int</code>Nothe latest time in ms to fetch trades for
params.fromId<code>int</code>Nofirst trade Id to fetch
Supported exchanges

<a name="fetchMyUtaTrades" id="fetchmyutatrades"></a>

fetchMyUtaTrades

fetch all trades made by the user

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch trades for
limit<code>int</code>Nothe maximum number of trades structures to retrieve (default is 50, max is 200)
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Nothe latest time in ms to fetch entries for
params.accountMode<code>string</code>No'unified' or 'classic', defaults to 'unified'
params.marginMode<code>string</code>No'cross' or 'isolated', only for margin trades (unified accountMode support only cross margin)
params.side<code>string</code>No'BUY' or 'SELL' (both if not provided)
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
Supported exchanges

<a name="fetchOHLCV" id="fetchohlcv"></a>

fetchOHLCV

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

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch OHLCV data for
timeframe<code>string</code>Yesthe length of time each candle represents
since<code>int</code>Notimestamp in ms of the earliest candle to fetch
limit<code>int</code>Nomax=1000, max=100 when since is defined and is less than (now - (999 * (timeframe in ms)))
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchOHLCVWs" id="fetchohlcvws"></a>

fetchOHLCVWs

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

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

ParamTypeDescription
symbol<code>string</code>unified symbol of the market to query OHLCV data for
timeframe<code>string</code>the length of time each candle represents
since<code>int</code>timestamp in ms of the earliest candle to fetch
limit<code>int</code>the maximum amount of candles to fetch
params<code>object</code>extra parameters specific to the exchange API endpoint
params.until<code>int</code>timestamp in ms of the earliest candle to fetch EXCHANGE SPECIFIC PARAMETERS
params.timeZone<code>string</code>default=0 (UTC)
Supported exchanges

<a name="fetchOpenInterest" id="fetchopeninterest"></a>

fetchOpenInterest

retrieves the open interest of a contract trading pair

Kind: instance
Returns: <code>object</code> - an open interest structurehttps://docs.ccxt.com/?id=open-interest-structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified CCXT market symbol
params<code>object</code>Noexchange specific parameters
Supported exchanges

<a name="fetchOpenInterestHistory" id="fetchopeninteresthistory"></a>

fetchOpenInterestHistory

Retrieves the open interest history of a currency

Kind: instance
Returns: <code>object</code> - an array of open interest structure

ParamTypeRequiredDescription
symbol<code>string</code>YesUnified CCXT market symbol
timeframe<code>string</code>Yes"5m","15m","30m","1h","2h","4h","6h","12h", or "1d"
since<code>int</code>Nothe time(ms) of the earliest record to retrieve as a unix timestamp
limit<code>int</code>Nodefault 30, max 500
params<code>object</code>Noexchange specific parameters
params.until<code>int</code>Nothe time(ms) of the latest record to retrieve as a unix timestamp
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
Supported exchanges

<a name="fetchOpenInterests" id="fetchopeninterests"></a>

fetchOpenInterests

Retrieves the open interest for a list of symbols

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Noa list of unified CCXT market symbols
params<code>object</code>Noexchange specific parameters
Supported exchanges

<a name="fetchOpenOrder" id="fetchopenorder"></a>

fetchOpenOrder

fetch an open order by the id

Kind: instance
Returns: <code>object</code> - an order structure

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchOpenOrders" id="fetchopenorders"></a>

fetchOpenOrders

fetch all unfilled currently open orders

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch open orders for
limit<code>int</code>Nothe maximum number of open orders structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.accountNumber<code>int</code>Noaccount number to query orders for, required
Supported exchanges

<a name="fetchOpenOrdersWs" id="fetchopenordersws"></a>

fetchOpenOrdersWs

fetch all unfilled currently open orders

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
since<code>int</code>, <code>undefined</code>Nothe earliest time in ms to fetch open orders for
limit<code>int</code>, <code>undefined</code>Nothe maximum number of open orders structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchOption" id="fetchoption"></a>

fetchOption

fetches option data that is commonly found in an option chain

Kind: instance
Returns: <code>object</code> - an option chain structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchOptionChain" id="fetchoptionchain"></a>

fetchOptionChain

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

Kind: instance
Returns: <code>object</code> - a list of option chain structures

ParamTypeRequiredDescription
code<code>string</code>Yesbase currency to fetch an option chain for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchOptionPositions" id="fetchoptionpositions"></a>

fetchOptionPositions

fetch data on open options positions

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>, <code>undefined</code>Yeslist of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchOrder" id="fetchorder"></a>

fetchOrder

fetches information on an order made by the user

Kind: instance
Returns: <code>object</code> - An order structure

ParamTypeRequiredDescription
id<code>string</code>Yesthe order id
symbol<code>string</code>Yesunified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchOrderBook" id="fetchorderbook"></a>

fetchOrderBook

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

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the order book for
limit<code>int</code>Nothe maximum amount of order book entries to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchOrderBookWs" id="fetchorderbookws"></a>

fetchOrderBookWs

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

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the order book for
limit<code>int</code>Nothe maximum amount of order book entries to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchOrderBooks" id="fetchorderbooks"></a>

fetchOrderBooks

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

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>, <code>undefined</code>Yeslist of unified market symbols, all symbols fetched if undefined, default is undefined
limit<code>int</code>Nomax number of entries per orderbook to return, default is undefined
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchOrderClassic" id="fetchorderclassic"></a>

fetchOrderClassic

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

Kind: instance
Returns: <code>object</code> - An order structure

ParamTypeRequiredDescription
id<code>string</code>Yesthe order id
symbol<code>string</code>Yesunified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchOrderTrades" id="fetchordertrades"></a>

fetchOrderTrades

fetch all the trades made from a single order

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

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch trades for
limit<code>int</code>Nothe maximum number of trades to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchOrderWs" id="fetchorderws"></a>

fetchOrderWs

fetches information on an order made by the user

Kind: instance
Returns: <code>object</code> - An order structure

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Nounified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchOrders" id="fetchorders"></a>

fetchOrders

fetches information on multiple orders made by the user

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Nothe latest time in ms to fetch orders for
Supported exchanges

<a name="fetchOrdersByIds" id="fetchordersbyids"></a>

fetchOrdersByIds

fetch orders by the list of order id

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

ParamTypeRequiredDescription
ids<code>Array<string></code>Nolist of order id
symbol<code>string</code>Nounified ccxt market symbol
params<code>object</code>Noextra parameters specific to the kraken api endpoint
Supported exchanges

<a name="fetchOrdersByStatus" id="fetchordersbystatus"></a>

fetchOrdersByStatus

fetch a list of orders

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

ParamTypeRequiredDescription
status<code>string</code>Yesorder status to fetch for
symbol<code>string</code>Yesunified market symbol of the market orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.trigger<code>boolean</code>Noset to true for fetching trigger orders
params.marginMode<code>string</code>No'cross' or 'isolated' for fetching spot margin orders
Supported exchanges

<a name="fetchOrdersClassic" id="fetchordersclassic"></a>

fetchOrdersClassic

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

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.trigger<code>boolean</code>Notrue if trigger order
params.stop<code>boolean</code>Noalias for trigger
params.type<code>string</code>Nomarket type, ['swap', 'option', 'spot']
params.subType<code>string</code>Nomarket subType, ['linear', 'inverse']
params.orderFilter<code>string</code>No'Order' or 'StopOrder' or 'tpslOrder'
params.until<code>int</code>Nothe latest time in ms to fetch entries for
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
Supported exchanges

<a name="fetchOrdersWs" id="fetchordersws"></a>

fetchOrdersWs

fetches information on multiple orders made by the user

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market orders were made in
since<code>int</code>, <code>undefined</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>, <code>undefined</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.orderId<code>int</code>Noorder id to begin at
params.startTime<code>int</code>Noearliest time in ms to retrieve orders for
params.endTime<code>int</code>Nolatest time in ms to retrieve orders for
params.limit<code>int</code>Nothe maximum number of order structures to retrieve
Supported exchanges

<a name="fetchPortfolioDetails" id="fetchportfoliodetails"></a>

fetchPortfolioDetails

Fetch details for a specific portfolio by UUID

Kind: instance
Returns: <code>Array<any></code> - An account structure https://docs.ccxt.com/?id=account-structure

ParamTypeRequiredDescription
portfolioUuid<code>string</code>YesThe unique identifier of the portfolio to fetch
params<code>Dict</code>NoExtra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchPortfolios" id="fetchportfolios"></a>

fetchPortfolios

fetch all the portfolios

Kind: instance
Returns: <code>object</code> - a dictionary of account structures indexed by the account type

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchPosition" id="fetchposition"></a>

fetchPosition

fetch data on an open position

Kind: instance
Returns: <code>object</code> - a position structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market the position is held in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.accountNumber<code>int</code>Noaccount number to query positions for, required
Supported exchanges

<a name="fetchPositionADLRank" id="fetchpositionadlrank"></a>

fetchPositionADLRank

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

Kind: instance
Returns: <code>object</code> - an array of auto de leverage structures

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nolist of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.code<code>string</code>Nothe currency code to fetch ranks for, USD, BTC or USDT, USDT is the default
params.method<code>string</code>NoUSDT contracts only 'privateGetGAccountsAccountPositions' or 'privateGetGAccountsAccountPositions' default is 'privateGetGAccountsAccountPositions'
Supported exchanges

<a name="fetchPositionHistory" id="fetchpositionhistory"></a>

fetchPositionHistory

fetches historical positions

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified contract symbol
since<code>int</code>Nothe earliest time in ms to fetch positions for
limit<code>int</code>Nothe maximum amount of records to fetch
params<code>object</code>Noextra parameters specific to the exchange api endpoint
params.until<code>int</code>Nothe latest time in ms to fetch positions for
Supported exchanges

<a name="fetchPositionMode" id="fetchpositionmode"></a>

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: <code>object</code> - an object detailing whether the market is in hedged or one-way mode

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the order book for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchPositionWs" id="fetchpositionws"></a>

fetchPositionWs

fetch data on an open position

Kind: instance
Returns: <code>object</code> - a position structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market the position is held in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchPositions" id="fetchpositions"></a>

fetchPositions

fetch all open positions

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yeslist of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.accountNumber<code>int</code>Noaccount number to query positions for, required
Supported exchanges

<a name="fetchPositionsADLRank" id="fetchpositionsadlrank"></a>

fetchPositionsADLRank

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

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nolist of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.portfolioMargin<code>boolean</code>Noset to true for the portfolio margin account
Supported exchanges

<a name="fetchPositionsForSymbol" id="fetchpositionsforsymbol"></a>

fetchPositionsForSymbol

fetch all open positions for specific symbol

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.contractType<code>string</code>NoFUTURE or DELIVERY, default is FUTURE
Supported exchanges

<a name="fetchPositionsHistory" id="fetchpositionshistory"></a>

fetchPositionsHistory

fetches historical positions

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nounified contract symbols
since<code>int</code>Notimestamp in ms of the earliest position to fetch, default=3 months ago, max range for params["until"] - since is 3 months
limit<code>int</code>Nothe maximum amount of records to fetch, default=20, max=100
params<code>object</code>Yesextra parameters specific to the exchange api endpoint
params.until<code>int</code>Notimestamp in ms of the latest position to fetch, max range for params["until"] - since is 3 months
params.productType<code>string</code>NoUSDT-FUTURES (default), COIN-FUTURES, USDC-FUTURES, SUSDT-FUTURES, SCOIN-FUTURES, or SUSDC-FUTURES
params.uta<code>boolean</code>Noset to true for the unified trading account (uta), defaults to false
Supported exchanges

<a name="fetchPositionsRisk" id="fetchpositionsrisk"></a>

fetchPositionsRisk

fetch positions risk

Kind: instance
Returns: <code>object</code> - data on the positions risk

ParamTypeRequiredDescription
symbols<code>Array<string></code>, <code>undefined</code>Yeslist of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchPositionsWs" id="fetchpositionsws"></a>

fetchPositionsWs

fetch all open positions

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nolist of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.returnRateLimits<code>boolean</code>Noset to true to return rate limit informations, defaults to false.
params.method<code>string</code>, <code>undefined</code>Nomethod to use. Can be account.position or v2/account.position
Supported exchanges

<a name="fetchSettlementHistory" id="fetchsettlementhistory"></a>

fetchSettlementHistory

fetches historical settlement records

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the settlement history
since<code>int</code>Notimestamp in ms
limit<code>int</code>Nonumber of records, default 100, max 100
params<code>object</code>Noexchange specific params
Supported exchanges

<a name="fetchSpotMarkets" id="fetchspotmarkets"></a>

fetchSpotMarkets

retrieves data on all spot markets for hyperliquid

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

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchSpotOrder" id="fetchspotorder"></a>

fetchSpotOrder

fetch a spot order

Kind: instance
Returns: An order structure

ParamTypeRequiredDescription
id<code>string</code>YesOrder id
symbol<code>string</code>Yesnot sent to exchange except for trigger orders with clientOid, but used internally by CCXT to filter
params<code>object</code>Noexchange specific parameters
params.trigger<code>bool</code>Notrue if fetching a trigger order
params.hf<code>bool</code>Nofalse, // true for hf order
params.clientOid<code>bool</code>Nounique order id created by users to identify their orders
params.marginMode<code>object</code>No'cross' or 'isolated'
Supported exchanges

<a name="fetchSpotOrdersByStatus" id="fetchspotordersbystatus"></a>

fetchSpotOrdersByStatus

fetch a list of spot orders

Kind: instance
Returns: An array of order structures

ParamTypeRequiredDescription
status<code>string</code>Yesnot used for stop orders 'open' or 'closed'
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Notimestamp in ms of the earliest order
limit<code>int</code>Nomax number of orders to return
params<code>object</code>Noexchange specific params
params.until<code>int</code>Noend time in ms
params.side<code>string</code>Nobuy or sell
params.type<code>string</code>Nolimit, market, limit_stop or market_stop
params.tradeType<code>string</code>NoTRADE for spot trading, MARGIN_TRADE or MARGIN_ISOLATED_TRADE for Margin Trading
params.currentPage<code>int</code>Notrigger orders only current page
params.orderIds<code>string</code>Notrigger orders only comma separated order ID list
params.trigger<code>bool</code>NoTrue if fetching a trigger order
params.hf<code>bool</code>Nofalse, // true for hf order
params.marginMode<code>string</code>No'cross' or 'isolated', only for margin orders
Supported exchanges

<a name="fetchStatus" id="fetchstatus"></a>

fetchStatus

the latest known information on the availability of the exchange API

Kind: instance
Returns: <code>object</code> - a status structure

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchSwapMarkets" id="fetchswapmarkets"></a>

fetchSwapMarkets

retrieves data on all swap markets for hyperliquid

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

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchTicker" id="fetchticker"></a>

fetchTicker

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

Kind: instance
Returns: <code>object</code> - a ticker structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchTickerWs" id="fetchtickerws"></a>

fetchTickerWs

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

Kind: instance
Returns: <code>object</code> - a ticker structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.method<code>string</code>Nomethod to use can be ticker.price or ticker.book
params.returnRateLimits<code>boolean</code>Noreturn the rate limits for the exchange
Supported exchanges

<a name="fetchTickers" id="fetchtickers"></a>

fetchTickers

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

Kind: instance
Returns: <code>object</code> - a dictionary of ticker structures

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified symbols of the markets to fetch tickers for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.loc<code>string</code>Nocrypto location, default: us
Supported exchanges

<a name="fetchTime" id="fetchtime"></a>

fetchTime

fetches the current integer timestamp in milliseconds from the exchange server

Kind: instance
Returns: <code>int</code> - the current integer timestamp in milliseconds from the exchange server

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchTrades" id="fetchtrades"></a>

fetchTrades

get the list of most recent trades for a particular symbol

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch trades for
since<code>int</code>Notimestamp in ms of the earliest trade to fetch
limit<code>int</code>Nothe maximum amount of trades to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Nothe latest time in ms to fetch trades for
Supported exchanges

<a name="fetchTradesWs" id="fetchtradesws"></a>

fetchTradesWs

fetch all trades made by the user

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch trades for
limit<code>int</code>Nothe maximum number of trades structures to retrieve, default=500, max=1000
params<code>object</code>Noextra parameters specific to the exchange API endpoint EXCHANGE SPECIFIC PARAMETERS
params.fromId<code>int</code>Notrade ID to begin at
Supported exchanges

<a name="fetchTradingFee" id="fetchtradingfee"></a>

fetchTradingFee

fetch the trading fees for a market

Kind: instance
Returns: <code>object</code> - a fee structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchTradingFees" id="fetchtradingfees"></a>

fetchTradingFees

fetch the trading fees for multiple markets

Kind: instance
Returns: <code>object</code> - a dictionary of fee structures indexed by market symbols

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.subType<code>string</code>No"linear" or "inverse"
Supported exchanges

<a name="fetchTradingFeesWs" id="fetchtradingfeesws"></a>

fetchTradingFeesWs

fetch the trading fees for multiple markets

Kind: instance
Returns: <code>object</code> - a dictionary of fee structures indexed by market symbols

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the bitvavo api endpoint
Supported exchanges

<a name="fetchTradingLimits" id="fetchtradinglimits"></a>

fetchTradingLimits

fetch the trading limits for a market

Kind: instance
Returns: <code>object</code> - a trading limits structure

ParamTypeRequiredDescription
symbols<code>Array<string></code>, <code>undefined</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchTransactionFee" id="fetchtransactionfee"></a>

fetchTransactionFee

please use fetchDepositWithdrawFee instead

Kind: instance
Returns: <code>object</code> - a fee structure

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.network<code>string</code>Nothe network code of the currency
Supported exchanges

<a name="fetchTransactionFees" id="fetchtransactionfees"></a>

fetchTransactionFees

please use fetchDepositWithdrawFees instead

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

ParamTypeRequiredDescription
codes<code>Array<string></code>, <code>undefined</code>Yesnot used by binance fetchTransactionFees ()
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchTransactions" id="fetchtransactions"></a>

fetchTransactions

Fetch all transactions (deposits and withdrawals) made from an account.

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

ParamTypeRequiredDescription
code<code>string</code>Nounified currency code
since<code>int</code>Nothe earliest time in ms to fetch withdrawals for
limit<code>int</code>Nothe maximum number of withdrawal structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchTransfer" id="fetchtransfer"></a>

fetchTransfer

fetches a transfer

Kind: instance
Returns: <code>object</code> - a transfer structure

ParamTypeRequiredDescription
id<code>string</code>Yestransfer id
code<code>string</code>Nonot used by mexc fetchTransfer
params<code>object</code>Yesextra parameters specific to the exchange api endpoint
Supported exchanges

<a name="fetchTransfers" id="fetchtransfers"></a>

fetchTransfers

fetch a history of internal transfers made on an account

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

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code of the currency transferred
since<code>int</code>Nothe earliest time in ms to fetch transfers for
limit<code>int</code>Nothe maximum number of transfers structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Nothe latest time in ms to fetch transfers for
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
params.internal<code>boolean</code>Nodefault false, when true will fetch pay trade history
Supported exchanges

<a name="fetchUnderlyingAssets" id="fetchunderlyingassets"></a>

fetchUnderlyingAssets

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

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

ParamTypeRequiredDescription
params<code>object</code>Noexchange specific params
params.type<code>string</code>Nothe contract market type, 'option', 'swap' or 'future', the default is 'option'
Supported exchanges

<a name="fetchUtaBalance" id="fetchutabalance"></a>

fetchUtaBalance

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

Kind: instance
Returns: <code>object</code> - a balance structure

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.type<code>string</code>No'unified', 'spot', 'funding', 'cross', 'isolated' or 'swap' (default is 'unified')
params.marginMode<code>string</code>No'cross' or 'isolated', margin type for fetching margin balance, only applicable if type is margin (default is cross)
Supported exchanges

<a name="fetchUtaOrder" id="fetchutaorder"></a>

fetchUtaOrder

fetch uta order

Kind: instance
Returns: <code>object</code> - An order structure

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.accountMode<code>string</code>No'unified' or 'classic' (default is 'unified')
params.clientOrderId<code>string</code>Noclient order id, required if id is not provided
params.marginMode<code>string</code>No'cross' or 'isolated', required if fetching a margin order (unified accountMode supports only cross margin)
Supported exchanges

<a name="fetchUtaOrdersByStatus" id="fetchutaordersbystatus"></a>

fetchUtaOrdersByStatus

helper method for fetching orders by status with uta endpoint

Kind: instance
Returns: An array of order structures

ParamTypeRequiredDescription
status<code>string</code>Yes'active' or 'closed', only 'active' is valid for stop orders
symbol<code>string</code>Yesunified symbol for the market to retrieve orders from
since<code>int</code>Notimestamp in ms of the earliest order to retrieve
limit<code>int</code>NoThe maximum number of orders to retrieve
params<code>object</code>Noexchange specific parameters
params.until<code>int</code>NoEnd time in ms
params.side<code>string</code>Noclosed orders only 'BUY' or 'SELL'
params.accountMode<code>string</code>No'unified' or 'classic' (default is unified)
params.marginMode<code>string</code>No'cross' or 'isolated', only for margin orders (unified accountMode supports only cross margin)
params.paginate<code>boolean</code>Nodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters
Supported exchanges

<a name="fetchVolatilityHistory" id="fetchvolatilityhistory"></a>

fetchVolatilityHistory

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

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

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.period<code>int</code>Nothe period in days to fetch the volatility for: 7,14,21,30,60,90,180,270
Supported exchanges

<a name="fetchWithdrawal" id="fetchwithdrawal"></a>

fetchWithdrawal

fetch data on a currency withdrawal via the withdrawal id

Kind: instance
Returns: <code>object</code> - a transaction structure

ParamTypeRequiredDescription
id<code>string</code>Yeswithdrawal id
code<code>string</code>Yesnot used by bitmart.fetchWithdrawal
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchWithdrawals" id="fetchwithdrawals"></a>

fetchWithdrawals

fetch all withdrawals made from an account

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

ParamTypeRequiredDescription
code<code>string</code>Nounified currency code
since<code>int</code>Nothe earliest time in ms to fetch withdrawals for
limit<code>int</code>Nothe maximum number of withdrawal structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="fetchWithdrawalsWs" id="fetchwithdrawalsws"></a>

fetchWithdrawalsWs

fetch all withdrawals made from an account

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

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
since<code>int</code>Nothe earliest time in ms to fetch withdrawals for
limit<code>int</code>Nothe maximum number of withdrawals structures to retrieve
params<code>object</code>Noextra parameters specific to the bitvavo api endpoint
Supported exchanges

<a name="isUTAEnabled" id="isutaenabled"></a>

isUTAEnabled

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

Kind: instance
Returns: <code>boolean</code> - true if unified account is enabled, false otherwise

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="isUnifiedEnabled" id="isunifiedenabled"></a>

isUnifiedEnabled

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

Kind: instance
Returns: <code>any</code> - [enableUnifiedMargin, enableUnifiedAccount]

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="loadMigrationStatus" id="loadmigrationstatus"></a>

loadMigrationStatus

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

Kind: instance
Returns: <code>any</code> - ignore

ParamTypeDescription
force<code>boolean</code>load account state for non hf
Supported exchanges

<a name="loadUnifiedStatus" id="loadunifiedstatus"></a>

loadUnifiedStatus

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

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

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="market" id="market"></a>

market

calculates the presumptive fee that would be charged for an order

Kind: instance
Returns: <code>object</code> - 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
symbol<code>string</code>unified market symbol
type<code>string</code>not used by btcmarkets.calculateFee
side<code>string</code>not used by btcmarkets.calculateFee
amount<code>float</code>how much you want to trade, in units of the base currency on most exchanges, or number of contracts
price<code>float</code>the price for the order to be filled at, in units of the quote currency
takerOrMaker<code>string</code>'taker' or 'maker'
params<code>object</code>
Supported exchanges

<a name="preLoadLighterLibrary" id="preloadlighterlibrary"></a>

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: <code>boolean</code> - true if the signer was loaded, false otherwise

Param
params
Supported exchanges

<a name="redeemGiftCode" id="redeemgiftcode"></a>

redeemGiftCode

redeem gift code

Kind: instance
Returns: <code>object</code> - response from the exchange

ParamTypeRequiredDescription
giftcardCode<code>string</code>Yes
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="reduceMargin" id="reducemargin"></a>

reduceMargin

remove margin from a position

Kind: instance
Returns: <code>object</code> - a margin structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
amount<code>float</code>Yesamount of margin to remove
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>Account</code>Noaccount id to use, required
Supported exchanges

<a name="repayCrossMargin" id="repaycrossmargin"></a>

repayCrossMargin

repay borrowed margin and interest

Kind: instance
Returns: <code>object</code> - a margin loan structure

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code of the currency to repay
amount<code>float</code>Yesthe amount to repay
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.portfolioMargin<code>boolean</code>Noset to true if you would like to repay margin in a portfolio margin account
params.repayCrossMarginMethod<code>string</code>Noportfolio margin only 'papiPostRepayLoan' (default), 'papiPostMarginRepayDebt' (alternative)
params.specifyRepayAssets<code>string</code>Noportfolio margin papiPostMarginRepayDebt only specific asset list to repay debt
Supported exchanges

<a name="repayIsolatedMargin" id="repayisolatedmargin"></a>

repayIsolatedMargin

repay borrowed margin and interest

Kind: instance
Returns: <code>object</code> - a margin loan structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol, required for isolated margin
code<code>string</code>Yesunified currency code of the currency to repay
amount<code>float</code>Yesthe amount to repay
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="repayMargin" id="repaymargin"></a>

repayMargin

repay borrowed margin and interest

Kind: instance
Returns: <code>object</code> - a margin loan structure

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code of the currency to repay
amount<code>float</code>Yesthe amount to repay
symbol<code>string</code>Yesnot used by woo.repayMargin ()
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="reserveRequestWeight" id="reserverequestweight"></a>

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: <code>object</code> - a response object

ParamTypeRequiredDescription
weight<code>number</code>Yesthe weight to reserve, 1 weight = 1 action, 0.0005 USDC per action
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="setAgentAbstraction" id="setagentabstraction"></a>

setAgentAbstraction

set agent abstraction mode

Kind: instance
Returns: dictionary response from the exchange

ParamTypeRequiredDescription
abstraction<code>string</code>Yesone of the strings ["i", "u", "p"] where "i" is "disabled", "u" is "unifiedAccount", and "p" is "portfolioMargin"
params<code>object</code>No
Supported exchanges

<a name="setContractLeverage" id="setcontractleverage"></a>

setContractLeverage

set the level of leverage for a market

Kind: instance
Returns: <code>object</code> - response from the exchange

ParamTypeRequiredDescription
leverage<code>float</code>Yesthe rate of leverage
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.uta<code>boolean</code>Noset to true for the unified trading account (uta)
Supported exchanges

<a name="setLeverage" id="setleverage"></a>

setLeverage

set the level of leverage for a market

Kind: instance
Returns: <code>object</code> - response from the exchange

ParamTypeRequiredDescription
leverage<code>float</code>Yesthe rate of leverage
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>Account</code>Noaccount id to use, required
Supported exchanges

<a name="setMargin" id="setmargin"></a>

setMargin

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

Kind: instance
Returns: <code>object</code> - A margin structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market to set margin in
amount<code>float</code>Yesthe amount to set the margin to
params<code>object</code>Noparameters specific to the bingx api endpoint
Supported exchanges

<a name="setMarginMode" id="setmarginmode"></a>

setMarginMode

set margin mode to 'cross' or 'isolated'

Kind: instance
Returns: <code>object</code> - response from the exchange

ParamTypeRequiredDescription
marginMode<code>string</code>Yes'cross' or 'isolated'
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="setPositionMode" id="setpositionmode"></a>

setPositionMode

set hedged to true or false for a market

Kind: instance
Returns: <code>object</code> - response from the exchange

ParamTypeRequiredDescription
hedged<code>bool</code>Yesset to true to use dualSidePosition
symbol<code>string</code>Yesnot used by bingx setPositionMode ()
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="setSandboxMode" id="setsandboxmode"></a>

setSandboxMode

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

Kind: instance

Param
enabled
Supported exchanges

<a name="setUserAbstraction" id="setuserabstraction"></a>

setUserAbstraction

set user abstraction mode

Kind: instance
Returns: dictionary response from the exchange

ParamTypeRequiredDescription
abstraction<code>string</code>Yesone of the strings ["disabled", "unifiedAccount", "portfolioMargin"],
params<code>object</code>No
params.type<code>string</code>No'userSetAbstraction' or 'agentSetAbstraction' default is 'userSetAbstraction'
Supported exchanges

<a name="signIn" id="signin"></a>

signIn

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

Kind: instance
Returns: response from exchange

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="signTxEd25519" id="signtxed25519"></a>

signTxEd25519

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

Kind: instance
Returns: <code>object</code> - the input transaction bytes and the signed digest

ParamTypeRequiredDescription
tx<code>object</code>Notransaction bytes and the signing digest for them
Supported exchanges

<a name="transfer" id="transfer"></a>

transfer

transfer currency internally between wallets on the same account

Kind: instance
Returns: <code>object</code> - a transfer structure

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
amount<code>float</code>Yesamount to transfer
fromAccount<code>string</code>Yesaccount to transfer from
toAccount<code>string</code>Yesaccount to transfer to
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="transferClassic" id="transferclassic"></a>

transferClassic

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

Kind: instance
Returns: <code>object</code> - a transfer structure

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
amount<code>float</code>Yesamount to transfer
fromAccount<code>string</code>Yesaccount to transfer from
toAccount<code>string</code>Yesaccount to transfer to
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.transferType<code>string</code>NoINTERNAL, PARENT_TO_SUB, SUB_TO_PARENT (default is INTERNAL)
params.fromUserId<code>string</code>Norequired if transferType is SUB_TO_PARENT
params.toUserId<code>string</code>Norequired if transferType is PARENT_TO_SUB
Supported exchanges

<a name="transferOut" id="transferout"></a>

transferOut

transfer from spot wallet to futures wallet

Kind: instance
Returns: a transfer structure

ParamTypeRequiredDescription
code<code>str</code>YesUnified currency code
amount<code>float</code>YesSize of the transfer
params<code>dict</code>NoExchange specific parameters
Supported exchanges

<a name="transferUta" id="transferuta"></a>

transferUta

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

Kind: instance
Returns: <code>object</code> - a transfer structure

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
amount<code>float</code>Yesamount to transfer
fromAccount<code>string</code>Yesaccount to transfer from
toAccount<code>string</code>Yesaccount to transfer to
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.transferType<code>string</code>NoINTERNAL, PARENT_TO_SUB, SUB_TO_PARENT, SUB_TO_SUB (default is INTERNAL)
params.fromUserId<code>string</code>Norequired if transferType is SUB_TO_PARENT or SUB_TO_SUB
params.toUserId<code>string</code>Norequired if transferType is PARENT_TO_SUB or SUB_TO_SUB
Supported exchanges

<a name="unWatchBalance" id="unwatchbalance"></a>

unWatchBalance

unWatches balance

Kind: instance
Returns: <code>object</code> - status of the unwatch request

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="unWatchBidsAsks" id="unwatchbidsasks"></a>

unWatchBidsAsks

unWatches best bid & ask for symbols

Kind: instance
Returns: <code>object</code> - a ticker structure

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="unWatchFundingRate" id="unwatchfundingrate"></a>

unWatchFundingRate

unWatches the current funding rate for a symbol

Kind: instance
Returns: <code>object</code> - a funding rate structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="unWatchMarkPrice" id="unwatchmarkprice"></a>

unWatchMarkPrice

unWatches a mark price for a specific market

Kind: instance
Returns: <code>object</code> - a ticker structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.use1sFreq<code>boolean</code>Nodefault is true if set to true, the mark price will be updated every second, otherwise every 3 seconds
Supported exchanges

<a name="unWatchMarkPrices" id="unwatchmarkprices"></a>

unWatchMarkPrices

watches the mark price for all markets

Kind: instance
Returns: <code>object</code> - a ticker structure

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.use1sFreq<code>boolean</code>Nodefault is true if set to true, the mark price will be updated every second, otherwise every 3 seconds
Supported exchanges

<a name="unWatchMyTrades" id="unwatchmytrades"></a>

unWatchMyTrades

unWatches information on multiple trades made by the user

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market orders were made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.unifiedMargin<code>boolean</code>Nouse unified margin account
params.executionFast<code>boolean</code>Nouse fast execution
Supported exchanges

<a name="unWatchOHLCV" id="unwatchohlcv"></a>

unWatchOHLCV

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

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch OHLCV data for
timeframe<code>string</code>Yesthe length of time each candle represents
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="unWatchOHLCVForSymbols" id="unwatchohlcvforsymbols"></a>

unWatchOHLCVForSymbols

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

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

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

<a name="unWatchOrderBook" id="unwatchorderbook"></a>

unWatchOrderBook

unsubscribe from the orderbook channel

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

ParamTypeRequiredDescription
symbol<code>string</code>Yessymbol of the market to unwatch the trades for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.limit<code>int</code>Noorderbook limit, default is undefined
Supported exchanges

<a name="unWatchOrderBookForSymbols" id="unwatchorderbookforsymbols"></a>

unWatchOrderBookForSymbols

unsubscribe from the orderbook channel

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified symbol of the market to unwatch the trades for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.limit<code>int</code>Noorderbook limit, default is undefined
Supported exchanges

<a name="unWatchOrders" id="unwatchorders"></a>

unWatchOrders

unWatches information on multiple orders made by the user

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

ParamTypeRequiredDescription
symbol<code>string</code>Nounified market symbol of the market orders were made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="unWatchPositions" id="unwatchpositions"></a>

unWatchPositions

unWatches from the stream channel

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nolist of unified market symbols to watch positions for
params<code>object</code>Yesextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="unWatchTicker" id="unwatchticker"></a>

unWatchTicker

unWatches a price ticker

Kind: instance
Returns: <code>object</code> - a ticker structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="unWatchTickers" id="unwatchtickers"></a>

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="unWatchTrades" id="unwatchtrades"></a>

unWatchTrades

unsubscribe from the trades channel

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market trades were made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="unWatchTradesForSymbols" id="unwatchtradesforsymbols"></a>

unWatchTradesForSymbols

unsubscribe from the trades channel

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified symbol of the market to fetch trades for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="upgradeUnifiedTradeAccount" id="upgradeunifiedtradeaccount"></a>

upgradeUnifiedTradeAccount

upgrades the account to unified trade account warning this is irreversible

Kind: instance
Returns: <code>any</code> - nothing

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="verifyGiftCode" id="verifygiftcode"></a>

verifyGiftCode

verify gift code

Kind: instance
Returns: <code>object</code> - response from the exchange

ParamTypeRequiredDescription
id<code>string</code>Yesreference number id
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="watchBalance" id="watchbalance"></a>

watchBalance

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

Kind: instance
Returns: <code>object</code> - a balance structure

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.type<code>str</code>Nospot or contract if not provided this.options['defaultType'] is used
Supported exchanges

<a name="watchBidsAsks" id="watchbidsasks"></a>

watchBidsAsks

watches best bid & ask for symbols

Kind: instance
Returns: <code>object</code> - a ticker structure

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="watchFundingRate" id="watchfundingrate"></a>

watchFundingRate

watch the current funding rate

Kind: instance
Returns: <code>object</code> - a funding rate structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="watchFundingRates" id="watchfundingrates"></a>

watchFundingRates

watch the funding rate for multiple markets

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesa list of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="watchLiquidations" id="watchliquidations"></a>

watchLiquidations

watch the public liquidations of a trading pair

Kind: instance
Returns: <code>object</code> - an array of liquidation structures

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified CCXT market symbol
since<code>int</code>Nothe earliest time in ms to fetch liquidations for
limit<code>int</code>Nothe maximum number of liquidation structures to retrieve
params<code>object</code>Noexchange specific parameters for the bitmex api endpoint
Supported exchanges

<a name="watchLiquidationsForSymbols" id="watchliquidationsforsymbols"></a>

watchLiquidationsForSymbols

watch the public liquidations of a trading pair

Kind: instance
Returns: <code>object</code> - an array of liquidation structures

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yeslist of unified market symbols
since<code>int</code>Nothe earliest time in ms to fetch liquidations for
limit<code>int</code>Nothe maximum number of liquidation structures to retrieve
params<code>object</code>Noexchange specific parameters for the bitmex api endpoint
Supported exchanges

<a name="watchMarkPrice" id="watchmarkprice"></a>

watchMarkPrice

watches a mark price for a specific market

Kind: instance
Returns: <code>object</code> - a ticker structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.use1sFreq<code>boolean</code>Nodefault is true if set to true, the mark price will be updated every second, otherwise every 3 seconds
Supported exchanges

<a name="watchMarkPrices" id="watchmarkprices"></a>

watchMarkPrices

watches the mark price for all markets

Kind: instance
Returns: <code>object</code> - a ticker structure

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.use1sFreq<code>boolean</code>Nodefault is true if set to true, the mark price will be updated every second, otherwise every 3 seconds
Supported exchanges

<a name="watchMyLiquidations" id="watchmyliquidations"></a>

watchMyLiquidations

watch the private liquidations of a trading pair

Kind: instance
Returns: <code>object</code> - an array of liquidation structures

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified CCXT market symbol
since<code>int</code>Nothe earliest time in ms to fetch liquidations for
limit<code>int</code>Nothe maximum number of liquidation structures to retrieve
params<code>object</code>Noexchange specific parameters for the bitmex api endpoint
Supported exchanges

<a name="watchMyLiquidationsForSymbols" id="watchmyliquidationsforsymbols"></a>

watchMyLiquidationsForSymbols

watch the private liquidations of a trading pair

Kind: instance
Returns: <code>object</code> - an array of liquidation structures

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yeslist of unified market symbols
since<code>int</code>Nothe earliest time in ms to fetch liquidations for
limit<code>int</code>Nothe maximum number of liquidation structures to retrieve
params<code>object</code>Noexchange specific parameters for the bitmex api endpoint
Supported exchanges

<a name="watchMyTrades" id="watchmytrades"></a>

watchMyTrades

watches information on multiple trades made by the user

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market trades were made in
since<code>int</code>Nothe earliest time in ms to fetch trades for
limit<code>int</code>Nothe maximum number of trade structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.unifiedMargin<code>boolean</code>Nouse unified margin account
Supported exchanges

<a name="watchMyTradesForSymbols" id="watchmytradesforsymbols"></a>

watchMyTradesForSymbols

watches information on multiple trades made by the user

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified symbol of the market to fetch trades for
since<code>int</code>Nothe earliest time in ms to fetch trades for
limit<code>int</code>Nothe maximum number of trade structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="watchOHLCV" id="watchohlcv"></a>

watchOHLCV

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

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch OHLCV data for
timeframe<code>string</code>Yesthe length of time each candle represents
since<code>int</code>Notimestamp in ms of the earliest candle to fetch
limit<code>int</code>Nothe maximum amount of candles to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="watchOHLCVForSymbols" id="watchohlcvforsymbols"></a>

watchOHLCVForSymbols

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

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

ParamTypeRequiredDescription
symbolsAndTimeframes<code>Array<Array<string>></code>Yesarray of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
since<code>int</code>Notimestamp in ms of the earliest candle to fetch
limit<code>int</code>Nothe maximum amount of candles to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="watchOrderBook" id="watchorderbook"></a>

watchOrderBook

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

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the order book for
limit<code>int</code>Nothe maximum amount of order book entries to return.
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="watchOrderBookForSymbols" id="watchorderbookforsymbols"></a>

watchOrderBookForSymbols

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

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified array of symbols
limit<code>int</code>Nothe maximum amount of order book entries to return.
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="watchOrders" id="watchorders"></a>

watchOrders

watches information on multiple orders made by the user

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market orders were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="watchOrdersForSymbols" id="watchordersforsymbols"></a>

watchOrdersForSymbols

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

Kind: instance
Returns: <code>Array<object></code> - a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yes
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of order structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.trigger<code>boolean</code>Noset to true for trigger orders
Supported exchanges

<a name="watchPosition" id="watchposition"></a>

watchPosition

watch open positions for a specific symbol

Kind: instance
Returns: <code>object</code> - a position structure

ParamTypeDescription
symbol<code>string</code>, <code>undefined</code>unified market symbol
params<code>object</code>extra parameters specific to the exchange API endpoint
Supported exchanges

<a name="watchPositions" id="watchpositions"></a>

watchPositions

watch all open positions

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Nolist of unified market symbols
since<code>int</code>Nothe earliest time in ms to fetch positions for
limit<code>int</code>Nothe maximum number of positions to retrieve
params<code>object</code>Yesextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="watchTicker" id="watchticker"></a>

watchTicker

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

Kind: instance
Returns: <code>object</code> - a ticker structure

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="watchTickers" id="watchtickers"></a>

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="watchTrades" id="watchtrades"></a>

watchTrades

watches information on multiple trades made in a market

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

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market trades were made in
since<code>int</code>Nothe earliest time in ms to fetch orders for
limit<code>int</code>Nothe maximum number of trade structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="watchTradesForSymbols" id="watchtradesforsymbols"></a>

watchTradesForSymbols

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

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

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yesunified symbol of the market to fetch trades for
since<code>int</code>Notimestamp in ms of the earliest trade to fetch
limit<code>int</code>Nothe maximum amount of trades to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
Supported exchanges

<a name="withdraw" id="withdraw"></a>

withdraw

make a withdrawal

Kind: instance
Returns: <code>object</code> - a transaction structure

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
amount<code>float</code>Yesthe amount to withdraw
address<code>string</code>Yesthe address to withdraw to
tag<code>string</code>Yes
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>Account</code>Noaccount id to use, required
Supported exchanges

<a name="withdrawWs" id="withdrawws"></a>

withdrawWs

make a withdrawal

Kind: instance
Returns: <code>object</code> - a transaction structure

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
amount<code>float</code>Yesthe amount to withdraw
address<code>string</code>Yesthe address to withdraw to
tag<code>string</code>Yes
params<code>object</code>Noextra parameters specific to the bitvavo api endpoint
Supported exchanges