CCXT
btse

btse

btse cryptocurrency exchange — CCXT unified API: methods, parameters and endpoints.

🔌 Looking for raw exchange endpoints? See the btse implicit API — every endpoint in this exchange's API exposed as an implicit method.

btse

Kind: global class
Extends: Exchange

fetchTime

fetches the current integer timestamp in milliseconds from the exchange server

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

See: https://btsecom.github.io/docs/spotV3_3/en/#query-server-time

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
btse.fetchTime (params?)

fetchMarkets

retrieves data on all markets for btse

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

See: https://docs.btse.com/markets/rest/get-markets/

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
btse.fetchMarkets (params?)

fetchOHLCV

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

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

See: https://docs.btse.com/markets/rest/get-klines/

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch OHLCV data for
timeframestringYesthe length of time each candle represents
sinceintNotimestamp in ms of the earliest candle to fetch
limitintNothe maximum amount of candles to fetch (default and max 300)
paramsobjectNoextra parameters specific to the bitteam api endpoint
params.untilintNotimestamp in ms of the latest candle to fetch
params.paginatebooleanNodefault false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the available parameters
btse.fetchOHLCV (symbol, timeframe, since?, limit?, params?)

fetchOrderBook

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

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

See: https://docs.btse.com/markets/rest/get-orderbook/

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
limitintNothe maximum amount of order book entries to return
paramsobjectNoextra parameters specific to the exchange API endpoint
btse.fetchOrderBook (symbol, limit?, params?)

fetchFundingRateHistory

fetches historical funding rate prices

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

See: https://docs.btse.com/markets/rest/get-funding-rate-history/

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the funding rate history for
sinceintNotimestamp in ms of the earliest funding rate to fetch, used to select the requested period and then applied client-side
limitintNothe maximum amount of entries to fetch, applied client-side
paramsobjectNoextra parameters specific to the exchange API endpoint
params.periodstringNothe funding rate history period, one of '7D', '2W' or '1M', selected from since by default
params.untilintNotimestamp in ms of the latest funding rate to fetch, applied client-side
btse.fetchFundingRateHistory (symbol, since?, limit?, params?)

fetchBalance

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

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

See

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNowallet type, spot or swap, default is spot
params.walletstringNofutures wallet name, CROSS@ by default, or ISOLATED@ followed by the market id with -USDT appended
btse.fetchBalance (params?)

fetchLeverageTiers

retrieve information on the maximum leverage, for different trade sizes

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

See: https://docs.btse.com/markets/rest/get-market-risk-limits/

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYesa list of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
btse.fetchLeverageTiers (symbols, params?)

fetchMarketLeverageTiers

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

Kind: instance method of btse
Returns: object - a leverage tiers structure

See: https://docs.btse.com/markets/rest/get-market-risk-limits/

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
btse.fetchMarketLeverageTiers (symbol, params?)

fetchTickers

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

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

See: https://docs.btse.com/markets/rest/get-24-hr-ticker/

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYesunified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
paramsobjectNoextra parameters specific to the exchange API endpoint
btse.fetchTickers (symbols, params?)

fetchTicker

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

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

See: https://docs.btse.com/markets/rest/get-24-hr-ticker/

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
btse.fetchTicker (symbol, params?)

fetchOpenInterest

Retrieves the open interest of a derivative trading pair

Kind: instance method of btse
Returns: object - an open interest structure/docs/manual#interest-history-structure

See: https://docs.btse.com/markets/rest/get-24-hr-ticker/

ParamTypeRequiredDescription
symbolstringYesUnified CCXT market symbol
paramsobjectNoexchange specific parameters
btse.fetchOpenInterest (symbol, params?)

fetchOpenInterests

Retrieves the open interest for a list of symbols

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

See: https://docs.btse.com/markets/rest/get-24-hr-ticker/

ParamTypeRequiredDescription
symbolsArray<string>Noa list of unified CCXT market symbols
paramsobjectNoexchange specific parameters
btse.fetchOpenInterests (symbols?, params?)

fetchFundingRate

