ascendex
ascendex cryptocurrency exchange — CCXT unified API: methods, parameters and endpoints.
ascendex
Kind: global class
Extends: Exchange
- fetchCurrencies
- fetchMarkets
- fetchTime
- fetchAccounts
- fetchBalance
- fetchOrderBook
- fetchTicker
- fetchTickers
- fetchOHLCV
- fetchTrades
- fetchTradingFees
- createOrder
- createOrders
- fetchOrder
- fetchOpenOrders
- fetchClosedOrders
- cancelOrder
- cancelAllOrders
- fetchDepositAddress
- fetchDeposits
- fetchWithdrawals
- fetchDepositsWithdrawals
- fetchPositions
- fetchFundingRates
- reduceMargin
- addMargin
- setLeverage
- setMarginMode
- fetchLeverageTiers
- fetchDepositWithdrawFees
- transfer
- fetchFundingHistory
- fetchMarginModes
- fetchLeverages
- fetchOpenInterests
- watchOHLCV
- watchTrades
- watchTradesForSymbols
- watchOrderBook
- watchBalance
- watchOrders
fetchCurrencies
fetches all available currencies on an exchange
Kind: instance method of ascendex
Returns: object - an associative dictionary of currencies
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
ascendex.fetchCurrencies (params?)fetchMarkets
retrieves data on all markets for ascendex
Kind: instance method of ascendex
Returns: Array<object> - an array of objects representing market data
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
ascendex.fetchMarkets (params?)fetchTime
fetches the current integer timestamp in milliseconds from the ascendex server
Kind: instance method of ascendex
Returns: int - the current integer timestamp in milliseconds from the ascendex server
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
ascendex.fetchTime (params?)fetchAccounts
fetch all the accounts associated with a profile
Kind: instance method of ascendex
Returns: object - a dictionary of account structures indexed by the account type
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
ascendex.fetchAccounts (params?)fetchBalance
query for balance and get the amount of funds available for trading or funds locked in orders
Kind: instance method of ascendex
Returns: object - a balance structure
See
- https://ascendex.github.io/ascendex-pro-api/#cash-account-balance
- https://ascendex.github.io/ascendex-pro-api/#margin-account-balance
- https://ascendex.github.io/ascendex-futures-pro-api-v2/#position
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.type | string | No | wallet type, 'spot', 'margin', or 'swap' |
| params.marginMode | string | No | 'cross' or undefined, for spot margin trading, value of 'isolated' is invalid |
ascendex.fetchBalance (params?)fetchOrderBook
fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of ascendex
Returns: object - A dictionary of order book structures indexed by market symbols
| 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 |
ascendex.fetchOrderBook (symbol, limit?, 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 ascendex
Returns: object - a ticker structure
| 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 |
ascendex.fetchTicker (symbol, params?)fetchTickers
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
Kind: instance method of ascendex
Returns: object - a dictionary of ticker structures
See
- https://ascendex.github.io/ascendex-pro-api/#ticker
- https://ascendex.github.io/ascendex-futures-pro-api-v2/#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 |
ascendex.fetchTickers (symbols, params?)fetchOHLCV
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of ascendex
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
| 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 | timestamp in ms of the latest candle to fetch |
ascendex.fetchOHLCV (symbol, timeframe, since?, limit?, params?)fetchTrades
get the list of most recent trades for a particular symbol
Kind: instance method of ascendex
Returns: Array<Trade> - a list of trade structures
See: https://ascendex.github.io/ascendex-pro-api/#market-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 |
| limit | int | No | the maximum amount of trades to fetch |
| params | object | No | extra parameters specific to the exchange API endpoint |
ascendex.fetchTrades (symbol, since?, limit?, params?)fetchTradingFees
fetch the trading fees for multiple markets
Kind: instance method of ascendex
Returns: object - a dictionary of fee structures indexed by market symbols
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
ascendex.fetchTradingFees (params?)createOrder
create a trade order on the exchange
Kind: instance method of ascendex
Returns: An order structure
See
- https://ascendex.github.io/ascendex-pro-api/#place-order
- https://ascendex.github.io/ascendex-futures-pro-api-v2/#new-order
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified CCXT market symbol |
| type | string | Yes | "limit" or "market" |
| side | string | Yes | "buy" or "sell" |
| amount | float | Yes | the amount of currency to trade |
| 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", or "PO" |
| params.postOnly | bool | No | true or false |
| params.triggerPrice | float | No | the price at which a trigger order is triggered at |
| params.takeProfit | object | No | takeProfit object in params containing the triggerPrice that the attached take profit order will be triggered (perpetual swap markets only) |
| params.takeProfit.triggerPrice | float | No | swap only take profit trigger price |
| params.stopLoss | object | No | stopLoss object in params containing the triggerPrice that the attached stop loss order will be triggered (perpetual swap markets only) |
| params.stopLoss.triggerPrice | float | No | swap only stop loss trigger price |
ascendex.createOrder (symbol, type, side, amount, price?, params?)createOrders
create a list of trade orders
Kind: instance method of ascendex
Returns: object - an order structure
See
- https://ascendex.github.io/ascendex-pro-api/#place-batch-orders
- https://ascendex.github.io/ascendex-futures-pro-api-v2/#place-batch-orders
| 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 |
| params.timeInForce | string | No | "GTC", "IOC", "FOK", or "PO" |
| params.postOnly | bool | No | true or false |
| params.triggerPrice | float | No | the price at which a trigger order is triggered at |
ascendex.createOrders (orders, params?)fetchOrder
fetches information on an order made by the user
Kind: instance method of ascendex
Returns: object - An order structure
See
- https://ascendex.github.io/ascendex-pro-api/#query-order
- https://ascendex.github.io/ascendex-futures-pro-api-v2/#query-order-by-id
| 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 |
ascendex.fetchOrder (id, symbol, params?)fetchOpenOrders
fetch all unfilled currently open orders
Kind: instance method of ascendex
Returns: Array<Order> - a list of order structures
See
- https://ascendex.github.io/ascendex-pro-api/#list-open-orders
- https://ascendex.github.io/ascendex-futures-pro-api-v2/#list-open-orders
| 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 |
ascendex.fetchOpenOrders (symbol, since?, limit?, params?)fetchClosedOrders
fetches information on multiple closed orders made by the user
Kind: instance method of ascendex
Returns: Array<Order> - a list of order structures
See
- https://ascendex.github.io/ascendex-pro-api/#list-history-orders-v2
- https://ascendex.github.io/ascendex-futures-pro-api-v2/#list-current-history-orders
| 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.until | int | No | the latest time in ms to fetch orders for |
ascendex.fetchClosedOrders (symbol, since?, limit?, params?)cancelOrder
cancels an open order
Kind: instance method of ascendex
Returns: object - An order structure
See
- https://ascendex.github.io/ascendex-pro-api/#cancel-order
- https://ascendex.github.io/ascendex-futures-pro-api-v2/#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 |
ascendex.cancelOrder (id, symbol, params?)cancelAllOrders
cancel all open orders
Kind: instance method of ascendex
Returns: Array<object> - a list with a single order structure with the response assigned to the info property
See
- https://ascendex.github.io/ascendex-pro-api/#cancel-all-orders
- https://ascendex.github.io/ascendex-futures-pro-api-v2/#cancel-all-open-orders
| 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 |
ascendex.cancelAllOrders (symbol, params?)fetchDepositAddress
fetch the deposit address for a currency associated with this account
Kind: instance method of ascendex
Returns: object - an address structure
See: https://ascendex.github.io/ascendex-pro-api/#query-deposit-addresses
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.network | string | No | unified network code for deposit chain |
ascendex.fetchDepositAddress (code, params?)fetchDeposits
fetch all deposits made to an account
Kind: instance method of ascendex
Returns: Array<object> - a list of transaction structures
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | unified currency code |
| since | int | No | the earliest time in ms to fetch deposits for |
| limit | int | No | the maximum number of deposits structures to retrieve |
| params | object | No | extra parameters specific to the exchange API endpoint |
ascendex.fetchDeposits (code, since?, limit?, params?)fetchWithdrawals
fetch all withdrawals made from an account
Kind: instance method of ascendex
Returns: Array<object> - a list of transaction structures
| 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 |
ascendex.fetchWithdrawals (code, since?, limit?, params?)fetchDepositsWithdrawals
fetch history of deposits and withdrawals
Kind: instance method of ascendex
Returns: object - a list of transaction structure
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | No | unified currency code for the currency of the deposit/withdrawals, default is undefined |
| since | int | No | timestamp in ms of the earliest deposit/withdrawal, default is undefined |
| limit | int | No | max number of deposit/withdrawals to return, default is undefined |
| params | object | No | extra parameters specific to the exchange API endpoint |
ascendex.fetchDepositsWithdrawals (code?, since?, limit?, params?)fetchPositions
fetch all open positions
Kind: instance method of ascendex
Returns: Array<object> - a list of position structure
| 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 |
ascendex.fetchPositions (symbols, params?)fetchFundingRates
fetch the funding rate for multiple markets
Kind: instance method of ascendex
Returns: Array<object> - a list of funding rates structures, indexe by market symbols
| 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 |
ascendex.fetchFundingRates (symbols, params?)reduceMargin
remove margin from a position
Kind: instance method of ascendex
Returns: object - a margin structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| amount | float | Yes | the amount of margin to remove |
| params | object | No | extra parameters specific to the exchange API endpoint |
ascendex.reduceMargin (symbol, amount, params?)addMargin
add margin
Kind: instance method of ascendex
Returns: object - a margin structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| amount | float | Yes | amount of margin to add |
| params | object | No | extra parameters specific to the exchange API endpoint |
ascendex.addMargin (symbol, amount, params?)setLeverage
set the level of leverage for a market
Kind: instance method of ascendex
Returns: object - response from the exchange
See: https://ascendex.github.io/ascendex-futures-pro-api-v2/#change-contract-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 |
ascendex.setLeverage (leverage, symbol, params?)setMarginMode
set margin mode to 'cross' or 'isolated'
Kind: instance method of ascendex
Returns: object - response from the exchange
See: https://ascendex.github.io/ascendex-futures-pro-api-v2/#change-margin-type
| 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 |
ascendex.setMarginMode (marginMode, symbol, params?)fetchLeverageTiers
retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
Kind: instance method of ascendex
Returns: object - a dictionary of leverage tiers structures, indexed by market symbols
| 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 |
ascendex.fetchLeverageTiers (symbols, params?)fetchDepositWithdrawFees
fetch deposit and withdraw fees
Kind: instance method of ascendex
Returns: object - a list of fee structures
See: https://ascendex.github.io/ascendex-pro-api/#list-all-assets
| Param | Type | Required | Description |
|---|---|---|---|
| codes | Array<string>, undefined | Yes | list of unified currency codes |
| params | object | No | extra parameters specific to the exchange API endpoint |
ascendex.fetchDepositWithdrawFees (codes, params?)transfer
transfer currency internally between wallets on the same account
Kind: instance method of ascendex
Returns: object - a transfer structure
| 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 |
ascendex.transfer (code, amount, fromAccount, toAccount, params?)fetchFundingHistory
fetch the history of funding payments paid and received on this account
Kind: instance method of ascendex
Returns: object - a funding history structure
See: https://ascendex.github.io/ascendex-futures-pro-api-v2/#funding-payment-history
| 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 |
ascendex.fetchFundingHistory (symbol?, since?, limit?, params?)fetchMarginModes
fetches the set margin mode of the user
Kind: instance method of ascendex
Returns: object - a list of margin mode structures
See: https://ascendex.github.io/ascendex-futures-pro-api-v2/#position
| 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 |
ascendex.fetchMarginModes (symbols?, params?)fetchLeverages
fetch the set leverage for all contract markets
Kind: instance method of ascendex
Returns: object - a list of leverage structures
See: https://ascendex.github.io/ascendex-futures-pro-api-v2/#position
| 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 |
ascendex.fetchLeverages (symbols?, params?)fetchOpenInterests
Retrieves the open interest for a list of symbols
Kind: instance method of ascendex
Returns: Array<object> - a list of open interest structures
See: https://ascendex.github.io/ascendex-futures-pro-api-v2/#futures-pricing-data
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | No | a list of unified CCXT market symbols |
| params | object | No | exchange specific parameters |
ascendex.fetchOpenInterests (symbols?, params?)watchOHLCV
watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of ascendex
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
See: https://ascendex.github.io/ascendex-pro-api/#channel-bar-data
| 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 |
ascendex.watchOHLCV (symbol, timeframe, since?, limit?, params?)watchTrades
get the list of most recent trades for a particular symbol
Kind: instance method of ascendex
Returns: Array<object> - a list of trade structures
See: https://ascendex.github.io/ascendex-pro-api/#channel-market-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 |
| limit | int | No | the maximum amount of trades to fetch |
| params | object | No | extra parameters specific to the exchange API endpoint |
ascendex.watchTrades (symbol, since?, limit?, params?)watchTradesForSymbols
get the list of most recent trades for a list of symbols
Kind: instance method of ascendex
Returns: Array<object> - a list of trade structures
See: https://ascendex.github.io/ascendex-pro-api/#channel-market-trades
| 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 |
| params.name | string | No | the name of the method to call, 'trade' or 'aggTrade', default is 'trade' |
ascendex.watchTradesForSymbols (symbols, since?, limit?, params?)watchOrderBook
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of ascendex
Returns: object - A dictionary of order book structures indexed by market symbols
See: https://ascendex.github.io/ascendex-pro-api/#channel-level-2-order-book-updates
| 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 |
ascendex.watchOrderBook (symbol, limit?, params?)watchBalance
watch balance and get the amount of funds available for trading or funds locked in orders
Kind: instance method of ascendex
Returns: object - a balance structure
See: https://ascendex.github.io/ascendex-pro-api/#channel-order-and-balance
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
ascendex.watchBalance (params?)watchOrders
watches information on multiple orders made by the user
Kind: instance method of ascendex
Returns: Array<object> - a list of order structures
See: https://ascendex.github.io/ascendex-pro-api/#channel-order-and-balance
| 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 |
ascendex.watchOrders (symbol, since?, limit?, params?)