aster
aster cryptocurrency exchange — CCXT unified API: methods, parameters and endpoints.
aster
Kind: global class
Extends: Exchange
- fetchCurrencies
- fetchMarkets
- fetchTime
- fetchOHLCV
- fetchTrades
- fetchMyTrades
- fetchOrderBook
- fetchTicker
- fetchTickers
- fetchLastPrices
- fetchBidsAsks
- fetchFundingRate
- fetchFundingRates
- fetchFundingIntervals
- fetchFundingRateHistory
- fetchBalance
- setMarginMode
- fetchPositionMode
- setPositionMode
- fetchTradingFee
- fetchOrder
- fetchOpenOrder
- fetchOrders
- fetchOpenOrders
- createOrder
- createOrders
- cancelAllOrders
- cancelOrder
- cancelOrders
- setLeverage
- fetchLeverages
- fetchMarginModes
- fetchMarginAdjustmentHistory
- reduceMargin
- addMargin
- fetchFundingHistory
- fetchLedger
- fetchPositionsRisk
- fetchPositions
- withdraw
- transfer
- signIn
- watchTicker
- unWatchTicker
- watchTickers
- unWatchTickers
- watchMarkPrice
- unWatchMarkPrice
- watchMarkPrices
- unWatchMarkPrices
- watchBidsAsks
- unWatchBidsAsks
- watchTrades
- unWatchTrades
- watchTradesForSymbols
- unWatchTradesForSymbols
- watchOrderBook
- unWatchOrderBook
- watchOrderBookForSymbols
- unWatchOrderBookForSymbols
- watchOHLCV
- unWatchOHLCV
- watchOHLCVForSymbols
- unWatchOHLCVForSymbols
- watchBalance
- watchPositions
- watchOrders
- watchMyTrades
fetchCurrencies
fetches all available currencies on an exchange
Kind: instance method of aster
Returns: object - an associative dictionary of currencies
See
- https://asterdex.github.io/aster-api-website/spot-v3/market-data/#trading-specification-information
- https://asterdex.github.io/aster-api-website/futures-v3/market-data/#exchange-information
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
aster.fetchCurrencies (params?)fetchMarkets
retrieves data on all markets for bigone
Kind: instance method of aster
Returns: Array<object> - an array of objects representing market data
See
- https://asterdex.github.io/aster-api-website/spot-v3/market-data/#trading-specification-information
- https://asterdex.github.io/aster-api-website/futures-v3/market-data/#exchange-information
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
aster.fetchMarkets (params?)fetchTime
fetches the current integer timestamp in milliseconds from the exchange server
Kind: instance method of aster
Returns: int - the current integer timestamp in milliseconds from the exchange server
See
- https://asterdex.github.io/aster-api-website/spot-v3/market-data/#get-server-time
- https://asterdex.github.io/aster-api-website/futures-v3/market-data/#check-server-time
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
aster.fetchTime (params?)fetchOHLCV
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of aster
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
See
- https://asterdex.github.io/aster-api-website/spot-v3/market-data/#k-line-data
- https://asterdex.github.io/aster-api-website/futures-v3/market-data/#klinecandlestick-data
- https://asterdex.github.io/aster-api-website/futures-v3/market-data/#index-price-klinecandlestick-data
- https://asterdex.github.io/aster-api-website/futures-v3/market-data/#mark-price-klinecandlestick-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 |
| params.price | string | No | "mark" or "index" for mark price and index price candles |
| params.until | int | No | the latest time in ms to fetch orders for |
aster.fetchOHLCV (symbol, timeframe, since?, limit?, params?)fetchTrades
get the list of most recent trades for a particular symbol
Kind: instance method of aster
Returns: Array<Trade> - a list of trade structures
See
- https://asterdex.github.io/aster-api-website/spot-v3/market-data/#recent-trades-list
- https://asterdex.github.io/aster-api-website/spot-v3/market-data/#recent-trades-aggregated
- https://asterdex.github.io/aster-api-website/futures-v3/market-data/#recent-trades-list
- https://asterdex.github.io/aster-api-website/futures-v3/market-data/#compressedaggregate-trades-list
| 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 |
aster.fetchTrades (symbol, since?, limit?, params?)fetchMyTrades
fetch all trades made by the user
Kind: instance method of aster
Returns: Array<object> - a list of trade structures
See
- https://asterdex.github.io/aster-api-website/spot-v3/account%26trades/#account-trade-history-user_data
- https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#account-trade-list-user_data
| 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 |
aster.fetchMyTrades (symbol?, since?, limit?, params?)fetchOrderBook
fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of aster
Returns: object - A dictionary of order book structures indexed by market symbols
See
- https://asterdex.github.io/aster-api-website/spot-v3/market-data/#depth-information
- https://asterdex.github.io/aster-api-website/futures-v3/market-data/#order-book
| 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 |
aster.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 aster
Returns: object - a ticker structure
See
- https://asterdex.github.io/aster-api-website/spot-v3/market-data/#24h-price-change
- https://asterdex.github.io/aster-api-website/futures-v3/market-data/#24hr-ticker-price-change-statistics
| 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 |
aster.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 aster
Returns: object - an array of ticker structures
See
- https://asterdex.github.io/aster-api-website/spot-v3/market-data/#24h-price-change
- https://asterdex.github.io/aster-api-website/futures-v3/market-data/#24hr-ticker-price-change-statistics
| 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 | "linear" or "inverse" |
| params.type | string | No | 'spot', 'option', use params["subType"] for swap and future markets |
aster.fetchTickers (symbols, params?)fetchLastPrices
fetches the last price for multiple markets
Kind: instance method of aster
Returns: object - a dictionary of lastprices structures
See
- https://asterdex.github.io/aster-api-website/spot-v3/market-data/#latest-price
- https://asterdex.github.io/aster-api-website/futures-v3/market-data/#symbol-price-ticker
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string>, undefined | Yes | unified symbols of the markets to fetch the last prices |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.subType | string | No | "linear" or "inverse" |
aster.fetchLastPrices (symbols, params?)fetchBidsAsks
fetches the bid and ask price and volume for multiple markets
Kind: instance method of aster
Returns: object - a dictionary of ticker structures
See
- https://asterdex.github.io/aster-api-website/spot-v3/market-data/#current-best-order
- https://asterdex.github.io/aster-api-website/futures-v3/market-data/#symbol-order-book-ticker
| 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 | "linear" or "inverse" |
aster.fetchBidsAsks (symbols, params?)fetchFundingRate
fetch the current funding rate
Kind: instance method of aster
Returns: object - a funding rate structure
See: https://asterdex.github.io/aster-api-website/futures-v3/market-data/#symbol-price-ticker
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
aster.fetchFundingRate (symbol, params?)fetchFundingRates
fetch the current funding rate for multiple symbols
Kind: instance method of aster
Returns: Array<object> - a list of funding rate structures
See: https://asterdex.github.io/aster-api-website/futures-v3/market-data/#symbol-price-ticker
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | No | list of unified market symbols |
| params | object | No | extra parameters specific to the exchange API endpoint |
aster.fetchFundingRates (symbols?, params?)fetchFundingIntervals
fetch the funding rate interval for multiple markets
Kind: instance method of aster
Returns: Array<object> - a list of funding rate structures
See: https://asterdex.github.io/aster-api-website/futures-v3/market-data/#get-funding-rate-config
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | No | list of unified market symbols |
| params | object | No | extra parameters specific to the exchange API endpoint |
aster.fetchFundingIntervals (symbols?, params?)fetchFundingRateHistory
fetches historical funding rate prices
Kind: instance method of aster
Returns: Array<object> - a list of funding rate structures
See: https://asterdex.github.io/aster-api-website/futures-v3/market-data/#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 |
| 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 |
aster.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 aster
Returns: object - a balance structure
See
- https://asterdex.github.io/aster-api-website/spot-v3/account%26trades/#account-information-user_data
- https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#futures-account-balance-v3-user_data
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.subType | string | No | "linear" or "inverse" |
| params.type | string | No | 'spot', 'option', use params["subType"] for swap and future markets |
aster.fetchBalance (params?)setMarginMode
set margin mode to 'cross' or 'isolated'
Kind: instance method of aster
Returns: object - response from the exchange
See: https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#change-margin-type-trade
| 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 |
aster.setMarginMode (marginMode, symbol, params?)fetchPositionMode
fetchs the position mode, hedged or one way, hedged for aster is set identically for all linear markets or all inverse markets
Kind: instance method of aster
Returns: object - an object detailing whether the market is in hedged or one-way mode
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to fetch the order book for |
| params | object | No | extra parameters specific to the exchange API endpoint |
aster.fetchPositionMode (symbol, params?)setPositionMode
set hedged to true or false for a market
Kind: instance method of aster
Returns: object - response from the exchange
See: https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#change-position-modetrade
| Param | Type | Required | Description |
|---|---|---|---|
| hedged | bool | Yes | set to true to use dualSidePosition |
| symbol | string | Yes | not used by bingx setPositionMode () |
| params | object | No | extra parameters specific to the exchange API endpoint |
aster.setPositionMode (hedged, symbol, params?)fetchTradingFee
fetch the trading fees for a market
Kind: instance method of aster
Returns: object - a fee structure
See
- https://asterdex.github.io/aster-api-website/spot-v3/market-data/#get-symbol-fees
- https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#user-commission-rate-user_data
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
aster.fetchTradingFee (symbol, params?)fetchOrder
fetches information on an order made by the user
Kind: instance method of aster
Returns: object - an order structure
See
- https://asterdex.github.io/aster-api-website/spot-v3/account%26trades/#query-order-user_data
- https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#query-order-user_data
| 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.clientOrderId | string | No | a unique id for the order |
aster.fetchOrder (id, symbol, params?)fetchOpenOrder
fetch an open order by the id
Kind: instance method of aster
Returns: object - an order structure
See
- https://asterdex.github.io/aster-api-website/spot-v3/account%26trades/#query-current-open-order-user_data
- https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#query-current-open-order-user_data
| Param | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | order id |
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
aster.fetchOpenOrder (id, symbol, params?)fetchOrders
fetches information on multiple orders made by the user
Kind: instance method of aster
Returns: Array<Order> - a list of order structures
See
- https://asterdex.github.io/aster-api-website/spot-v3/account%26trades/#query-all-orders-user_data
- https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#all-orders-user_data
| 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 |
aster.fetchOrders (symbol, since?, limit?, params?)fetchOpenOrders
fetch all unfilled currently open orders
Kind: instance method of aster
Returns: Array<Order> - a list of order structures
See
- https://asterdex.github.io/aster-api-website/spot-v3/account%26trades/#current-open-orders-user_data
- https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#current-all-open-orders-user_data
| 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.subType | string | No | "linear" or "inverse" |
| params.type | string | No | 'spot', 'option', use params["subType"] for swap and future markets |
aster.fetchOpenOrders (symbol, since?, limit?, params?)createOrder
create a trade order
Kind: instance method of aster
Returns: object - an order structure
See
- https://asterdex.github.io/aster-api-website/spot-v3/account%26trades/#place-order-trade
- https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#new-order-trade
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to create an order in |
| type | string | Yes | 'market' or 'limit' or 'STOP' or 'STOP_MARKET' or 'TAKE_PROFIT' or 'TAKE_PROFIT_MARKET' or 'TRAILING_STOP_MARKET' |
| 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.reduceOnly | string | No | for swap and future reduceOnly is a string 'true' or 'false' that cant be sent with close position set to true or in hedge mode. For spot margin and option reduceOnly is a boolean. |
| params.test | boolean | No | whether to use the test endpoint or not, default is false |
| params.trailingPercent | float | No | the percent to trail away from the current market price |
| params.trailingTriggerPrice | float | No | the price to trigger a trailing order, default uses the price argument |
| params.positionSide | string | No | "BOTH" for one-way mode, "LONG" for buy side of hedged mode, "SHORT" for sell side of hedged mode |
| 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 |
aster.createOrder (symbol, type, side, amount, price?, params?)createOrders
create a list of trade orders
Kind: instance method of aster
Returns: object - an order structure
See: https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#new-order-trade
| 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 |
aster.createOrders (orders, params?)cancelAllOrders
cancel all open orders in a market
Kind: instance method of aster
Returns: Array<object> - a list of order structures
See
- https://asterdex.github.io/aster-api-website/spot-v3/account%26trades/#cancel-all-open-orders-trade
- https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#current-all-open-orders-user_data
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol of the market to cancel orders in |
| params | object | No | extra parameters specific to the exchange API endpoint |
aster.cancelAllOrders (symbol, params?)cancelOrder
cancels an open order
Kind: instance method of aster
Returns: object - An order structure
See
- https://asterdex.github.io/aster-api-website/spot-v3/account%26trades/#cancel-order-trade
- https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#cancel-order-trade
| 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 |
aster.cancelOrder (id, symbol, params?)cancelOrders
cancel multiple orders
Kind: instance method of aster
Returns: object - an list of order structures
See
- https://asterdex.github.io/aster-api-website/spot-v3/account%26trades/#cancel-all-open-orders-trade
- https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#cancel-multiple-orders-trade
| Param | Type | Required | Description |
|---|---|---|---|
| ids | Array<string> | Yes | order ids |
| symbol | string | No | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint EXCHANGE SPECIFIC PARAMETERS |
| params.origClientOrderIdList | Array<string> | No | max length 10 e.g. ["my_id_1","my_id_2"], encode the double quotes. No space after comma |
| params.recvWindow | Array<int> | No |
aster.cancelOrders (ids, symbol?, params?)setLeverage
set the level of leverage for a market
Kind: instance method of aster
Returns: object - response from the exchange
| 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 |
aster.setLeverage (leverage, symbol, params?)fetchLeverages
fetch the set leverage for all markets
Kind: instance method of aster
Returns: object - a list of leverage structures
| 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 |
aster.fetchLeverages (symbols?, params?)fetchMarginModes
fetches margin mode of the user
Kind: instance method of aster
Returns: object - a list of margin mode structures
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | Yes | unified market symbols |
| params | object | No | extra parameters specific to the exchange API endpoint |
aster.fetchMarginModes (symbols, params?)fetchMarginAdjustmentHistory
fetches the history of margin added or reduced from contract isolated positions
Kind: instance method of aster
Returns: Array<object> - a list of margin structures
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| type | string | No | "add" or "reduce" |
| since | int | No | timestamp in ms of the earliest change to fetch |
| limit | int | No | the maximum amount of changes to fetch |
| params | object | Yes | extra parameters specific to the exchange api endpoint |
| params.until | int | No | timestamp in ms of the latest change to fetch |
aster.fetchMarginAdjustmentHistory (symbol, type?, since?, limit?, params)reduceMargin
remove margin from a position
Kind: instance method of aster
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 |
aster.reduceMargin (symbol, amount, params?)addMargin
add margin
Kind: instance method of aster
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 |
aster.addMargin (symbol, amount, params?)fetchFundingHistory
fetch the history of funding payments paid and received on this account
Kind: instance method of aster
Returns: object - a funding history structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | 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.until | int | No | timestamp in ms of the latest funding history entry |
| params.portfolioMargin | boolean | No | set to true if you would like to fetch the funding history for a portfolio margin account |
| params.subType | string | No | "linear" or "inverse" |
aster.fetchFundingHistory (symbol, 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 aster
Returns: object - a ledger structure
| Param | Type | Required | Description |
|---|---|---|---|
| code | string | No | unified currency code |
| since | int | No | timestamp in ms of the earliest ledger entry |
| limit | int | No | max number of ledger entries to return |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.until | int | No | timestamp in ms of the latest ledger entry |
aster.fetchLedger (code?, since?, limit?, params?)fetchPositionsRisk
fetch positions risk
Kind: instance method of aster
Returns: object - data on the positions risk
| 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 |
aster.fetchPositionsRisk (symbols, params?)fetchPositions
fetch all open positions
Kind: instance method of aster
Returns: Array<object> - a list of position structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | No | list of unified market symbols |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.method | string | No | method name to call, "positionRisk", "account" or "option", default is "positionRisk" |
aster.fetchPositions (symbols?, params?)withdraw
make a withdrawal
Kind: instance method of aster
Returns: object - a transaction structure
See
- https://asterdex.github.io/aster-api-website/spot-v3/account%26trades/#withdraw-user_data
- https://asterdex.github.io/aster-api-website/futures-v3/deposit%26withdrawal/#withdraw-by-fapiv3-evm-futures
- https://asterdex.github.io/aster-api-website/futures-v3/deposit%26withdrawal/#withdraw-by-fapiv3-evm-spot
| 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 |
aster.withdraw (code, amount, address, tag, params?)transfer
transfer currency internally between wallets on the same account
Kind: instance method of aster
Returns: object - a transfer structure
See
- https://asterdex.github.io/aster-api-website/spot-v3/account%26trades/#perp-spot-transfer-trade
- https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#transfer-between-futures-and-spot-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 |
aster.transfer (code, amount, fromAccount, toAccount, params?)signIn
sign in, must be called prior to using other authenticated methods
Kind: instance method of aster
Returns: response from exchange
See: https://asterdex.github.io/aster-api-website/asterCode/integration-flow/
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
aster.signIn (params?)watchTicker
watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
Kind: instance method of aster
Returns: object - a ticker structure
See
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#simplified-ticker-by-symbol
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#compact-tickers-for-all-symbols-in-the-entire-market
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#full-ticker-per-symbol
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#complete-ticker-for-all-trading-pairs-on-the-entire-market
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#individual-symbol-mini-ticker-stream
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#all-market-mini-tickers-stream
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#individual-symbol-ticker-streams
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#all-market-tickers-streams
| 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 |
aster.watchTicker (symbol, params?)unWatchTicker
unWatches a price ticker
Kind: instance method of aster
Returns: object - a ticker structure
See
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#simplified-ticker-by-symbol
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#compact-tickers-for-all-symbols-in-the-entire-market
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#full-ticker-per-symbol
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#complete-ticker-for-all-trading-pairs-on-the-entire-market
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#individual-symbol-mini-ticker-stream
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#all-market-mini-tickers-stream
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#individual-symbol-ticker-streams
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#all-market-tickers-streams
| 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 |
aster.unWatchTicker (symbol, params?)watchTickers
watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
Kind: instance method of aster
Returns: object - a ticker structure
See
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#compact-tickers-for-all-symbols-in-the-entire-market
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#complete-ticker-for-all-trading-pairs-on-the-entire-market
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#all-market-mini-tickers-stream
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#all-market-tickers-streams
| 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 |
aster.watchTickers (symbols, params?)unWatchTickers
unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
Kind: instance method of aster
Returns: object - a ticker structure
See
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#compact-tickers-for-all-symbols-in-the-entire-market
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#complete-ticker-for-all-trading-pairs-on-the-entire-market
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#all-market-mini-tickers-stream
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#all-market-tickers-streams
| 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 |
aster.unWatchTickers (symbols, params?)watchMarkPrice
watches a mark price for a specific market
Kind: instance method of aster
Returns: object - a ticker structure
See
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#mark-price-stream
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#mark-price-stream-for-all-market
| 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 |
| params.use1sFreq | boolean | No | default is true if set to true, the mark price will be updated every second, otherwise every 3 seconds |
aster.watchMarkPrice (symbol, params?)unWatchMarkPrice
unWatches a mark price for a specific market
Kind: instance method of aster
Returns: object - a ticker structure
See
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#mark-price-stream
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#mark-price-stream-for-all-market
| 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 |
| params.use1sFreq | boolean | No | default is true if set to true, the mark price will be updated every second, otherwise every 3 seconds |
aster.unWatchMarkPrice (symbol, params?)watchMarkPrices
watches the mark price for all markets
Kind: instance method of aster
Returns: object - a ticker structure
See
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#mark-price-stream
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#mark-price-stream-for-all-market
| 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 |
| params.use1sFreq | boolean | No | default is true if set to true, the mark price will be updated every second, otherwise every 3 seconds |
aster.watchMarkPrices (symbols, params?)unWatchMarkPrices
watches the mark price for all markets
Kind: instance method of aster
Returns: object - a ticker structure
See
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#mark-price-stream
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#mark-price-stream-for-all-market
| 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 |
| params.use1sFreq | boolean | No | default is true if set to true, the mark price will be updated every second, otherwise every 3 seconds |
aster.unWatchMarkPrices (symbols, params?)watchBidsAsks
watches best bid & ask for symbols
Kind: instance method of aster
Returns: object - a ticker structure
See
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#best-order-book-information-by-symbol
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#best-order-book-information-across-the-entire-market
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#individual-symbol-book-ticker-streams
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#all-book-tickers-stream
| 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 |
aster.watchBidsAsks (symbols, params?)unWatchBidsAsks
unWatches best bid & ask for symbols
Kind: instance method of aster
Returns: object - a ticker structure
See
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#best-order-book-information-by-symbol
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#best-order-book-information-across-the-entire-market
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#individual-symbol-book-ticker-streams
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#all-book-tickers-stream
| 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 |
aster.unWatchBidsAsks (symbols, params?)watchTrades
watches information on multiple trades made in a market
Kind: instance method of aster
Returns: Array<object> - a list of trade structures
See
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#collection-transaction-flow
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#tick-by-tick-trades
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#aggregate-trade-streams
| 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 |
aster.watchTrades (symbol, since?, limit?, params?)unWatchTrades
unsubscribe from the trades channel
Kind: instance method of aster
Returns: Array<object> - a list of trade structures
See
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#collection-transaction-flow
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#tick-by-tick-trades
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#aggregate-trade-streams
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol of the market trades were made in |
| params | object | No | extra parameters specific to the exchange API endpoint |
aster.unWatchTrades (symbol, params?)watchTradesForSymbols
get the list of most recent trades for a list of symbols
Kind: instance method of aster
Returns: Array<object> - a list of trade structures
See
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#collection-transaction-flow
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#tick-by-tick-trades
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#aggregate-trade-streams
| 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 |
aster.watchTradesForSymbols (symbols, since?, limit?, params?)unWatchTradesForSymbols
unsubscribe from the trades channel
Kind: instance method of aster
Returns: Array<object> - a list of trade structures
See
- https://github.com/asterdex/api-docs/blob/master/aster-finance-spot-api.md#collection-transaction-flow
- https://github.com/asterdex/api-docs/blob/master/aster-finance-futures-api.md#aggregate-trade-streams
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | Yes | unified symbol of the market to fetch trades for |
| params | object | No | extra parameters specific to the exchange API endpoint |
aster.unWatchTradesForSymbols (symbols, params?)watchOrderBook
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of aster
Returns: object - A dictionary of order book structures indexed by market symbols
See
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#limited-depth-information
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#incremental-depth-information
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#partial-book-depth-streams
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#diff-book-depth-streams
| 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 |
aster.watchOrderBook (symbol, limit?, params?)unWatchOrderBook
unsubscribe from the orderbook channel
Kind: instance method of aster
Returns: object - A dictionary of order book structures indexed by market symbols
See
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#limited-depth-information
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#incremental-depth-information
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#partial-book-depth-streams
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#diff-book-depth-streams
| 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 |
aster.unWatchOrderBook (symbol, params?)watchOrderBookForSymbols
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of aster
Returns: object - A dictionary of order book structures indexed by market symbols
See
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#limited-depth-information
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#incremental-depth-information
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#partial-book-depth-streams
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#diff-book-depth-streams
| 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 |
aster.watchOrderBookForSymbols (symbols, limit?, params?)unWatchOrderBookForSymbols
unsubscribe from the orderbook channel
Kind: instance method of aster
Returns: object - A dictionary of order book structures indexed by market symbols
See
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#limited-depth-information
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#incremental-depth-information
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#partial-book-depth-streams
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#diff-book-depth-streams
| 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 |
aster.unWatchOrderBookForSymbols (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 aster
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
See
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#k-line-streams
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#klinecandlestick-streams
| 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 |
aster.watchOHLCV (symbol, timeframe, since?, limit?, params?)unWatchOHLCV
unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of aster
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
See
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#k-line-streams
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#klinecandlestick-streams
| 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 |
aster.unWatchOHLCV (symbol, timeframe, params?)watchOHLCVForSymbols
watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of aster
Returns: object - A list of candles ordered as timestamp, open, high, low, close, volume
See
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#k-line-streams
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#klinecandlestick-streams
| 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 |
aster.watchOHLCVForSymbols (symbolsAndTimeframes, since?, limit?, params?)unWatchOHLCVForSymbols
unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of aster
Returns: Array<Array<int>> - A list of candles ordered as timestamp, open, high, low, close, volume
See
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-market-streams/#k-line-streams
- https://asterdex.github.io/aster-api-website/futures-v3/websocket-market-streams/#klinecandlestick-streams
| 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 |
aster.unWatchOHLCVForSymbols (symbolsAndTimeframes, params?)watchBalance
query for balance and get the amount of funds available for trading or funds locked in orders
Kind: instance method of aster
Returns: object - a balance structure
See
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-account-info/#payload-account_update
- https://asterdex.github.io/aster-api-website/futures-v3/user-data-streams/#event-balance-and-position-update
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.type | string | No | 'spot' or 'swap', default is 'spot' |
aster.watchBalance (params?)watchPositions
watch all open positions
Kind: instance method of aster
Returns: Array<object> - a list of position structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string>, undefined | Yes | list of unified market symbols |
| since | number | No | since timestamp |
| limit | number | No | limit |
| params | object | Yes | extra parameters specific to the exchange API endpoint |
aster.watchPositions (symbols, since?, limit?, params)watchOrders
watches information on multiple orders made by the user
Kind: instance method of aster
Returns: Array<object> - a list of order structures
See
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-account-info/#payload-order-update
- https://asterdex.github.io/aster-api-website/futures-v3/user-data-streams/#event-order-update
| 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.type | string | No | 'spot' or 'swap', default is 'spot' if symbol is not provided |
aster.watchOrders (symbol?, since?, limit?, params?)watchMyTrades
watches information on multiple trades made by the user
Kind: instance method of aster
Returns: Array<object> - a list of trade structures
See
- https://asterdex.github.io/aster-api-website/spot-v3/websocket-account-info/#payload-order-update
- https://asterdex.github.io/aster-api-website/futures-v3/user-data-streams/#event-order-update
| 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.type | string | No | 'spot' or 'swap', default is 'spot' if symbol is not provided |
aster.watchMyTrades (symbol?, since?, limit?, params?)