fetch the current funding rate

Kind: instance method of btse
Returns: object - a funding rate structure

See: https://docs.btse.com/markets/rest/get-24-hr-ticker/

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
btse.fetchFundingRate (symbol, params?)

fetchFundingRates

fetch the funding rate for multiple markets

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

See: https://docs.btse.com/markets/rest/get-24-hr-ticker/

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYeslist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
btse.fetchFundingRates (symbols, params?)

fetchTrades

get the list of most recent trades for a particular symbol

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

See: https://docs.btse.com/markets/rest/get-trades/

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch trades for
sinceintNotimestamp in ms of the earliest trade to fetch, applied client-side to the most recent trades window
limitintNothe maximum amount of trades to fetch (max 500)
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNotimestamp in ms of the latest entry to fetch, applied client-side to the most recent trades window
btse.fetchTrades (symbol, since?, limit?, params?)

fetchMyTrades

fetch all trades made by the user

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

See

ParamTypeRequiredDescription
symbolstringNounified market symbol
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trades structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNotimestamp in ms for the ending date filter, default is undefined
params.typestringNo'spot' or 'swap' or 'future', default is 'spot'
btse.fetchMyTrades (symbol?, since?, limit?, params?)

fetchOrderTrades

fetch all the trades made from a single order

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

See

ParamTypeRequiredDescription
idstringYesorder id
symbolstringNounified market symbol
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trades to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.clientOrderIdstringNoclient order id, could be used instead of the order id
params.typestringNo'spot' or 'swap' or 'future', default is 'spot'
btse.fetchOrderTrades (id, symbol?, since?, limit?, params?)

createOrder

create a trade order

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit'
sidestringYes'buy' or 'sell'
amountfloatYeshow much of currency you want to trade in units of base currency
pricefloatNothe price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.clientOrderIdstringNoa unique id for the order
params.postOnlyboolNoif true, the order will only be posted to the order book and not executed immediately (default is false)
params.timeInForcestringNo'GTC', 'IOC', 'FOK', 'PO', 'HALFMIN', 'FIVEMIN', 'HOUR', 'TWELVEHOUR', 'DAY', 'WEEK' or 'MONTH'
params.triggerPricefloatNothe price that a trigger order is triggered at (same as takeProfitPrice)
params.stopLossPricefloatNothe price that a stop loss order is triggered at
params.takeProfitPricefloatNothe price that a take profit order is triggered at
params.triggerPriceTypestringNo'INDEX_PRICE' or 'LAST_PRICE', default is 'LAST_PRICE'
params.trailingAmountfloatNothe quote amount to trail away from the current market price
params.deviationfloatNoPEG orders only How much should the order price deviate from index price. Value is in percentage and can range from -10 to 10
params.stealthfloatNoPEG orders only How many percent of the order is to be displayed on the orderbook
params.stopPricefloatNoNB - It is NOT stopLossPrice or triggerPrice!!! OCO orders only Mandatory when creating an OCO order. Indicates the stop price
params.hedgedboolNocontract markets only true for hedged mode, false for one way mode, default is false
params.marginModestringNocontract markets only 'cross' or 'isolated' (default is 'cross') - the exchange does not have cross/isolated margin modes but instead has 'ONE_WAY', 'HEDGE' and 'ISOLATED' position modes, so this param will be converted to the appropriate position mode
params.positionModestringNocontract markets only 'ONE_WAY (default) or 'HEDGE or 'ISOLATED' (if not provided, it will be derived from marginMode and hedged params)
params.takeProfitobjectNocontract markets only takeProfit object in params containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only)
params.takeProfit.triggerPricefloatNocontract markets only take profit trigger price
params.takeProfit.priceTypestringNocontract markets only 'markPrice' or 'lastPrice', default is 'markPrice'
params.stopLossobjectNocontract markets only stopLoss object in params containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only)
params.stopLoss.triggerPricefloatNocontract markets only stop loss trigger price
params.stopLoss.priceTypestringNocontract markets only 'markPrice' or 'lastPrice', default is 'markPrice'
btse.createOrder (symbol, type, side, amount, price?, params?)

