-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
bybit
Kind: global class
Extends: Exchange
- enableDemoTrading
- isUnifiedEnabled
- upgradeUnifiedTradeAccount
- fetchTime
- fetchCurrencies
- fetchMarkets
- fetchTicker
- fetchTickers
- fetchBidsAsks
- fetchOHLCV
- fetchFundingRates
- fetchFundingRateHistory
- fetchTrades
- fetchOrderBook
- fetchBalance
- createMarketBuyOrderWithCost
- createMarkeSellOrderWithCost
- createOrder
- createOrders
- editOrder
- editOrders
- cancelOrder
- cancelOrders
- cancelAllOrdersAfter
- cancelOrdersForSymbols
- cancelAllOrders
- fetchOrderClassic
- fetchOrder
- fetchOrders
- fetchOrdersClassic
- fetchClosedOrder
- fetchOpenOrder
- fetchCanceledAndClosedOrders
- fetchClosedOrders
- fetchCanceledOrders
- fetchOpenOrders
- fetchOrderTrades
- fetchMyTrades
- fetchDepositAddressesByNetwork
- fetchDepositAddress
- fetchDeposits
- fetchWithdrawals
- fetchLedger
- withdraw
- fetchPosition
- fetchPositions
- fetchLeverage
- setMarginMode
- setLeverage
- setPositionMode
- fetchOpenInterest
- fetchOpenInterestHistory
- fetchCrossBorrowRate
- fetchBorrowInterest
- fetchBorrowRateHistory
- transfer
- fetchTransfers
- borrowCrossMargin
- repayCrossMargin
- fetchMarketLeverageTiers
- fetchTradingFee
- fetchTradingFees
- fetchDepositWithdrawFees
- fetchSettlementHistory
- fetchMySettlementHistory
- fetchVolatilityHistory
- fetchGreeks
- fetchAllGreeks
- fetchMyLiquidations
- fetchLeverageTiers
- fetchFundingHistory
- fetchOption
- fetchOptionChain
- fetchPositionsHistory
- fetchConvertCurrencies
- fetchConvertQuote
- createConvertTrade
- fetchConvertTrade
- fetchConvertTradeHistory
- fetchLongShortRatioHistory
- fetchPositionsADLRank
- fetchMarginMode
- createOrderWs
- editOrderWs
- cancelOrderWs
- watchTicker
- watchTickers
- unWatchTickers
- unWatchTicker
- watchBidsAsks
- watchOHLCV
- watchOHLCVForSymbols
- unWatchOHLCVForSymbols
- unWatchOHLCV
- watchOrderBook
- watchOrderBookForSymbols
- unWatchOrderBookForSymbols
- unWatchOrderBook
- watchTrades
- watchTradesForSymbols
- unWatchTradesForSymbols
- unWatchTrades
- watchMyTrades
- unWatchMyTrades
- watchPositions
- unWatchPositions
- watchLiquidations
- watchOrders
- unWatchOrders
- watchBalance
enables or disables demo trading mode
Kind: instance method of bybit
See: https://bybit-exchange.github.io/docs/v5/demo
| Param | Type | Required | Description |
|---|---|---|---|
| enable | boolean |
No | true if demo trading should be enabled, false otherwise |
bybit.enableDemoTrading ([enable])returns [enableUnifiedMargin, enableUnifiedAccount] so the user can check if unified account is enabled
Kind: instance method of bybit
Returns: any - [enableUnifiedMargin, enableUnifiedAccount]
See
- https://bybit-exchange.github.io/docs/v5/user/apikey-info#http-request
- https://bybit-exchange.github.io/docs/v5/account/account-info
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.isUnifiedEnabled ([params])upgrades the account to unified trade account warning this is irreversible
Kind: instance method of bybit
Returns: any - nothing
See: https://bybit-exchange.github.io/docs/v5/account/upgrade-unified-account
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.upgradeUnifiedTradeAccount ([params])fetches the current integer timestamp in milliseconds from the exchange server
Kind: instance method of bybit
Returns: int - the current integer timestamp in milliseconds from the exchange server
See: https://bybit-exchange.github.io/docs/v5/market/time
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.fetchTime ([params])fetches all available currencies on an exchange
Kind: instance method of bybit
Returns: object - an associative dictionary of currencies
See: https://bybit-exchange.github.io/docs/v5/asset/coin-info
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.fetchCurrencies ([params])retrieves data on all markets for bybit
Kind: instance method of bybit
Returns: Array<object> - an array of objects representing market data
See: https://bybit-exchange.github.io/docs/v5/market/instrument
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.fetchMarkets ([params])fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
Kind: instance method of bybit
Returns: object - a ticker structure
See: https://bybit-exchange.github.io/docs/v5/market/tickers
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the ticker for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.fetchTicker (symbol[, params])fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
Kind: instance method of bybit
Returns: object - an array of ticker structures
See: https://bybit-exchange.github.io/docs/v5/market/tickers
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
Yes | unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.subType | string |
No | contract only 'linear', 'inverse' |
| params.baseCoin | string |
No | option only base coin, default is 'BTC' |
bybit.fetchTickers (symbols[, params])fetches the bid and ask price and volume for multiple markets
Kind: instance method of bybit
Returns: object - a dictionary of ticker structures
See: https://bybit-exchange.github.io/docs/v5/market/tickers
| Param | Type | Required | Description |
|---|---|---|---|
| symbols |
Array<string>, undefined
|
Yes | unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.subType | string |
No | contract only 'linear', 'inverse' |
| params.baseCoin | string |
No | option only base coin, default is 'BTC' |
bybit.fetchBidsAsks (symbols[, params])fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of bybit
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
See
- https://bybit-exchange.github.io/docs/v5/market/kline
- https://bybit-exchange.github.io/docs/v5/market/mark-kline
- https://bybit-exchange.github.io/docs/v5/market/index-kline
- https://bybit-exchange.github.io/docs/v5/market/preimum-index-kline
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | string |
Yes | the length of time each candle represents |
| since | int |
No | timestamp in ms of the earliest candle to fetch |
| limit | int |
No | the maximum amount of candles to fetch |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.until | int |
No | the latest time in ms to fetch orders for |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters |
bybit.fetchOHLCV (symbol, timeframe[, since, limit, params])fetches funding rates for multiple markets
Kind: instance method of bybit
Returns: Array<object> - a list of funding rate structures
See: https://bybit-exchange.github.io/docs/v5/market/tickers
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
Yes | unified symbols of the markets to fetch the funding rates for, all market funding rates are returned if not assigned |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.fetchFundingRates (symbols[, params])fetches historical funding rate prices
Kind: instance method of bybit
Returns: Array<object> - a list of funding rate structures
See: https://bybit-exchange.github.io/docs/v5/market/history-fund-rate
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the funding rate history for |
| since | int |
No | timestamp in ms of the earliest funding rate to fetch |
| limit | int |
No | the maximum amount of funding rate structures to fetch |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.until | int |
No | timestamp in ms of the latest funding rate |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters |
bybit.fetchFundingRateHistory (symbol[, since, limit, params])get the list of most recent trades for a particular symbol
Kind: instance method of bybit
Returns: Array<Trade> - a list of trade structures
See: https://bybit-exchange.github.io/docs/v5/market/recent-trade
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch trades for |
| since | int |
No | timestamp in ms of the earliest trade to fetch |
| limit | int |
No | the maximum amount of trades to fetch |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.type | string |
No | market type, ['swap', 'option', 'spot'] |
| params.subType | string |
No | market subType, ['linear', 'inverse'] |
bybit.fetchTrades (symbol[, since, limit, params])fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of bybit
Returns: object - A dictionary of order book structures indexed by market symbols
See: https://bybit-exchange.github.io/docs/v5/market/orderbook
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the order book for |
| limit | int |
No | the maximum amount of order book entries to return |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.fetchOrderBook (symbol[, limit, params])query for balance and get the amount of funds available for trading or funds locked in orders
Kind: instance method of bybit
Returns: object - a balance structure
See
- https://bybit-exchange.github.io/docs/v5/spot-margin-normal/account-info
- https://bybit-exchange.github.io/docs/v5/asset/all-balance
- https://bybit-exchange.github.io/docs/v5/account/wallet-balance
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.type | string |
No | wallet type, ['spot', 'swap', 'funding'] |
bybit.fetchBalance ([params])create a market buy order by providing the symbol and cost
Kind: instance method of bybit
Returns: object - an order structure
See: https://bybit-exchange.github.io/docs/v5/order/create-order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to create an order in |
| cost | float |
Yes | how much you want to trade in units of the quote currency |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.createMarketBuyOrderWithCost (symbol, cost[, params])create a market sell order by providing the symbol and cost
Kind: instance method of bybit
Returns: object - an order structure
See: https://bybit-exchange.github.io/docs/v5/order/create-order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to create an order in |
| cost | float |
Yes | how much you want to trade in units of the quote currency |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.createMarkeSellOrderWithCost (symbol, cost[, params])create a trade order
Kind: instance method of bybit
Returns: object - an order structure
See
- https://bybit-exchange.github.io/docs/v5/order/create-order
- https://bybit-exchange.github.io/docs/v5/position/trading-stop
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to create an order in |
| type | string |
Yes | 'market' or 'limit' |
| side | string |
Yes | 'buy' or 'sell' |
| amount | float |
Yes | how much of currency you want to trade in units of base currency |
| price | float |
No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.timeInForce | string |
No | "GTC", "IOC", "FOK" |
| params.postOnly | bool |
No | true or false whether the order is post-only |
| params.reduceOnly | bool |
No | true or false whether the order is reduce-only |
| params.positionIdx | string |
No | contracts only 0 for one-way mode, 1 buy side of hedged mode, 2 sell side of hedged mode |
| params.hedged | bool |
No | contracts only true for hedged mode, false for one way mode, default is false |
| params.isLeverage | int |
No | unified spot only false then spot trading true then margin trading |
| params.tpslMode | string |
No | contract only 'Full' or 'Partial' |
| params.mmp | string |
No | option only market maker protection |
| params.triggerDirection | string |
No | contract only the direction for trigger orders, 'ascending' or 'descending' |
| params.triggerPrice | float |
No | The price at which a trigger order is triggered at |
| params.stopLossPrice | float |
No | The price at which a stop loss order is triggered at |
| params.stopLossLimitPrice | float |
No | The limit price for a stoploss order (only when used in OCO with takeProfitPrice) |
| params.takeProfitPrice | float |
No | The price at which a take profit order is triggered at |
| params.takeProfitLimitPrice | float |
No | The limit price for a takeprofit order (only when used in OCO combination with stopLossPrice) |
| params.takeProfit | object |
No | takeProfit object in params containing the triggerPrice at which the attached take profit order will be triggered |
| params.takeProfit.triggerPrice | float |
No | take profit trigger price |
| params.stopLoss | object |
No | stopLoss object in params containing the triggerPrice at which the attached stop loss order will be triggered |
| params.stopLoss.triggerPrice | float |
No | stop loss trigger price |
| params.trailingAmount | string |
No | the quote amount to trail away from the current market price |
| params.trailingTriggerPrice | string |
No | the price to trigger a trailing order, default uses the price argument |
| params.tradingStopEndpoint | boolean |
No | whether to enforce using the tradingStop (https://bybit-exchange.github.io/docs/v5/position/trading-stop) endpoint, makes difference when submitting single tp/sl order |
bybit.createOrder (symbol, type, side, amount[, price, params])create a list of trade orders
Kind: instance method of bybit
Returns: object - an order structure
See: https://bybit-exchange.github.io/docs/v5/order/batch-place
| Param | Type | Required | Description |
|---|---|---|---|
| orders | Array |
Yes | list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.createOrders (orders[, params])edit a trade order
Kind: instance method of bybit
Returns: object - an order structure
See
- https://bybit-exchange.github.io/docs/v5/order/amend-order
- https://bybit-exchange.github.io/docs/derivatives/unified/replace-order
- https://bybit-exchange.github.io/docs/api-explorer/derivatives/trade/contract/replace-order
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | cancel order id |
| symbol | string |
Yes | unified symbol of the market to create an order in |
| type | string |
Yes | 'market' or 'limit' |
| side | string |
Yes | 'buy' or 'sell' |
| amount | float |
Yes | how much of currency you want to trade in units of base currency |
| price | float |
Yes | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.clientOrderId | string |
No | unique client order id |
| params.triggerPrice | float |
No | The price that a trigger order is triggered at |
| params.stopLossPrice | float |
No | The price that a stop loss order is triggered at |
| params.takeProfitPrice | float |
No | The price that a take profit order is triggered at |
| params.takeProfit | object |
No | takeProfit object in params containing the triggerPrice that the attached take profit order will be triggered |
| params.takeProfit.triggerPrice | float |
No | take profit trigger price |
| params.stopLoss | object |
No | stopLoss object in params containing the triggerPrice that the attached stop loss order will be triggered |
| params.stopLoss.triggerPrice | float |
No | stop loss trigger price |
| params.triggerBy | string |
No | 'IndexPrice', 'MarkPrice' or 'LastPrice', default is 'LastPrice', required if no initial value for triggerPrice |
| params.slTriggerBy | string |
No | 'IndexPrice', 'MarkPrice' or 'LastPrice', default is 'LastPrice', required if no initial value for stopLoss |
| params.tpTriggerby | string |
No | 'IndexPrice', 'MarkPrice' or 'LastPrice', default is 'LastPrice', required if no initial value for takeProfit |
bybit.editOrder (id, symbol, type, side, amount, price[, params])edit a list of trade orders
Kind: instance method of bybit
Returns: object - an order structure
See: https://bybit-exchange.github.io/docs/v5/order/batch-amend
| Param | Type | Required | Description |
|---|---|---|---|
| orders | Array |
Yes | list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.editOrders (orders[, params])cancels an open order
Kind: instance method of bybit
Returns: object - An order structure
See: https://bybit-exchange.github.io/docs/v5/order/cancel-order
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | order id |
| symbol | string |
Yes | unified symbol of the market the order was made in |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.trigger | boolean |
No | spot only whether the order is a trigger order |
| params.stop | boolean |
No | alias for trigger |
| params.orderFilter | string |
No | spot only 'Order' or 'StopOrder' or 'tpslOrder' |
bybit.cancelOrder (id, symbol[, params])cancel multiple orders
Kind: instance method of bybit
Returns: object - an list of order structures
See: https://bybit-exchange.github.io/docs/v5/order/batch-cancel
| Param | Type | Required | Description |
|---|---|---|---|
| ids | Array<string> |
Yes | order ids |
| symbol | string |
Yes | unified symbol of the market the order was made in |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.clientOrderIds | Array<string> |
No | client order ids |
bybit.cancelOrders (ids, symbol[, params])dead man's switch, cancel all orders after the given timeout
Kind: instance method of bybit
Returns: object - the api result
See: https://bybit-exchange.github.io/docs/v5/order/dcp
| Param | Type | Required | Description |
|---|---|---|---|
| timeout | number |
Yes | time in milliseconds |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.product | string |
No | OPTIONS, DERIVATIVES, SPOT, default is 'DERIVATIVES' |
bybit.cancelAllOrdersAfter (timeout[, params])cancel multiple orders for multiple symbols
Kind: instance method of bybit
Returns: object - an list of order structures
See: https://bybit-exchange.github.io/docs/v5/order/batch-cancel
| Param | Type | Required | Description |
|---|---|---|---|
| orders | Array<CancellationRequest> |
Yes | list of order ids with symbol, example [{"id": "a", "symbol": "BTC/USDT"}, {"id": "b", "symbol": "ETH/USDT"}] |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.cancelOrdersForSymbols (orders[, params])cancel all open orders
Kind: instance method of bybit
Returns: Array<object> - a list of order structures
See: https://bybit-exchange.github.io/docs/v5/order/cancel-all
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.trigger | boolean |
No | true if trigger order |
| params.stop | boolean |
No | alias for trigger |
| params.type | string |
No | market type, ['swap', 'option', 'spot'] |
| params.subType | string |
No | market subType, ['linear', 'inverse'] |
| params.baseCoin | string |
No | Base coin. Supports linear, inverse & option |
| params.settleCoin | string |
No | Settle coin. Supports linear, inverse & option |
bybit.cancelAllOrders (symbol[, params])fetches information on an order made by the user classic accounts only
Kind: instance method of bybit
Returns: object - An order structure
See: https://bybit-exchange.github.io/docs/v5/order/order-list
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | the order id |
| symbol | string |
Yes | unified symbol of the market the order was made in |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.fetchOrderClassic (id, symbol[, params])classic accounts only/ spot not supported fetches information on an order made by the user classic accounts only
Kind: instance method of bybit
Returns: object - An order structure
See: https://bybit-exchange.github.io/docs/v5/order/order-list
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | the order id |
| symbol | string |
Yes | unified symbol of the market the order was made in |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.acknowledged | object |
No | to suppress the warning, set to true |
bybit.fetchOrder (id, symbol[, params])classic accounts only/ spot not supported fetches information on multiple orders made by the user classic accounts only/ spot not supported
Kind: instance method of bybit
Returns: Array<Order> - a list of order structures
See: https://bybit-exchange.github.io/docs/v5/order/order-list
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the market orders were made in |
| since | int |
No | the earliest time in ms to fetch orders for |
| limit | int |
No | the maximum number of order structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.trigger | boolean |
No | true if trigger order |
| params.stop | boolean |
No | alias for trigger |
| params.type | string |
No | market type, ['swap', 'option'] |
| params.subType | string |
No | market subType, ['linear', 'inverse'] |
| params.orderFilter | string |
No | 'Order' or 'StopOrder' or 'tpslOrder' |
| params.until | int |
No | the latest time in ms to fetch entries for |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters |
bybit.fetchOrders (symbol[, since, limit, params])fetches information on multiple orders made by the user classic accounts only
Kind: instance method of bybit
Returns: Array<Order> - a list of order structures
See: https://bybit-exchange.github.io/docs/v5/order/order-list
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the market orders were made in |
| since | int |
No | the earliest time in ms to fetch orders for |
| limit | int |
No | the maximum number of order structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.trigger | boolean |
No | true if trigger order |
| params.stop | boolean |
No | alias for trigger |
| params.type | string |
No | market type, ['swap', 'option', 'spot'] |
| params.subType | string |
No | market subType, ['linear', 'inverse'] |
| params.orderFilter | string |
No | 'Order' or 'StopOrder' or 'tpslOrder' |
| params.until | int |
No | the latest time in ms to fetch entries for |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters |
bybit.fetchOrdersClassic (symbol[, since, limit, params])fetches information on a closed order made by the user
Kind: instance method of bybit
Returns: object - an order structure
See: https://bybit-exchange.github.io/docs/v5/order/order-list
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | order id |
| symbol | string |
No | unified symbol of the market the order was made in |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.trigger | boolean |
No | set to true for fetching a closed trigger order |
| params.stop | boolean |
No | alias for trigger |
| params.type | string |
No | market type, ['swap', 'option', 'spot'] |
| params.subType | string |
No | market subType, ['linear', 'inverse'] |
| params.orderFilter | string |
No | 'Order' or 'StopOrder' or 'tpslOrder' |
bybit.fetchClosedOrder (id[, symbol, params])fetches information on an open order made by the user
Kind: instance method of bybit
Returns: object - an order structure
See: https://bybit-exchange.github.io/docs/v5/order/open-order
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | order id |
| symbol | string |
No | unified symbol of the market the order was made in |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.trigger | boolean |
No | set to true for fetching an open trigger order |
| params.stop | boolean |
No | alias for trigger |
| params.type | string |
No | market type, ['swap', 'option', 'spot'] |
| params.subType | string |
No | market subType, ['linear', 'inverse'] |
| params.baseCoin | string |
No | Base coin. Supports linear, inverse & option |
| params.settleCoin | string |
No | Settle coin. Supports linear, inverse & option |
| params.orderFilter | string |
No | 'Order' or 'StopOrder' or 'tpslOrder' |
bybit.fetchOpenOrder (id[, symbol, params])fetches information on multiple canceled and closed orders made by the user
Kind: instance method of bybit
Returns: Array<Order> - a list of order structures
See: https://bybit-exchange.github.io/docs/v5/order/order-list
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
No | unified market symbol of the market orders were made in |
| since | int |
No | the earliest time in ms to fetch orders for |
| limit | int |
No | the maximum number of order structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.trigger | boolean |
No | set to true for fetching trigger orders |
| params.stop | boolean |
No | alias for trigger |
| params.type | string |
No | market type, ['swap', 'option', 'spot'] |
| params.subType | string |
No | market subType, ['linear', 'inverse'] |
| params.orderFilter | string |
No | 'Order' or 'StopOrder' or 'tpslOrder' |
| params.until | int |
No | the latest time in ms to fetch entries for |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters |
bybit.fetchCanceledAndClosedOrders ([symbol, since, limit, params])fetches information on multiple closed orders made by the user
Kind: instance method of bybit
Returns: Array<Order> - a list of order structures
See: https://bybit-exchange.github.io/docs/v5/order/order-list
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
No | unified market symbol of the market orders were made in |
| since | int |
No | the earliest time in ms to fetch orders for |
| limit | int |
No | the maximum number of order structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.trigger | boolean |
No | set to true for fetching closed trigger orders |
| params.stop | boolean |
No | alias for trigger |
| params.type | string |
No | market type, ['swap', 'option', 'spot'] |
| params.subType | string |
No | market subType, ['linear', 'inverse'] |
| params.orderFilter | string |
No | 'Order' or 'StopOrder' or 'tpslOrder' |
| params.until | int |
No | the latest time in ms to fetch entries for |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters |
bybit.fetchClosedOrders ([symbol, since, limit, params])fetches information on multiple canceled orders made by the user
Kind: instance method of bybit
Returns: object - a list of order structures
See: https://bybit-exchange.github.io/docs/v5/order/order-list
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
No | unified market symbol of the market orders were made in |
| since | int |
No | timestamp in ms of the earliest order, default is undefined |
| limit | int |
No | max number of orders to return, default is undefined |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.trigger | boolean |
No | true if trigger order |
| params.stop | boolean |
No | alias for trigger |
| params.type | string |
No | market type, ['swap', 'option', 'spot'] |
| params.subType | string |
No | market subType, ['linear', 'inverse'] |
| params.orderFilter | string |
No | 'Order' or 'StopOrder' or 'tpslOrder' |
| params.until | int |
No | the latest time in ms to fetch entries for |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters |
bybit.fetchCanceledOrders ([symbol, since, limit, params])fetch all unfilled currently open orders
Kind: instance method of bybit
Returns: Array<Order> - a list of order structures
See: https://bybit-exchange.github.io/docs/v5/order/open-order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol |
| since | int |
No | the earliest time in ms to fetch open orders for |
| limit | int |
No | the maximum number of open orders structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.trigger | boolean |
No | set to true for fetching open trigger orders |
| params.stop | boolean |
No | alias for trigger |
| params.type | string |
No | market type, ['swap', 'option', 'spot'] |
| params.subType | string |
No | market subType, ['linear', 'inverse'] |
| params.baseCoin | string |
No | Base coin. Supports linear, inverse & option |
| params.settleCoin | string |
No | Settle coin. Supports linear, inverse & option |
| params.orderFilter | string |
No | 'Order' or 'StopOrder' or 'tpslOrder' |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters |
bybit.fetchOpenOrders (symbol[, since, limit, params])fetch all the trades made from a single order
Kind: instance method of bybit
Returns: Array<object> - a list of trade structures
See: https://bybit-exchange.github.io/docs/v5/position/execution
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | order id |
| symbol | string |
Yes | unified market symbol |
| since | int |
No | the earliest time in ms to fetch trades for |
| limit | int |
No | the maximum number of trades to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.fetchOrderTrades (id, symbol[, since, limit, params])fetch all trades made by the user
Kind: instance method of bybit
Returns: Array<Trade> - a list of trade structures
See: https://bybit-exchange.github.io/docs/api-explorer/v5/position/execution
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol |
| since | int |
No | the earliest time in ms to fetch trades for |
| limit | int |
No | the maximum number of trades structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.type | string |
No | market type, ['swap', 'option', 'spot'] |
| params.subType | string |
No | market subType, ['linear', 'inverse'] |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters |
bybit.fetchMyTrades (symbol[, since, limit, params])fetch a dictionary of addresses for a currency, indexed by network
Kind: instance method of bybit
Returns: object - a dictionary of address structures indexed by the network
See: https://bybit-exchange.github.io/docs/v5/asset/master-deposit-addr
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code of the currency for the deposit address |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.fetchDepositAddressesByNetwork (code[, params])fetch the deposit address for a currency associated with this account
Kind: instance method of bybit
Returns: object - an address structure
See: https://bybit-exchange.github.io/docs/v5/asset/master-deposit-addr
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.fetchDepositAddress (code[, params])fetch all deposits made to an account
Kind: instance method of bybit
Returns: Array<object> - a list of transaction structures
See: https://bybit-exchange.github.io/docs/v5/asset/deposit-record
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code |
| since | int |
No | the earliest time in ms to fetch deposits for, default = 30 days before the current time |
| limit | int |
No | the maximum number of deposits structures to retrieve, default = 50, max = 50 |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.until | int |
No | the latest time in ms to fetch deposits for, default = 30 days after since EXCHANGE SPECIFIC PARAMETERS |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters |
| params.cursor | string |
No | used for pagination |
bybit.fetchDeposits (code[, since, limit, params])fetch all withdrawals made from an account
Kind: instance method of bybit
Returns: Array<object> - a list of transaction structures
See: https://bybit-exchange.github.io/docs/v5/asset/withdraw-record
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code |
| since | int |
No | the earliest time in ms to fetch withdrawals for |
| limit | int |
No | the maximum number of withdrawals structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.until | int |
No | the latest time in ms to fetch entries for |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters |
bybit.fetchWithdrawals (code[, since, limit, params])fetch the history of changes, actions done by the user or operations that altered the balance of the user
Kind: instance method of bybit
Returns: object - a ledger structure
See
- https://bybit-exchange.github.io/docs/v5/account/transaction-log
- https://bybit-exchange.github.io/docs/v5/account/contract-transaction-log
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
No | unified currency code, default is undefined |
| since | int |
No | timestamp in ms of the earliest ledger entry, default is undefined |
| limit | int |
No | max number of ledger entries to return, default is undefined |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters |
| params.subType | string |
No | if inverse will use v5/account/contract-transaction-log |
bybit.fetchLedger ([code, since, limit, params])make a withdrawal
Kind: instance method of bybit
Returns: object - a transaction structure
See: https://bybit-exchange.github.io/docs/v5/asset/withdraw
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code |
| amount | float |
Yes | the amount to withdraw |
| address | string |
Yes | the address to withdraw to |
| tag | string |
Yes | |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.accountType | string |
No | 'UTA', 'FUND', 'FUND,UTA', and 'SPOT (for classic accounts only) |
bybit.withdraw (code, amount, address, tag[, params])fetch data on a single open contract trade position
Kind: instance method of bybit
Returns: object - a position structure
See: https://bybit-exchange.github.io/docs/v5/position
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the market the position is held in, default is undefined |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.fetchPosition (symbol[, params])fetch all open positions
Kind: instance method of bybit
Returns: Array<object> - a list of position structure
See: https://bybit-exchange.github.io/docs/v5/position
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
Yes | list of unified market symbols |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.type | string |
No | market type, ['swap', 'option', 'spot'] |
| params.subType | string |
No | market subType, ['linear', 'inverse'] |
| params.baseCoin | string |
No | Base coin. Supports linear, inverse & option |
| params.settleCoin | string |
No | Settle coin. Supports linear, inverse & option |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times |
bybit.fetchPositions (symbols[, params])fetch the set leverage for a market
Kind: instance method of bybit
Returns: object - a leverage structure
See: https://bybit-exchange.github.io/docs/v5/position
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.fetchLeverage (symbol[, params])set margin mode (account) or trade mode (symbol)
Kind: instance method of bybit
Returns: object - response from the exchange
See
- https://bybit-exchange.github.io/docs/v5/account/set-margin-mode
- https://bybit-exchange.github.io/docs/v5/position/cross-isolate
| Param | Type | Required | Description |
|---|---|---|---|
| marginMode | string |
Yes | account mode must be either [isolated, cross, portfolio], trade mode must be either [isolated, cross] |
| symbol | string |
Yes | unified market symbol of the market the position is held in, default is undefined |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.leverage | string |
No | the rate of leverage, is required if setting trade mode (symbol) |
bybit.setMarginMode (marginMode, symbol[, params])set the level of leverage for a market
Kind: instance method of bybit
Returns: object - response from the exchange
See: https://bybit-exchange.github.io/docs/v5/position/leverage
| Param | Type | Required | Description |
|---|---|---|---|
| leverage | float |
Yes | the rate of leverage |
| symbol | string |
Yes | unified market symbol |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.buyLeverage | string |
No | leverage for buy side |
| params.sellLeverage | string |
No | leverage for sell side |
bybit.setLeverage (leverage, symbol[, params])set hedged to true or false for a market
Kind: instance method of bybit
Returns: object - response from the exchange
See: https://bybit-exchange.github.io/docs/v5/position/position-mode
| Param | Type | Required | Description |
|---|---|---|---|
| hedged | bool |
Yes | |
| symbol | string |
Yes | used for unified account with inverse market |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.setPositionMode (hedged, symbol[, params])Retrieves the open interest of a derivative trading pair
Kind: instance method of bybit
Returns: object - an open interest structurehttps://docs.ccxt.com/?id=open-interest-structure
See: https://bybit-exchange.github.io/docs/v5/market/open-interest
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | Unified CCXT market symbol |
| params | object |
No | exchange specific parameters |
| params.interval | string |
No | 5m, 15m, 30m, 1h, 4h, 1d |
| params.category | string |
No | "linear" or "inverse" |
bybit.fetchOpenInterest (symbol[, params])Gets the total amount of unsettled contracts. In other words, the total number of contracts held in open positions
Kind: instance method of bybit
Returns: An array of open interest structures
See: https://bybit-exchange.github.io/docs/v5/market/open-interest
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | Unified market symbol |
| timeframe | string |
Yes | "5m", 15m, 30m, 1h, 4h, 1d |
| since | int |
No | Not used by Bybit |
| limit | int |
No | The number of open interest structures to return. Max 200, default 50 |
| params | object |
No | Exchange specific parameters |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters |
bybit.fetchOpenInterestHistory (symbol, timeframe[, since, limit, params])fetch the rate of interest to borrow a currency for margin trading
Kind: instance method of bybit
Returns: object - a borrow rate structure
See: https://bybit-exchange.github.io/docs/zh-TW/v5/spot-margin-normal/interest-quota
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.fetchCrossBorrowRate (code[, params])fetch the interest owed by the user for borrowing currency for margin trading
Kind: instance method of bybit
Returns: Array<object> - a list of borrow interest structures
See: https://bybit-exchange.github.io/docs/zh-TW/v5/spot-margin-normal/account-info
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code |
| symbol | string |
Yes | unified market symbol when fetch interest in isolated markets |
| since | number |
No | the earliest time in ms to fetch borrrow interest for |
| limit | number |
No | the maximum number of structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.fetchBorrowInterest (code, symbol[, since, limit, params])retrieves a history of a currencies borrow interest rate at specific time slots
Kind: instance method of bybit
Returns: Array<object> - an array of borrow rate structures
See: https://bybit-exchange.github.io/docs/v5/spot-margin-uta/historical-interest
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code |
| since | int |
No | timestamp for the earliest borrow rate |
| limit | int |
No | the maximum number of borrow rate structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.until | int |
No | the latest time in ms to fetch entries for |
bybit.fetchBorrowRateHistory (code[, since, limit, params])transfer currency internally between wallets on the same account
Kind: instance method of bybit
Returns: object - a transfer structure
See: https://bybit-exchange.github.io/docs/v5/asset/create-inter-transfer
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code |
| amount | float |
Yes | amount to transfer |
| fromAccount | string |
Yes | account to transfer from |
| toAccount | string |
Yes | account to transfer to |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.transferId | string |
No | UUID, which is unique across the platform |
bybit.transfer (code, amount, fromAccount, toAccount[, params])fetch a history of internal transfers made on an account
Kind: instance method of bybit
Returns: Array<object> - a list of transfer structures
See: https://bybit-exchange.github.io/docs/v5/asset/inter-transfer-list
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code of the currency transferred |
| since | int |
No | the earliest time in ms to fetch transfers for |
| limit | int |
No | the maximum number of transfer structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.until | int |
No | the latest time in ms to fetch entries for |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the availble parameters |
bybit.fetchTransfers (code[, since, limit, params])create a loan to borrow margin
Kind: instance method of bybit
Returns: object - a margin loan structure
See: https://bybit-exchange.github.io/docs/v5/account/borrow
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code of the currency to borrow |
| amount | float |
Yes | the amount to borrow |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.borrowCrossMargin (code, amount[, params])repay borrowed margin and interest
Kind: instance method of bybit
Returns: object - a margin loan structure
See: https://bybit-exchange.github.io/docs/v5/account/no-convert-repay
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code of the currency to repay |
| amount | float |
Yes | the amount to repay |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.repayCrossMargin (code, amount[, params])retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
Kind: instance method of bybit
Returns: object - a leverage tiers structure
See: https://bybit-exchange.github.io/docs/v5/market/risk-limit
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.fetchMarketLeverageTiers (symbol[, params])fetch the trading fees for a market
Kind: instance method of bybit
Returns: object - a fee structure
See: https://bybit-exchange.github.io/docs/v5/account/fee-rate
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.fetchTradingFee (symbol[, params])fetch the trading fees for multiple markets
Kind: instance method of bybit
Returns: object - a dictionary of fee structures indexed by market symbols
See: https://bybit-exchange.github.io/docs/v5/account/fee-rate
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.type | string |
No | market type, ['swap', 'option', 'spot'] |
bybit.fetchTradingFees ([params])fetch deposit and withdraw fees
Kind: instance method of bybit
Returns: object - a list of fee structures
See: https://bybit-exchange.github.io/docs/v5/asset/coin-info
| Param | Type | Required | Description |
|---|---|---|---|
| codes | Array<string> |
Yes | list of unified currency codes |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.fetchDepositWithdrawFees (codes[, params])fetches historical settlement records
Kind: instance method of bybit
Returns: Array<object> - a list of [settlement history objects]
See: https://bybit-exchange.github.io/docs/v5/market/delivery-price
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the settlement history |
| since | int |
No | timestamp in ms |
| limit | int |
No | number of records |
| params | object |
No | exchange specific params |
| params.type | string |
No | market type, ['swap', 'option', 'spot'] |
| params.subType | string |
No | market subType, ['linear', 'inverse'] |
bybit.fetchSettlementHistory (symbol[, since, limit, params])fetches historical settlement records of the user
Kind: instance method of bybit
Returns: Array<object> - a list of [settlement history objects]
See: https://bybit-exchange.github.io/docs/v5/asset/delivery
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the settlement history |
| since | int |
No | timestamp in ms |
| limit | int |
No | number of records |
| params | object |
No | exchange specific params |
| params.type | string |
No | market type, ['swap', 'option', 'spot'] |
| params.subType | string |
No | market subType, ['linear', 'inverse'] |
bybit.fetchMySettlementHistory (symbol[, since, limit, params])fetch the historical volatility of an option market based on an underlying asset
Kind: instance method of bybit
Returns: Array<object> - a list of volatility history objects
See: https://bybit-exchange.github.io/docs/v5/market/iv
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | unified currency code |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.period | int |
No | the period in days to fetch the volatility for: 7,14,21,30,60,90,180,270 |
bybit.fetchVolatilityHistory (code[, params])fetches an option contracts greeks, financial metrics used to measure the factors that affect the price of an options contract
Kind: instance method of bybit
Returns: object - a greeks structure
See: https://bybit-exchange.github.io/docs/api-explorer/v5/market/tickers
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch greeks for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.fetchGreeks (symbol[, params])fetches all option contracts greeks, financial metrics used to measure the factors that affect the price of an options contract
Kind: instance method of bybit
Returns: object - a greeks structure
See: https://bybit-exchange.github.io/docs/api-explorer/v5/market/tickers
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
No | unified symbols of the markets to fetch greeks for, all markets are returned if not assigned |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.baseCoin | string |
No | the baseCoin of the symbol, default is BTC |
bybit.fetchAllGreeks ([symbols, params])retrieves the users liquidated positions
Kind: instance method of bybit
Returns: object - an array of liquidation structures
See: https://bybit-exchange.github.io/docs/api-explorer/v5/position/execution
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
No | unified CCXT market symbol |
| since | int |
No | the earliest time in ms to fetch liquidations for |
| limit | int |
No | the maximum number of liquidation structures to retrieve |
| params | object |
No | exchange specific parameters for the exchange API endpoint |
| params.type | string |
No | market type, ['swap', 'option', 'spot'] |
| params.subType | string |
No | market subType, ['linear', 'inverse'] |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters |
bybit.fetchMyLiquidations ([symbol, since, limit, params])retrieve information on the maximum leverage, for different trade sizes
Kind: instance method of bybit
Returns: object - a dictionary of leverage tiers structures, indexed by market symbols
See: https://bybit-exchange.github.io/docs/v5/market/risk-limit
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
No | a list of unified market symbols |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.subType | string |
No | market subType, ['linear', 'inverse'], default is 'linear' |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters |
bybit.fetchLeverageTiers ([symbols, params])fetch the history of funding payments paid and received on this account
Kind: instance method of bybit
Returns: object - a funding history structure
See: https://bybit-exchange.github.io/docs/api-explorer/v5/position/execution
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
No | unified market symbol |
| since | int |
No | the earliest time in ms to fetch funding history for |
| limit | int |
No | the maximum number of funding history structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.paginate | boolean |
No | default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters |
bybit.fetchFundingHistory ([symbol, since, limit, params])fetches option data that is commonly found in an option chain
Kind: instance method of bybit
Returns: object - an option chain structure
See: https://bybit-exchange.github.io/docs/v5/market/tickers
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.fetchOption (symbol[, params])fetches data for an underlying asset that is commonly found in an option chain
Kind: instance method of bybit
Returns: object - a list of option chain structures
See: https://bybit-exchange.github.io/docs/v5/market/tickers
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
Yes | base currency to fetch an option chain for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.fetchOptionChain (code[, params])fetches historical positions
Kind: instance method of bybit
Returns: Array<object> - a list of position structures
See: https://bybit-exchange.github.io/docs/v5/position/close-pnl
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
Yes | a list of unified market symbols |
| since | int |
No | timestamp in ms of the earliest position to fetch, params["until"] - since <= 7 days |
| limit | int |
No | the maximum amount of records to fetch, default=50, max=100 |
| params | object |
Yes | extra parameters specific to the exchange api endpoint |
| params.until | int |
No | timestamp in ms of the latest position to fetch, params["until"] - since <= 7 days |
| params.subType | string |
No | 'linear' or 'inverse' |
bybit.fetchPositionsHistory (symbols[, since, limit, params])fetches all available currencies that can be converted
Kind: instance method of bybit
Returns: object - an associative dictionary of currencies
See: https://bybit-exchange.github.io/docs/v5/asset/convert/convert-coin-list
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.accountType | string |
No | eb_convert_uta, eb_convert_spot, eb_convert_funding, eb_convert_inverse, or eb_convert_contract |
bybit.fetchConvertCurrencies ([params])fetch a quote for converting from one currency to another
Kind: instance method of bybit
Returns: object - a conversion structure
See: https://bybit-exchange.github.io/docs/v5/asset/convert/apply-quote
| Param | Type | Required | Description |
|---|---|---|---|
| fromCode | string |
Yes | the currency that you want to sell and convert from |
| toCode | string |
Yes | the currency that you want to buy and convert into |
| amount | float |
No | how much you want to trade in units of the from currency |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.accountType | string |
No | eb_convert_uta, eb_convert_spot, eb_convert_funding, eb_convert_inverse, or eb_convert_contract |
bybit.fetchConvertQuote (fromCode, toCode[, amount, params])convert from one currency to another
Kind: instance method of bybit
Returns: object - a conversion structure
See: https://bybit-exchange.github.io/docs/v5/asset/convert/confirm-quote
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | the id of the trade that you want to make |
| fromCode | string |
Yes | the currency that you want to sell and convert from |
| toCode | string |
Yes | the currency that you want to buy and convert into |
| amount | float |
Yes | how much you want to trade in units of the from currency |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.createConvertTrade (id, fromCode, toCode, amount[, params])fetch the data for a conversion trade
Kind: instance method of bybit
Returns: object - a conversion structure
See: https://bybit-exchange.github.io/docs/v5/asset/convert/get-convert-result
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | the id of the trade that you want to fetch |
| code | string |
No | the unified currency code of the conversion trade |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.accountType | string |
No | eb_convert_uta, eb_convert_spot, eb_convert_funding, eb_convert_inverse, or eb_convert_contract |
bybit.fetchConvertTrade (id[, code, params])fetch the users history of conversion trades
Kind: instance method of bybit
Returns: Array<object> - a list of conversion structures
See: https://bybit-exchange.github.io/docs/v5/asset/convert/get-convert-history
| Param | Type | Required | Description |
|---|---|---|---|
| code | string |
No | the unified currency code |
| since | int |
No | the earliest time in ms to fetch conversions for |
| limit | int |
No | the maximum number of conversion structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.accountType | string |
No | eb_convert_uta, eb_convert_spot, eb_convert_funding, eb_convert_inverse, or eb_convert_contract |
bybit.fetchConvertTradeHistory ([code, since, limit, params])fetches the long short ratio history for a unified market symbol
Kind: instance method of bybit
Returns: Array<object> - an array of long short ratio structures
See: https://bybit-exchange.github.io/docs/v5/market/long-short-ratio
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the long short ratio for |
| timeframe | string |
No | the period for the ratio, default is 24 hours |
| since | int |
No | the earliest time in ms to fetch ratios for |
| limit | int |
No | the maximum number of long short ratio structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.fetchLongShortRatioHistory (symbol[, timeframe, since, limit, params])fetches the auto deleveraging rank and risk percentage for a list of symbols
Kind: instance method of bybit
Returns: Array<object> - an array of auto de leverage structures
See: https://bybit-exchange.github.io/docs/v5/position#response-parameters
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
No | list of unified market symbols |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.fetchPositionsADLRank ([symbols, params])fetches the margin mode of the trading pair
Kind: instance method of bybit
Returns: object - a margin mode structure
See: https://bybit-exchange.github.io/docs/v5/account/account-info
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
No | unified symbol of the market to fetch the margin mode for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.fetchMarginMode ([symbol, params])create a trade order
Kind: instance method of bybit
Returns: object - an order structure
See
- https://bybit-exchange.github.io/docs/v5/order/create-order
- https://bybit-exchange.github.io/docs/v5/websocket/trade/guideline#createamendcancel-order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to create an order in |
| type | string |
Yes | 'market' or 'limit' |
| side | string |
Yes | 'buy' or 'sell' |
| amount | float |
Yes | how much of currency you want to trade in units of base currency |
| price | float |
No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.timeInForce | string |
No | "GTC", "IOC", "FOK" |
| params.postOnly | bool |
No | true or false whether the order is post-only |
| params.reduceOnly | bool |
No | true or false whether the order is reduce-only |
| params.positionIdx | string |
No | contracts only 0 for one-way mode, 1 buy side of hedged mode, 2 sell side of hedged mode |
| params.isLeverage | boolean |
No | unified spot only false then spot trading true then margin trading |
| params.tpslMode | string |
No | contract only 'full' or 'partial' |
| params.mmp | string |
No | option only market maker protection |
| params.triggerDirection | string |
No | contract only the direction for trigger orders, 'above' or 'below' |
| params.triggerPrice | float |
No | The price at which a trigger order is triggered at |
| params.stopLossPrice | float |
No | The price at which a stop loss order is triggered at |
| params.takeProfitPrice | float |
No | The price at which a take profit order is triggered at |
| params.takeProfit | object |
No | takeProfit object in params containing the triggerPrice at which the attached take profit order will be triggered |
| params.takeProfit.triggerPrice | float |
No | take profit trigger price |
| params.stopLoss | object |
No | stopLoss object in params containing the triggerPrice at which the attached stop loss order will be triggered |
| params.stopLoss.triggerPrice | float |
No | stop loss trigger price |
| params.trailingAmount | string |
No | the quote amount to trail away from the current market price |
| params.trailingTriggerPrice | string |
No | the price to trigger a trailing order, default uses the price argument |
bybit.createOrderWs (symbol, type, side, amount[, price, params])edit a trade order
Kind: instance method of bybit
Returns: object - an order structure
See
- https://bybit-exchange.github.io/docs/v5/order/amend-order
- https://bybit-exchange.github.io/docs/v5/websocket/trade/guideline#createamendcancel-order
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | cancel order id |
| symbol | string |
Yes | unified symbol of the market to create an order in |
| type | string |
Yes | 'market' or 'limit' |
| side | string |
Yes | 'buy' or 'sell' |
| amount | float |
Yes | how much of currency you want to trade in units of base currency |
| price | float |
Yes | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.triggerPrice | float |
No | The price that a trigger order is triggered at |
| params.stopLossPrice | float |
No | The price that a stop loss order is triggered at |
| params.takeProfitPrice | float |
No | The price that a take profit order is triggered at |
| params.takeProfit | object |
No | takeProfit object in params containing the triggerPrice that the attached take profit order will be triggered |
| params.takeProfit.triggerPrice | float |
No | take profit trigger price |
| params.stopLoss | object |
No | stopLoss object in params containing the triggerPrice that the attached stop loss order will be triggered |
| params.stopLoss.triggerPrice | float |
No | stop loss trigger price |
| params.triggerBy | string |
No | 'IndexPrice', 'MarkPrice' or 'LastPrice', default is 'LastPrice', required if no initial value for triggerPrice |
| params.slTriggerBy | string |
No | 'IndexPrice', 'MarkPrice' or 'LastPrice', default is 'LastPrice', required if no initial value for stopLoss |
| params.tpTriggerby | string |
No | 'IndexPrice', 'MarkPrice' or 'LastPrice', default is 'LastPrice', required if no initial value for takeProfit |
bybit.editOrderWs (id, symbol, type, side, amount, price[, params])cancels an open order
Kind: instance method of bybit
Returns: object - An order structure
See
- https://bybit-exchange.github.io/docs/v5/order/cancel-order
- https://bybit-exchange.github.io/docs/v5/websocket/trade/guideline#createamendcancel-order
| Param | Type | Required | Description |
|---|---|---|---|
| id | string |
Yes | order id |
| symbol | string |
Yes | unified symbol of the market the order was made in |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.trigger | boolean |
No | spot only whether the order is a trigger order |
| params.orderFilter | string |
No | spot only 'Order' or 'StopOrder' or 'tpslOrder' |
bybit.cancelOrderWs (id, symbol[, params])watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
Kind: instance method of bybit
Returns: object - a ticker structure
See
- https://bybit-exchange.github.io/docs/v5/websocket/public/ticker
- https://bybit-exchange.github.io/docs/v5/websocket/public/etp-ticker
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the ticker for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.watchTicker (symbol[, params])watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
Kind: instance method of bybit
Returns: object - a ticker structure
See
- https://bybit-exchange.github.io/docs/v5/websocket/public/ticker
- https://bybit-exchange.github.io/docs/v5/websocket/public/etp-ticker
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
Yes | unified symbol of the market to fetch the ticker for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.watchTickers (symbols[, params])unWatches a price ticker
Kind: instance method of bybit
Returns: object - a ticker structure
See
- https://bybit-exchange.github.io/docs/v5/websocket/public/ticker
- https://bybit-exchange.github.io/docs/v5/websocket/public/etp-ticker
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
Yes | unified symbol of the market to fetch the ticker for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.unWatchTickers (symbols[, params])unWatches a price ticker
Kind: instance method of bybit
Returns: object - a ticker structure
See
- https://bybit-exchange.github.io/docs/v5/websocket/public/ticker
- https://bybit-exchange.github.io/docs/v5/websocket/public/etp-ticker
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | Array<string> |
Yes | unified symbol of the market to fetch the ticker for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.unWatchTicker (symbol[, params])watches best bid & ask for symbols
Kind: instance method of bybit
Returns: object - a ticker structure
See: https://bybit-exchange.github.io/docs/v5/websocket/public/orderbook
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
Yes | unified symbol of the market to fetch the ticker for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.watchBidsAsks (symbols[, params])watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of bybit
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
See
- https://bybit-exchange.github.io/docs/v5/websocket/public/kline
- https://bybit-exchange.github.io/docs/v5/websocket/public/etp-kline
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | string |
Yes | the length of time each candle represents |
| since | int |
No | timestamp in ms of the earliest candle to fetch |
| limit | int |
No | the maximum amount of candles to fetch |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.watchOHLCV (symbol, timeframe[, since, limit, params])watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of bybit
Returns: object - A list of candles ordered as timestamp, open, high, low, close, volume
See
- https://bybit-exchange.github.io/docs/v5/websocket/public/kline
- https://bybit-exchange.github.io/docs/v5/websocket/public/etp-kline
| Param | Type | Required | Description |
|---|---|---|---|
| symbolsAndTimeframes | Array<Array<string>> |
Yes | array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example 'BTC/USDT', '1m'], ['LTC/USDT', '5m' |
| since | int |
No | timestamp in ms of the earliest candle to fetch |
| limit | int |
No | the maximum amount of candles to fetch |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.watchOHLCVForSymbols (symbolsAndTimeframes[, since, limit, params])unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of bybit
Returns: object - A list of candles ordered as timestamp, open, high, low, close, volume
See
- https://bybit-exchange.github.io/docs/v5/websocket/public/kline
- https://bybit-exchange.github.io/docs/v5/websocket/public/etp-kline
| Param | Type | Required | Description |
|---|---|---|---|
| symbolsAndTimeframes | Array<Array<string>> |
Yes | array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example 'BTC/USDT', '1m'], ['LTC/USDT', '5m' |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.unWatchOHLCVForSymbols (symbolsAndTimeframes[, params])unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of bybit
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
See
- https://bybit-exchange.github.io/docs/v5/websocket/public/kline
- https://bybit-exchange.github.io/docs/v5/websocket/public/etp-kline
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | string |
Yes | the length of time each candle represents |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.unWatchOHLCV (symbol, timeframe[, params])watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of bybit
Returns: object - A dictionary of order book structures indexed by market symbols
See: https://bybit-exchange.github.io/docs/v5/websocket/public/orderbook
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to fetch the order book for |
| limit | int |
No | the maximum amount of order book entries to return. |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.watchOrderBook (symbol[, limit, params])watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of bybit
Returns: object - A dictionary of order book structures indexed by market symbols
See: https://bybit-exchange.github.io/docs/v5/websocket/public/orderbook
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
Yes | unified array of symbols |
| limit | int |
No | the maximum amount of order book entries to return. |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.watchOrderBookForSymbols (symbols[, limit, params])unsubscribe from the orderbook channel
Kind: instance method of bybit
Returns: object - A dictionary of order book structures indexed by market symbols
See: https://bybit-exchange.github.io/docs/v5/websocket/public/orderbook
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
Yes | unified symbol of the market to unwatch the trades for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.limit | int |
No | orderbook limit, default is undefined |
bybit.unWatchOrderBookForSymbols (symbols[, params])unsubscribe from the orderbook channel
Kind: instance method of bybit
Returns: object - A dictionary of order book structures indexed by market symbols
See: https://bybit-exchange.github.io/docs/v5/websocket/public/orderbook
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | symbol of the market to unwatch the trades for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.limit | int |
No | orderbook limit, default is undefined |
bybit.unWatchOrderBook (symbol[, params])watches information on multiple trades made in a market
Kind: instance method of bybit
Returns: Array<object> - a list of trade structures
See: https://bybit-exchange.github.io/docs/v5/websocket/public/trade
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the market trades were made in |
| since | int |
No | the earliest time in ms to fetch trades for |
| limit | int |
No | the maximum number of trade structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.watchTrades (symbol[, since, limit, params])get the list of most recent trades for a list of symbols
Kind: instance method of bybit
Returns: Array<object> - a list of trade structures
See: https://bybit-exchange.github.io/docs/v5/websocket/public/trade
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
Yes | unified symbol of the market to fetch trades for |
| since | int |
No | timestamp in ms of the earliest trade to fetch |
| limit | int |
No | the maximum amount of trades to fetch |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.watchTradesForSymbols (symbols[, since, limit, params])unsubscribe from the trades channel
Kind: instance method of bybit
Returns: any - status of the unwatch request
See: https://bybit-exchange.github.io/docs/v5/websocket/public/trade
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
Yes | unified symbol of the market to unwatch the trades for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.unWatchTradesForSymbols (symbols[, params])unsubscribe from the trades channel
Kind: instance method of bybit
Returns: any - status of the unwatch request
See: https://bybit-exchange.github.io/docs/v5/websocket/public/trade
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified symbol of the market to unwatch the trades for |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.unWatchTrades (symbol[, params])watches information on multiple trades made by the user
Kind: instance method of bybit
Returns: Array<object> - a list of order structures
See
- https://bybit-exchange.github.io/docs/v5/websocket/private/execution
- https://bybit-exchange.github.io/docs/v5/websocket/private/fast-execution
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the market orders were made in |
| since | int |
No | the earliest time in ms to fetch orders for |
| limit | int |
No | the maximum number of order structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.unifiedMargin | boolean |
No | use unified margin account |
| params.executionFast | boolean |
No | use fast execution |
bybit.watchMyTrades (symbol[, since, limit, params])unWatches information on multiple trades made by the user
Kind: instance method of bybit
Returns: Array<object> - a list of order structures
See
- https://bybit-exchange.github.io/docs/v5/websocket/private/execution
- https://bybit-exchange.github.io/docs/v5/websocket/private/fast-execution
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the market orders were made in |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.unifiedMargin | boolean |
No | use unified margin account |
| params.executionFast | boolean |
No | use fast execution |
bybit.unWatchMyTrades (symbol[, params])watch all open positions
Kind: instance method of bybit
Returns: Array<object> - a list of position structure
See: https://bybit-exchange.github.io/docs/v5/websocket/private/position
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
No | list of unified market symbols |
| since | int |
No | the earliest time in ms to fetch positions for |
| limit | int |
No | the maximum number of positions to retrieve |
| params | object |
Yes | extra parameters specific to the exchange API endpoint |
bybit.watchPositions ([symbols, since, limit, params])unWatches all open positions
Kind: instance method of bybit
Returns: object - status of the unwatch request
See: https://bybit-exchange.github.io/docs/v5/websocket/private/position
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> |
No | list of unified market symbols |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.unWatchPositions ([symbols, params])watch the public liquidations of a trading pair
Kind: instance method of bybit
Returns: object - an array of liquidation structures
See: https://bybit-exchange.github.io/docs/v5/websocket/public/all-liquidation
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified CCXT market symbol |
| since | int |
No | the earliest time in ms to fetch liquidations for |
| limit | int |
No | the maximum number of liquidation structures to retrieve |
| params | object |
No | exchange specific parameters for the bitmex api endpoint |
| params.method | string |
No | exchange specific method, supported: liquidation, allLiquidation |
bybit.watchLiquidations (symbol[, since, limit, params])watches information on multiple orders made by the user
Kind: instance method of bybit
Returns: Array<object> - a list of order structures
See: https://bybit-exchange.github.io/docs/v5/websocket/private/order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the market orders were made in |
| since | int |
No | the earliest time in ms to fetch orders for |
| limit | int |
No | the maximum number of order structures to retrieve |
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.watchOrders (symbol[, since, limit, params])unWatches information on multiple orders made by the user
Kind: instance method of bybit
Returns: Array<object> - a list of order structures
See: https://bybit-exchange.github.io/docs/v5/websocket/private/order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string |
Yes | unified market symbol of the market orders were made in |
| params | object |
No | extra parameters specific to the exchange API endpoint |
| params.unifiedMargin | boolean |
No | use unified margin account |
bybit.unWatchOrders (symbol[, params])watch balance and get the amount of funds available for trading or funds locked in orders
Kind: instance method of bybit
Returns: object - a balance structure
See: https://bybit-exchange.github.io/docs/v5/websocket/private/wallet
| Param | Type | Required | Description |
|---|---|---|---|
| params | object |
No | extra parameters specific to the exchange API endpoint |
bybit.watchBalance ([params])(If the page is not being rendered for you, you can refer to the mirror at https://docs.ccxt.com/)
- Install
- Examples
- Manual
- CCXT Pro
- Contributing
- Supported Exchanges
- Exchanges By Country
- API Spec By Method
- FAQ
- Changelog
- Awesome
- API Spec by Exchange
- fetchCurrencies
- alpaca
- apex
- arkham
- ascendex
- aster
- backpack
- bigone
- binance
- bingx
- bit2c
- bitbank
- bitbns
- bitfinex
- bitflyer
- bitget
- bithumb
- bitmart
- bitmex
- bitopro
- bitrue
- bitso
- bitstamp
- bitteam
- bittrade
- bitvavo
- blockchaincom
- blofin
- btcbox
- btcmarkets
- btcturk
- bullish
- bybit
- bydfi
- cex
- coinbase
- coinbaseexchange
- coinbaseinternational
- coincheck
- coinex
- coinmate
- coinmetro
- coinone
- coinsph
- coinspot
- cryptocom
- cryptomus
- deepcoin
- delta
- deribit
- derive
- digifinex
- dydx
- exmo
- foxbit
- gate
- gemini
- grvt
- hashkey
- hibachi
- hitbtc
- hollaex
- htx
- hyperliquid
- independentreserve
- indodax
- kraken
- krakenfutures
- kucoin
- fetchBidsAsks
- latoken
- lbank
- lighter
- luno
- mercado
- mexc
- modetrade
- ndax
- novadax
- okx
- onetrading
- oxfun
- p2b
- pacifica
- paradex
- paymium
- phemex
- poloniex
- tokocrypto
- toobit
- upbit
- wavesexchange
- weex
- whitebit
- woo
- woofipro
- xt
- yobit
- zaif
- fetchStatus