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
- fetchMarkets
- fetchOHLCV
- fetchOrderBook
- fetchFundingRateHistory
- fetchBalance
- fetchLeverageTiers
- fetchMarketLeverageTiers
- fetchTickers
- fetchTicker
- fetchOpenInterest
- fetchOpenInterests
- fetchFundingRate
- fetchFundingRates
- fetchTrades
- fetchMyTrades
- fetchOrderTrades
- createOrder
- createSpotOrder
- createContractOrder
- fetchOpenOrder
- editOrder
- cancelOrder
- cancelAllOrders
- cancelAllOrdersAfter
- fetchOpenOrders
- fetchTradingFees
- fetchDepositsWithdrawals
- fetchDeposits
- fetchWithdrawals
- fetchLedger
- fetchTradingFee
- fetchPositions
- fetchPositionsForSymbol
- fetchPositionMode
- setPositionMode
- fetchMarginMode
- setMarginMode
- closePosition
- fetchLeverage
- setLeverage
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
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra 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/
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra 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/
| 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 (default and max 300) |
| params | object | No | extra parameters specific to the bitteam api endpoint |
| params.until | int | No | timestamp in ms of the latest candle to fetch |
| 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 |
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/
| 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 |
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/
| 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, used to select the requested period and then applied client-side |
| limit | int | No | the maximum amount of entries to fetch, applied client-side |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.period | string | No | the funding rate history period, one of '7D', '2W' or '1M', selected from since by default |
| params.until | int | No | timestamp 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
- https://docs.btse.com/wallet/rest/get-user-assets/
- https://btsecom.github.io/docs/futuresV2_3/en/#query-wallet-balance
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.type | string | No | wallet type, spot or swap, default is spot |
| params.wallet | string | No | futures 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/
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string>, undefined | Yes | a list of unified market symbols |
| params | object | No | extra 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/
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra 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/
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string>, undefined | Yes | unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned |
| params | object | No | extra parameters specific to the exchange API endpoint |
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/
| 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 |
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/
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | Unified CCXT market symbol |
| params | object | No | exchange 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/
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | No | a list of unified CCXT market symbols |
| params | object | No | exchange 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/
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra 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/
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string>, undefined | Yes | list of unified market symbols |
| params | object | No | extra parameters specific to the exchange API endpoint |
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/
| 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, applied client-side to the most recent trades window |
| limit | int | No | the maximum amount of trades to fetch (max 500) |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | timestamp 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
- https://docs.btse.com/spot/rest/get-trade-history/
- https://docs.btse.com/futures/rest/get-trade-history/
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | 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.until | int | No | timestamp in ms for the ending date filter, default is undefined |
| params.type | string | No | '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
- https://btsecom.github.io/docs/spotV3_3/en/#query-user-trades-fills
- https://btsecom.github.io/docs/futuresV2_3/en/#query-trades-fills-2
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | order id |
| symbol | string | No | 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 |
| params.clientOrderId | string | No | client order id, could be used instead of the order id |
| params.type | string | No | '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
- https://btsecom.github.io/docs/spotV3_3/en/#create-new-order
- https://btsecom.github.io/docs/futuresV2_3/en/#create-new-order
- https://btsecom.github.io/docs/futuresV2_3/en/#create-new-algo-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 fullfilled, 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 | a unique id for the order |
| params.postOnly | bool | No | if true, the order will only be posted to the order book and not executed immediately (default is false) |
| params.timeInForce | string | No | 'GTC', 'IOC', 'FOK', 'PO', 'HALFMIN', 'FIVEMIN', 'HOUR', 'TWELVEHOUR', 'DAY', 'WEEK' or 'MONTH' |
| params.triggerPrice | float | No | the price that a trigger order is triggered at (same as takeProfitPrice) |
| 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.triggerPriceType | string | No | 'INDEX_PRICE' or 'LAST_PRICE', default is 'LAST_PRICE' |
| params.trailingAmount | float | No | the quote amount to trail away from the current market price |
| params.deviation | float | No | PEG orders only How much should the order price deviate from index price. Value is in percentage and can range from -10 to 10 |
| params.stealth | float | No | PEG orders only How many percent of the order is to be displayed on the orderbook |
| params.stopPrice | float | No | NB - It is NOT stopLossPrice or triggerPrice!!! OCO orders only Mandatory when creating an OCO order. Indicates the stop price |
| params.hedged | bool | No | contract markets only true for hedged mode, false for one way mode, default is false |
| params.marginMode | string | No | contract 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.positionMode | string | No | contract markets only 'ONE_WAY (default) or 'HEDGE or 'ISOLATED' (if not provided, it will be derived from marginMode and hedged params) |
| params.takeProfit | object | No | contract 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.triggerPrice | float | No | contract markets only take profit trigger price |
| params.takeProfit.priceType | string | No | contract markets only 'markPrice' or 'lastPrice', default is 'markPrice' |
| params.stopLoss | object | No | contract 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.triggerPrice | float | No | contract markets only stop loss trigger price |
| params.stopLoss.priceType | string | No | contract 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to create an order in |
| type | string | Yes | 'market', 'limit', 'OCO', 'PEG', 'TWAP' or 'TRAILING' |
| side | string | Yes | 'buy' or 'sell' |
| amount | float | Yes | how much of you want to trade in units of the base currency |
| price | float | No | the price that 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 | a unique id for the order |
| params.postOnly | bool | No | if true, the order will only be posted to the order book and not executed immediately, default is false |
| params.timeInForce | string | No | 'GTC', 'IOC' or 'FOK' |
| params.cost | float | No | market buy and trailing buy orders only the quote quantity that can be used as an alternative for the amount |
| params.triggerPrice | float | No | the price that a trigger order is triggered at, same as takeProfitPrice |
| 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.triggerPriceType | string | No | 'last', 'mark' or 'index', default is 'last' |
| params.trailingAmount | float | No | the quote amount to trail away from the current market price |
| params.trailingPercent | float | No | the percent to trail away from the current market price |
| params.deviation | float | No | PEG orders only how much should the order price deviate from the pegged price, in percent from -10 to 10 |
| params.stealth | float | No | PEG orders only how many percent of the order is to be displayed on the orderbook, from 1 to 100 |
| params.stopPrice | float | No | NB - 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to create an order in |
| type | string | Yes | 'market', 'limit', 'OCO', 'PEG', 'TWAP' or 'TRAILING' |
| side | string | Yes | 'buy' or 'sell' |
| amount | float | Yes | how much of you want to trade in units of the base currency |
| price | float | No | the price that 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 | a unique id for the order |
| params.postOnly | bool | No | if true, the order will only be posted to the order book and not executed immediately, default is false |
| params.reduceOnly | bool | No | if true, the order will only reduce a current position, not increase it, default is false |
| params.timeInForce | string | No | 'GTC', 'IOC', 'FOK', 'PO', 'HALFSEC', 'HALFMIN', 'FIVEMIN', 'HOUR', 'TWELVEHOUR', 'DAY', 'WEEK' or 'MONTH' |
| params.hedged | bool | No | true for hedged mode, false for one way mode, default is false |
| params.marginMode | string | No | '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.positionMode | string | No | 'ONE_WAY', 'HEDGE' or 'ISOLATED' - if not provided, it will be derived from the marginMode and hedged params |
| params.triggerPrice | float | No | the price that a trigger order is triggered at, same as takeProfitPrice |
| 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.triggerPriceType | string | No | 'last', 'mark' or 'index', default is 'mark' |
| params.trailingAmount | float | No | the quote amount to trail away from the current market price |
| params.trailingPercent | float | No | the percent to trail away from the current market price |
| 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.takeProfit.priceType | string | No | 'last', 'mark' or 'index', default is 'mark' |
| 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.stopLoss.priceType | string | No | 'last', 'mark' or 'index', default is 'mark' |
| params.deviation | float | No | PEG orders only the offset applied to the pegged reference price |
| params.stealth | float | No | PEG orders only the portion of the order size displayed on the book |
| params.stopPrice | float | No | NB - 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
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | the 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.clientOrderId | string | No | a unique id for the order |
| params.type | string | No | 'spot', 'swap' or 'future', default is 'spot' |
| params.includeCancelled | bool | No | contract 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
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | order id |
| symbol | string | Yes | unified symbol of the market to create an order in |
| type | string | Yes | 'market' or 'limit' (not used by btse) |
| side | string | Yes | 'buy' or 'sell' (not used by btse) |
| amount | float | No | how much of currency you want to trade in units of base currency |
| price | float | No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.clientOrderId | string | No | a unique id for the order, required if id is not provided |
| params.triggerPrice | float | No | the price that a trigger order is triggered at |
| params.totalAmountMode | bool | No | if true, the amount is treated as the new total order quantity including the already filled portion, default is false |
| params.slide | bool | No | contract 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
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | order id |
| symbol | string | Yes | unified symbol of the market the order was made in |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.clientOrderId | string | No | a 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
- https://docs.btse.com/spot/rest/cancel-all-orders
- https://btsecom.github.io/docs/futuresV2_3/en/#cancel-order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | unified market symbol of the market to cancel orders in, on spot markets omit it to cancel every open order across all pairs |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.type | string | No | '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
- https://docs.btse.com/spot/rest/cancel-all-after
- https://docs.btse.com/futures/rest/cancel-all-after
| Param | Type | Required | Description |
|---|---|---|---|
| timeout | number | Yes | time in milliseconds, 0 represents cancel the timer |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.type | string | No | '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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | unified market symbol |
| since | int | No | the earliest time in ms to fetch open orders for, filtered client-side |
| limit | int | No | the maximum number of open orders structures to retrieve, filtered client-side |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.type | string | No | '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
- https://docs.btse.com/spot/rest/get-fees
- https://btsecom.github.io/docs/futuresV2_3/en/#query-account-fee
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.type | string | No | '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
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | No | unified currency code, required for the default spot wallet |
| since | int | No | the earliest time in ms to fetch transactions for |
| limit | int | No | the maximum number of transaction 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 transactions for, excluded |
| params.walletType | string | No | wallet 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
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | No | unified currency code, required for the default spot wallet |
| since | int | No | the earliest time in ms to fetch deposits for |
| limit | int | No | the maximum number of transaction 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 deposits for, excluded |
| params.walletType | string | No | wallet 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
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | No | unified currency code, required for the default spot wallet |
| since | int | No | the earliest time in ms to fetch withdrawals for |
| limit | int | No | the maximum number of transaction 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 withdrawals for, excluded |
| params.walletType | string | No | wallet 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
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | No | unified currency code |
| since | int | No | the earliest time in ms to fetch ledger entries for |
| limit | int | No | the maximum number of ledger entry 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 ledger entries for, excluded |
| params.walletType | string | No | wallet 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
- https://docs.btse.com/spot/rest/get-fees
- https://btsecom.github.io/docs/futuresV2_3/en/#query-account-fee
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra 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/
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | No | list of unified market symbols |
| params | object | No | extra 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/
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch entry for |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| hedged | bool | Yes | set to true to use dualSidePosition |
| symbol | string | Yes | unified symbol of the market to set position mode for |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market the order was made in |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| marginMode | string | Yes | 'cross' or 'isolated' |
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.hedged | bool | No | set 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/
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified CCXT market symbol |
| side | string | No | not used by btse |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.positionId | string | No | the id of the position to close, mandatory |
| params.type | string | No | 'limit' or 'market' (default is 'market') |
| params.price | float | No | required if params.type is 'limit' |
| params.postOnly | bool | No | true 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra 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
| 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.positionMode | string | No | ONE_WAY or HEDGE, defaults to ONE_WAY on the exchange side when omitted |
| params.positionDirection | string | No | LONG or SHORT, identifies the side to update in hedge mode |
| params.positionId | string | No | existing position id to update, disambiguates the target position in hedge mode |
btse.setLeverage (leverage, symbol, params?)