createSpotOrder

create a trade order on spot market

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
typestringYes'market', 'limit', 'OCO', 'PEG', 'TWAP' or 'TRAILING'
sidestringYes'buy' or 'sell'
amountfloatYeshow much of you want to trade in units of the base currency
pricefloatNothe price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.clientOrderIdstringNoa unique id for the order
params.postOnlyboolNoif true, the order will only be posted to the order book and not executed immediately, default is false
params.timeInForcestringNo'GTC', 'IOC' or 'FOK'
params.costfloatNomarket buy and trailing buy orders only the quote quantity that can be used as an alternative for the amount
params.triggerPricefloatNothe price that a trigger order is triggered at, same as takeProfitPrice
params.stopLossPricefloatNothe price that a stop loss order is triggered at
params.takeProfitPricefloatNothe price that a take profit order is triggered at
params.triggerPriceTypestringNo'last', 'mark' or 'index', default is 'last'
params.trailingAmountfloatNothe quote amount to trail away from the current market price
params.trailingPercentfloatNothe percent to trail away from the current market price
params.deviationfloatNoPEG orders only how much should the order price deviate from the pegged price, in percent from -10 to 10
params.stealthfloatNoPEG orders only how many percent of the order is to be displayed on the orderbook, from 1 to 100
params.stopPricefloatNoNB - It is NOT stopLossPrice or triggerPrice!!! OCO orders only the limit price of the stop loss leg
btse.createSpotOrder (symbol, type, side, amount, price?, params?)

createContractOrder

create a trade order on contract market

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

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
typestringYes'market', 'limit', 'OCO', 'PEG', 'TWAP' or 'TRAILING'
sidestringYes'buy' or 'sell'
amountfloatYeshow much of you want to trade in units of the base currency
pricefloatNothe price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.clientOrderIdstringNoa unique id for the order
params.postOnlyboolNoif true, the order will only be posted to the order book and not executed immediately, default is false
params.reduceOnlyboolNoif true, the order will only reduce a current position, not increase it, default is false
params.timeInForcestringNo'GTC', 'IOC', 'FOK', 'PO', 'HALFSEC', 'HALFMIN', 'FIVEMIN', 'HOUR', 'TWELVEHOUR', 'DAY', 'WEEK' or 'MONTH'
params.hedgedboolNotrue for hedged mode, false for one way mode, default is false
params.marginModestringNo'cross' or 'isolated', default is 'cross' - the exchange does not have cross/isolated margin modes but instead has 'ONE_WAY', 'HEDGE' and 'ISOLATED' position modes, so this param will be converted to the appropriate position mode
params.positionModestringNo'ONE_WAY', 'HEDGE' or 'ISOLATED' - if not provided, it will be derived from the marginMode and hedged params
params.triggerPricefloatNothe price that a trigger order is triggered at, same as takeProfitPrice
params.stopLossPricefloatNothe price that a stop loss order is triggered at
params.takeProfitPricefloatNothe price that a take profit order is triggered at
params.triggerPriceTypestringNo'last', 'mark' or 'index', default is 'mark'
params.trailingAmountfloatNothe quote amount to trail away from the current market price
params.trailingPercentfloatNothe percent to trail away from the current market price
params.takeProfitobjectNotakeProfit object in params containing the triggerPrice at which the attached take profit order will be triggered
params.takeProfit.triggerPricefloatNotake profit trigger price
params.takeProfit.priceTypestringNo'last', 'mark' or 'index', default is 'mark'
params.stopLossobjectNostopLoss object in params containing the triggerPrice at which the attached stop loss order will be triggered
params.stopLoss.triggerPricefloatNostop loss trigger price
params.stopLoss.priceTypestringNo'last', 'mark' or 'index', default is 'mark'
params.deviationfloatNoPEG orders only the offset applied to the pegged reference price
params.stealthfloatNoPEG orders only the portion of the order size displayed on the book
params.stopPricefloatNoNB - It is NOT the stopLossPrice!!! OCO orders only the limit price of the stop loss leg
btse.createContractOrder (symbol, type, side, amount, price?, params?)

fetchOpenOrder

fetches information on an open order made by the user

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

See

ParamTypeRequiredDescription
idstringYesthe order id
symbolstringNounified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.clientOrderIdstringNoa unique id for the order
params.typestringNo'spot', 'swap' or 'future', default is 'spot'
params.includeCancelledboolNocontract markets only if true, cancelled orders are included in the lookup
btse.fetchOpenOrder (id, symbol?, params?)

editOrder

edit a trade order

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

See

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit' (not used by btse)
sidestringYes'buy' or 'sell' (not used by btse)
amountfloatNohow much of currency you want to trade in units of base currency
pricefloatNothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.clientOrderIdstringNoa unique id for the order, required if id is not provided
params.triggerPricefloatNothe price that a trigger order is triggered at
params.totalAmountModeboolNoif true, the amount is treated as the new total order quantity including the already filled portion, default is false
params.slideboolNocontract markets only if true and only the price is amended, the price slides to the best available price
btse.editOrder (id, symbol, type, side, amount?, price?, params?)

cancelOrder

cancels an open order

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

See

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.clientOrderIdstringNoa unique id for the order, required if id is not provided
btse.cancelOrder (id, symbol, params?)

cancelAllOrders

cancel all open orders in a market

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

See

ParamTypeRequiredDescription
symbolstringNounified market symbol of the market to cancel orders in, on spot markets omit it to cancel every open order across all pairs
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNo'spot', 'swap' or 'future', default is 'spot', used when the symbol is omitted
btse.cancelAllOrders (symbol?, params?)

cancelAllOrdersAfter

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

Kind: instance method of btse
Returns: object - the api result

See

ParamTypeRequiredDescription
timeoutnumberYestime in milliseconds, 0 represents cancel the timer
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNo'spot', 'swap' or 'future', default is 'spot'
btse.cancelAllOrdersAfter (timeout, params?)

fetchOpenOrders

fetch all unfilled currently open orders

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

See

ParamTypeRequiredDescription
symbolstringNounified market symbol
sinceintNothe earliest time in ms to fetch open orders for, filtered client-side
limitintNothe maximum number of open orders structures to retrieve, filtered client-side
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNo'spot', 'swap' or 'future', default is 'spot'
btse.fetchOpenOrders (symbol?, since?, limit?, params?)

fetchTradingFees

fetch the trading fees for multiple markets

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

See

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.typestringNo'spot', 'swap' or 'future' (default is 'spot')
btse.fetchTradingFees (params?)

fetchDepositsWithdrawals

fetch history of deposits and withdrawals

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

See: https://docs.btse.com/wallet/rest/get-user-wallet-history

ParamTypeRequiredDescription
codestringNounified currency code, required for the default spot wallet
sinceintNothe earliest time in ms to fetch transactions for
limitintNothe maximum number of transaction structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch transactions for, excluded
params.walletTypestringNowallet to query, SPOT by default, ISOLATED requires params.walletName
btse.fetchDepositsWithdrawals (code?, since?, limit?, params?)

fetchDeposits

fetch all deposits made to an account

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

See: https://docs.btse.com/wallet/rest/get-user-wallet-history

ParamTypeRequiredDescription
codestringNounified currency code, required for the default spot wallet
sinceintNothe earliest time in ms to fetch deposits for
limitintNothe maximum number of transaction structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch deposits for, excluded
params.walletTypestringNowallet to query, SPOT by default, ISOLATED requires params.walletName
btse.fetchDeposits (code?, since?, limit?, params?)

fetchWithdrawals

fetch all withdrawals made from an account

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

See: https://docs.btse.com/wallet/rest/get-user-wallet-history

ParamTypeRequiredDescription
codestringNounified currency code, required for the default spot wallet
sinceintNothe earliest time in ms to fetch withdrawals for
limitintNothe maximum number of transaction structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch withdrawals for, excluded
params.walletTypestringNowallet to query, SPOT by default, ISOLATED requires params.walletName
btse.fetchWithdrawals (code?, since?, limit?, params?)

fetchLedger

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

Kind: instance method of btse
Returns: Array<object> - a list of ledger structures

See: https://docs.btse.com/wallet/rest/get-user-wallet-history

ParamTypeRequiredDescription
codestringNounified currency code
sinceintNothe earliest time in ms to fetch ledger entries for
limitintNothe maximum number of ledger entry structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch ledger entries for, excluded
params.walletTypestringNowallet to query, SPOT by default, ISOLATED requires params.walletName
btse.fetchLedger (code?, since?, limit?, params?)

fetchTradingFee

fetch the trading fees for a market

Kind: instance method of btse
Returns: object - a fee structure

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
btse.fetchTradingFee (symbol, params?)

fetchPositions

fetch all open positions

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

See: https://docs.btse.com/futures/rest/get-positions/

ParamTypeRequiredDescription
symbolsArray<string>Nolist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
btse.fetchPositions (symbols?, params?)

fetchPositionsForSymbol

fetch all open positions for specific symbol

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

See: https://docs.btse.com/futures/rest/get-positions/

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
btse.fetchPositionsForSymbol (symbol, params?)

fetchPositionMode

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

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

See: https://docs.btse.com/futures/rest/get-position-mode

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch entry for
paramsobjectNoextra parameters specific to the exchange API endpoint
btse.fetchPositionMode (symbol, params?)

setPositionMode

NB!!! This method also sets margin mode to cross on btse. Set hedged to true or false for a cross-margin market.

Kind: instance method of btse
Returns: object - response from the exchange

See: https://docs.btse.com/futures/rest/change-position-mode

ParamTypeRequiredDescription
hedgedboolYesset to true to use dualSidePosition
symbolstringYesunified symbol of the market to set position mode for
paramsobjectNoextra parameters specific to the exchange API endpoint
btse.setPositionMode (hedged, symbol, params?)

fetchMarginMode

fetches the margin mode of a specific symbol

Kind: instance method of btse
Returns: object - a margin mode structure

See: https://docs.btse.com/futures/rest/get-leverage

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
btse.fetchMarginMode (symbol, params?)

setMarginMode

set margin mode to 'cross' or 'isolated'

Kind: instance method of btse
Returns: object - response from the exchange

See: https://docs.btse.com/futures/rest/change-position-mode

ParamTypeRequiredDescription
marginModestringYes'cross' or 'isolated'
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.hedgedboolNoset to true to use dualSidePosition, required for setting marginMode to cross on btse
btse.setMarginMode (marginMode, symbol, params?)

closePosition

closes an open position for a market

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

See: https://docs.btse.com/futures/rest/close-position/

ParamTypeRequiredDescription
symbolstringYesunified CCXT market symbol
sidestringNonot used by btse
paramsobjectNoextra parameters specific to the exchange API endpoint
params.positionIdstringNothe id of the position to close, mandatory
params.typestringNo'limit' or 'market' (default is 'market')
params.pricefloatNorequired if params.type is 'limit'
params.postOnlyboolNotrue if the order should be post only
btse.closePosition (symbol, side?, params?)

fetchLeverage

fetch the leverage for a market

Kind: instance method of btse
Returns: object - a leverage structure

See: https://docs.btse.com/futures/rest/get-leverage

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
btse.fetchLeverage (symbol, params?)

setLeverage

set the level of leverage for a market

Kind: instance method of btse
Returns: object - response from the exchange

See: https://docs.btse.com/futures/rest/change-leverage

ParamTypeRequiredDescription
leveragefloatYesthe rate of leverage
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.positionModestringNoONE_WAY or HEDGE, defaults to ONE_WAY on the exchange side when omitted
params.positionDirectionstringNoLONG or SHORT, identifies the side to update in hedge mode
params.positionIdstringNoexisting position id to update, disambiguates the target position in hedge mode
btse.setLeverage (leverage, symbol, params?)

On this page