wiki/exchanges/aster.md
<a name="aster" id="aster"></a>
Kind: global class
Extends: <code>Exchange</code>
<a name="fetchCurrencies" id="fetchcurrencies"></a>
fetches all available currencies on an exchange
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - an associative dictionary of currencies
See
| Param | Type | Required | Description |
|---|---|---|---|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.fetchCurrencies ([params])
<a name="fetchMarkets" id="fetchmarkets"></a>
retrieves data on all markets for bigone
Kind: instance method of <code>aster</code>
Returns: <code>Array<object></code> - an array of objects representing market data
See
| Param | Type | Required | Description |
|---|---|---|---|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.fetchMarkets ([params])
<a name="fetchTime" id="fetchtime"></a>
fetches the current integer timestamp in milliseconds from the exchange server
Kind: instance method of <code>aster</code>
Returns: <code>int</code> - the current integer timestamp in milliseconds from the exchange server
See
| Param | Type | Required | Description |
|---|---|---|---|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.fetchTime ([params])
<a name="fetchOHLCV" id="fetchohlcv"></a>
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of <code>aster</code>
Returns: <code>Array<Array<int>></code> - A list of candles ordered as timestamp, open, high, low, close, volume
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | <code>string</code> | Yes | the length of time each candle represents |
| since | <code>int</code> | No | timestamp in ms of the earliest candle to fetch |
| limit | <code>int</code> | No | the maximum amount of candles to fetch |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.price | <code>string</code> | No | "mark" or "index" for mark price and index price candles |
| params.until | <code>int</code> | No | the latest time in ms to fetch orders for |
aster.fetchOHLCV (symbol, timeframe[, since, limit, params])
<a name="fetchTrades" id="fetchtrades"></a>
get the list of most recent trades for a particular symbol
Kind: instance method of <code>aster</code>
Returns: <code>Array<Trade></code> - a list of trade structures
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch trades for |
| since | <code>int</code> | No | timestamp in ms of the earliest trade to fetch |
| limit | <code>int</code> | No | the maximum amount of trades to fetch |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.fetchTrades (symbol[, since, limit, params])
<a name="fetchMyTrades" id="fetchmytrades"></a>
fetch all trades made by the user
Kind: instance method of <code>aster</code>
Returns: <code>Array<object></code> - a list of trade structures
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | No | unified market symbol |
| since | <code>int</code> | No | the earliest time in ms to fetch trades for |
| limit | <code>int</code> | No | the maximum number of trades structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.until | <code>int</code> | No | timestamp in ms for the ending date filter, default is undefined |
aster.fetchMyTrades ([symbol, since, limit, params])
<a name="fetchOrderBook" id="fetchorderbook"></a>
fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the order book for |
| limit | <code>int</code> | No | the maximum amount of order book entries to return |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.fetchOrderBook (symbol[, limit, params])
<a name="fetchTicker" id="fetchticker"></a>
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - a ticker structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the ticker for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.fetchTicker (symbol[, params])
<a name="fetchTickers" id="fetchtickers"></a>
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - an array of ticker structures
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | Yes | unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.subType | <code>string</code> | No | "linear" or "inverse" |
| params.type | <code>string</code> | No | 'spot', 'option', use params["subType"] for swap and future markets |
aster.fetchTickers (symbols[, params])
<a name="fetchLastPrices" id="fetchlastprices"></a>
fetches the last price for multiple markets
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - a dictionary of lastprices structures
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code>, <code>undefined</code> | Yes | unified symbols of the markets to fetch the last prices |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.subType | <code>string</code> | No | "linear" or "inverse" |
aster.fetchLastPrices (symbols[, params])
<a name="fetchBidsAsks" id="fetchbidsasks"></a>
fetches the bid and ask price and volume for multiple markets
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - a dictionary of ticker structures
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code>, <code>undefined</code> | Yes | unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.subType | <code>string</code> | No | "linear" or "inverse" |
aster.fetchBidsAsks (symbols[, params])
<a name="fetchFundingRate" id="fetchfundingrate"></a>
fetch the current funding rate
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - a funding rate structure
See: https://asterdex.github.io/aster-api-website/futures-v3/market-data/#symbol-price-ticker
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.fetchFundingRate (symbol[, params])
<a name="fetchFundingRates" id="fetchfundingrates"></a>
fetch the current funding rate for multiple symbols
Kind: instance method of <code>aster</code>
Returns: <code>Array<object></code> - 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 | <code>Array<string></code> | No | list of unified market symbols |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.fetchFundingRates ([symbols, params])
<a name="fetchFundingIntervals" id="fetchfundingintervals"></a>
fetch the funding rate interval for multiple markets
Kind: instance method of <code>aster</code>
Returns: <code>Array<object></code> - 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 | <code>Array<string></code> | No | list of unified market symbols |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.fetchFundingIntervals ([symbols, params])
<a name="fetchFundingRateHistory" id="fetchfundingratehistory"></a>
fetches historical funding rate prices
Kind: instance method of <code>aster</code>
Returns: <code>Array<object></code> - 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 | <code>string</code> | Yes | unified symbol of the market to fetch the funding rate history for |
| since | <code>int</code> | No | timestamp in ms of the earliest funding rate to fetch |
| limit | <code>int</code> | No | the maximum amount of funding rate structures to fetch |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.until | <code>int</code> | No | timestamp in ms of the latest funding rate |
aster.fetchFundingRateHistory (symbol[, since, limit, params])
<a name="fetchBalance" id="fetchbalance"></a>
query for balance and get the amount of funds available for trading or funds locked in orders
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - a balance structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.subType | <code>string</code> | No | "linear" or "inverse" |
| params.type | <code>string</code> | No | 'spot', 'option', use params["subType"] for swap and future markets |
aster.fetchBalance ([params])
<a name="setMarginMode" id="setmarginmode"></a>
set margin mode to 'cross' or 'isolated'
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - 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 | <code>string</code> | Yes | 'cross' or 'isolated' |
| symbol | <code>string</code> | Yes | unified market symbol |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.setMarginMode (marginMode, symbol[, params])
<a name="fetchPositionMode" id="fetchpositionmode"></a>
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 <code>aster</code>
Returns: <code>object</code> - an object detailing whether the market is in hedged or one-way mode
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the order book for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.fetchPositionMode (symbol[, params])
<a name="setPositionMode" id="setpositionmode"></a>
set hedged to true or false for a market
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - response from the exchange
See: https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#change-position-modetrade
| Param | Type | Required | Description |
|---|---|---|---|
| hedged | <code>bool</code> | Yes | set to true to use dualSidePosition |
| symbol | <code>string</code> | Yes | not used by bingx setPositionMode () |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.setPositionMode (hedged, symbol[, params])
<a name="fetchTradingFee" id="fetchtradingfee"></a>
fetch the trading fees for a market
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - a fee structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.fetchTradingFee (symbol[, params])
<a name="fetchOrder" id="fetchorder"></a>
fetches information on an order made by the user
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - an order structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| id | <code>string</code> | Yes | the order id |
| symbol | <code>string</code> | Yes | unified symbol of the market the order was made in |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.clientOrderId | <code>string</code> | No | a unique id for the order |
aster.fetchOrder (id, symbol[, params])
<a name="fetchOpenOrder" id="fetchopenorder"></a>
fetch an open order by the id
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - an order structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| id | <code>string</code> | Yes | order id |
| symbol | <code>string</code> | Yes | unified market symbol |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.fetchOpenOrder (id, symbol[, params])
<a name="fetchOrders" id="fetchorders"></a>
fetches information on multiple orders made by the user
Kind: instance method of <code>aster</code>
Returns: <code>Array<Order></code> - a list of order structures
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol of the market orders were made in |
| since | <code>int</code> | No | the earliest time in ms to fetch orders for |
| limit | <code>int</code> | No | the maximum number of order structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.until | <code>int</code> | No | the latest time in ms to fetch orders for |
aster.fetchOrders (symbol[, since, limit, params])
<a name="fetchOpenOrders" id="fetchopenorders"></a>
fetch all unfilled currently open orders
Kind: instance method of <code>aster</code>
Returns: <code>Array<Order></code> - a list of order structures
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol |
| since | <code>int</code> | No | the earliest time in ms to fetch open orders for |
| limit | <code>int</code> | No | the maximum number of open orders structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.subType | <code>string</code> | No | "linear" or "inverse" |
| params.type | <code>string</code> | No | 'spot', 'option', use params["subType"] for swap and future markets |
aster.fetchOpenOrders (symbol[, since, limit, params])
<a name="createOrder" id="createorder"></a>
create a trade order
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - an order structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to create an order in |
| type | <code>string</code> | Yes | 'market' or 'limit' or 'STOP' or 'STOP_MARKET' or 'TAKE_PROFIT' or 'TAKE_PROFIT_MARKET' or 'TRAILING_STOP_MARKET' |
| side | <code>string</code> | Yes | 'buy' or 'sell' |
| amount | <code>float</code> | Yes | how much of you want to trade in units of the base currency |
| price | <code>float</code> | No | the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.reduceOnly | <code>string</code> | 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 | <code>boolean</code> | No | whether to use the test endpoint or not, default is false |
| params.trailingPercent | <code>float</code> | No | the percent to trail away from the current market price |
| params.trailingTriggerPrice | <code>float</code> | No | the price to trigger a trailing order, default uses the price argument |
| params.positionSide | <code>string</code> | No | "BOTH" for one-way mode, "LONG" for buy side of hedged mode, "SHORT" for sell side of hedged mode |
| params.triggerPrice | <code>float</code> | No | the price that a trigger order is triggered at |
| params.stopLossPrice | <code>float</code> | No | the price that a stop loss order is triggered at |
| params.takeProfitPrice | <code>float</code> | No | the price that a take profit order is triggered at |
aster.createOrder (symbol, type, side, amount[, price, params])
<a name="createOrders" id="createorders"></a>
create a list of trade orders
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - an order structure
See: https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#new-order-trade
| Param | Type | Required | Description |
|---|---|---|---|
| orders | <code>Array</code> | Yes | list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.createOrders (orders[, params])
<a name="cancelAllOrders" id="cancelallorders"></a>
cancel all open orders in a market
Kind: instance method of <code>aster</code>
Returns: <code>Array<object></code> - a list of order structures
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol of the market to cancel orders in |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.cancelAllOrders (symbol[, params])
<a name="cancelOrder" id="cancelorder"></a>
cancels an open order
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - An order structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| id | <code>string</code> | Yes | order id |
| symbol | <code>string</code> | Yes | unified symbol of the market the order was made in |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.cancelOrder (id, symbol[, params])
<a name="cancelOrders" id="cancelorders"></a>
cancel multiple orders
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - an list of order structures
See
| Param | Type | Required | Description |
|---|---|---|---|
| ids | <code>Array<string></code> | Yes | order ids |
| symbol | <code>string</code> | No | unified market symbol |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint EXCHANGE SPECIFIC PARAMETERS |
| params.origClientOrderIdList | <code>Array<string></code> | No | max length 10 e.g. ["my_id_1","my_id_2"], encode the double quotes. No space after comma |
| params.recvWindow | <code>Array<int></code> | No |
aster.cancelOrders (ids[, symbol, params])
<a name="setLeverage" id="setleverage"></a>
set the level of leverage for a market
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - response from the exchange
| Param | Type | Required | Description |
|---|---|---|---|
| leverage | <code>float</code> | Yes | the rate of leverage |
| symbol | <code>string</code> | Yes | unified market symbol |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.setLeverage (leverage, symbol[, params])
<a name="fetchLeverages" id="fetchleverages"></a>
fetch the set leverage for all markets
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - a list of leverage structures
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | No | a list of unified market symbols |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.fetchLeverages ([symbols, params])
<a name="fetchMarginModes" id="fetchmarginmodes"></a>
fetches margin mode of the user
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - a list of margin mode structures
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | Yes | unified market symbols |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.fetchMarginModes (symbols[, params])
<a name="fetchMarginAdjustmentHistory" id="fetchmarginadjustmenthistory"></a>
fetches the history of margin added or reduced from contract isolated positions
Kind: instance method of <code>aster</code>
Returns: <code>Array<object></code> - a list of margin structures
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol |
| type | <code>string</code> | No | "add" or "reduce" |
| since | <code>int</code> | No | timestamp in ms of the earliest change to fetch |
| limit | <code>int</code> | No | the maximum amount of changes to fetch |
| params | <code>object</code> | Yes | extra parameters specific to the exchange api endpoint |
| params.until | <code>int</code> | No | timestamp in ms of the latest change to fetch |
aster.fetchMarginAdjustmentHistory (symbol[, type, since, limit, params])
<a name="reduceMargin" id="reducemargin"></a>
remove margin from a position
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - a margin structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol |
| amount | <code>float</code> | Yes | the amount of margin to remove |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.reduceMargin (symbol, amount[, params])
<a name="addMargin" id="addmargin"></a>
add margin
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - a margin structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol |
| amount | <code>float</code> | Yes | amount of margin to add |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.addMargin (symbol, amount[, params])
<a name="fetchFundingHistory" id="fetchfundinghistory"></a>
fetch the history of funding payments paid and received on this account
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - a funding history structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol |
| since | <code>int</code> | No | the earliest time in ms to fetch funding history for |
| limit | <code>int</code> | No | the maximum number of funding history structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.until | <code>int</code> | No | timestamp in ms of the latest funding history entry |
| params.portfolioMargin | <code>boolean</code> | No | set to true if you would like to fetch the funding history for a portfolio margin account |
| params.subType | <code>string</code> | No | "linear" or "inverse" |
aster.fetchFundingHistory (symbol[, since, limit, params])
<a name="fetchLedger" id="fetchledger"></a>
fetch the history of changes, actions done by the user or operations that altered the balance of the user
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - a ledger structure
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | No | unified currency code |
| since | <code>int</code> | No | timestamp in ms of the earliest ledger entry |
| limit | <code>int</code> | No | max number of ledger entries to return |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.until | <code>int</code> | No | timestamp in ms of the latest ledger entry |
aster.fetchLedger ([code, since, limit, params])
<a name="fetchPositionsRisk" id="fetchpositionsrisk"></a>
fetch positions risk
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - data on the positions risk
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code>, <code>undefined</code> | Yes | list of unified market symbols |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.fetchPositionsRisk (symbols[, params])
<a name="fetchPositions" id="fetchpositions"></a>
fetch all open positions
Kind: instance method of <code>aster</code>
Returns: <code>Array<object></code> - a list of position structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | No | list of unified market symbols |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.method | <code>string</code> | No | method name to call, "positionRisk", "account" or "option", default is "positionRisk" |
aster.fetchPositions ([symbols, params])
<a name="withdraw" id="withdraw"></a>
make a withdrawal
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - a transaction structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | Yes | unified currency code |
| amount | <code>float</code> | Yes | the amount to withdraw |
| address | <code>string</code> | Yes | the address to withdraw to |
| tag | <code>string</code> | Yes | |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.withdraw (code, amount, address, tag[, params])
<a name="transfer" id="transfer"></a>
transfer currency internally between wallets on the same account
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - a transfer structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| code | <code>string</code> | Yes | unified currency code |
| amount | <code>float</code> | Yes | amount to transfer |
| fromAccount | <code>string</code> | Yes | account to transfer from |
| toAccount | <code>string</code> | Yes | account to transfer to |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.transfer (code, amount, fromAccount, toAccount[, params])
<a name="signIn" id="signin"></a>
sign in, must be called prior to using other authenticated methods
Kind: instance method of <code>aster</code>
Returns: response from exchange
See: https://asterdex.github.io/aster-api-website/asterCode/integration-flow/
| Param | Type | Required | Description |
|---|---|---|---|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.signIn ([params])
<a name="watchTicker" id="watchticker"></a>
watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - a ticker structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the ticker for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.watchTicker (symbol[, params])
<a name="unWatchTicker" id="unwatchticker"></a>
unWatches a price ticker
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - a ticker structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the ticker for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.unWatchTicker (symbol[, params])
<a name="watchTickers" id="watchtickers"></a>
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 <code>aster</code>
Returns: <code>object</code> - a ticker structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | Yes | unified symbol of the market to fetch the ticker for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.watchTickers (symbols[, params])
<a name="unWatchTickers" id="unwatchtickers"></a>
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 <code>aster</code>
Returns: <code>object</code> - a ticker structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | Yes | unified symbol of the market to fetch the ticker for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.unWatchTickers (symbols[, params])
<a name="watchMarkPrice" id="watchmarkprice"></a>
watches a mark price for a specific market
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - a ticker structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the ticker for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.use1sFreq | <code>boolean</code> | No | default is true if set to true, the mark price will be updated every second, otherwise every 3 seconds |
aster.watchMarkPrice (symbol[, params])
<a name="unWatchMarkPrice" id="unwatchmarkprice"></a>
unWatches a mark price for a specific market
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - a ticker structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the ticker for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.use1sFreq | <code>boolean</code> | No | default is true if set to true, the mark price will be updated every second, otherwise every 3 seconds |
aster.unWatchMarkPrice (symbol[, params])
<a name="watchMarkPrices" id="watchmarkprices"></a>
watches the mark price for all markets
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - a ticker structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | Yes | unified symbol of the market to fetch the ticker for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.use1sFreq | <code>boolean</code> | No | default is true if set to true, the mark price will be updated every second, otherwise every 3 seconds |
aster.watchMarkPrices (symbols[, params])
<a name="unWatchMarkPrices" id="unwatchmarkprices"></a>
watches the mark price for all markets
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - a ticker structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | Yes | unified symbol of the market to fetch the ticker for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.use1sFreq | <code>boolean</code> | No | default is true if set to true, the mark price will be updated every second, otherwise every 3 seconds |
aster.unWatchMarkPrices (symbols[, params])
<a name="watchBidsAsks" id="watchbidsasks"></a>
watches best bid & ask for symbols
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - a ticker structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | Yes | unified symbol of the market to fetch the ticker for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.watchBidsAsks (symbols[, params])
<a name="unWatchBidsAsks" id="unwatchbidsasks"></a>
unWatches best bid & ask for symbols
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - a ticker structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | Yes | unified symbol of the market to fetch the ticker for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.unWatchBidsAsks (symbols[, params])
<a name="watchTrades" id="watchtrades"></a>
watches information on multiple trades made in a market
Kind: instance method of <code>aster</code>
Returns: <code>Array<object></code> - a list of trade structures
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol of the market trades were made in |
| since | <code>int</code> | No | the earliest time in ms to fetch trades for |
| limit | <code>int</code> | No | the maximum number of trade structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.watchTrades (symbol[, since, limit, params])
<a name="unWatchTrades" id="unwatchtrades"></a>
unsubscribe from the trades channel
Kind: instance method of <code>aster</code>
Returns: <code>Array<object></code> - a list of trade structures
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified market symbol of the market trades were made in |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.unWatchTrades (symbol[, params])
<a name="watchTradesForSymbols" id="watchtradesforsymbols"></a>
get the list of most recent trades for a list of symbols
Kind: instance method of <code>aster</code>
Returns: <code>Array<object></code> - a list of trade structures
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | Yes | unified symbol of the market to fetch trades for |
| since | <code>int</code> | No | timestamp in ms of the earliest trade to fetch |
| limit | <code>int</code> | No | the maximum amount of trades to fetch |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.watchTradesForSymbols (symbols[, since, limit, params])
<a name="unWatchTradesForSymbols" id="unwatchtradesforsymbols"></a>
unsubscribe from the trades channel
Kind: instance method of <code>aster</code>
Returns: <code>Array<object></code> - a list of trade structures
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | Yes | unified symbol of the market to fetch trades for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.unWatchTradesForSymbols (symbols[, params])
<a name="watchOrderBook" id="watchorderbook"></a>
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch the order book for |
| limit | <code>int</code> | No | the maximum amount of order book entries to return. |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.watchOrderBook (symbol[, limit, params])
<a name="unWatchOrderBook" id="unwatchorderbook"></a>
unsubscribe from the orderbook channel
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | symbol of the market to unwatch the trades for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.limit | <code>int</code> | No | orderbook limit, default is undefined |
aster.unWatchOrderBook (symbol[, params])
<a name="watchOrderBookForSymbols" id="watchorderbookforsymbols"></a>
watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | Yes | unified array of symbols |
| limit | <code>int</code> | No | the maximum amount of order book entries to return. |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.watchOrderBookForSymbols (symbols[, limit, params])
<a name="unWatchOrderBookForSymbols" id="unwatchorderbookforsymbols"></a>
unsubscribe from the orderbook channel
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code> | Yes | unified symbol of the market to unwatch the trades for |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.limit | <code>int</code> | No | orderbook limit, default is undefined |
aster.unWatchOrderBookForSymbols (symbols[, params])
<a name="watchOHLCV" id="watchohlcv"></a>
watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of <code>aster</code>
Returns: <code>Array<Array<int>></code> - A list of candles ordered as timestamp, open, high, low, close, volume
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | <code>string</code> | Yes | the length of time each candle represents |
| since | <code>int</code> | No | timestamp in ms of the earliest candle to fetch |
| limit | <code>int</code> | No | the maximum amount of candles to fetch |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.watchOHLCV (symbol, timeframe[, since, limit, params])
<a name="unWatchOHLCV" id="unwatchohlcv"></a>
unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of <code>aster</code>
Returns: <code>Array<Array<int>></code> - A list of candles ordered as timestamp, open, high, low, close, volume
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | Yes | unified symbol of the market to fetch OHLCV data for |
| timeframe | <code>string</code> | Yes | the length of time each candle represents |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.unWatchOHLCV (symbol, timeframe[, params])
<a name="watchOHLCVForSymbols" id="watchohlcvforsymbols"></a>
watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - A list of candles ordered as timestamp, open, high, low, close, volume
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbolsAndTimeframes | <code>Array<Array<string>></code> | Yes | array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']] |
| since | <code>int</code> | No | timestamp in ms of the earliest candle to fetch |
| limit | <code>int</code> | No | the maximum amount of candles to fetch |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.watchOHLCVForSymbols (symbolsAndTimeframes[, since, limit, params])
<a name="unWatchOHLCVForSymbols" id="unwatchohlcvforsymbols"></a>
unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
Kind: instance method of <code>aster</code>
Returns: <code>Array<Array<int>></code> - A list of candles ordered as timestamp, open, high, low, close, volume
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbolsAndTimeframes | <code>Array<Array<string>></code> | Yes | array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']] |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
aster.unWatchOHLCVForSymbols (symbolsAndTimeframes[, params])
<a name="watchBalance" id="watchbalance"></a>
query for balance and get the amount of funds available for trading or funds locked in orders
Kind: instance method of <code>aster</code>
Returns: <code>object</code> - a balance structure
See
| Param | Type | Required | Description |
|---|---|---|---|
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.type | <code>string</code> | No | 'spot' or 'swap', default is 'spot' |
aster.watchBalance ([params])
<a name="watchPositions" id="watchpositions"></a>
watch all open positions
Kind: instance method of <code>aster</code>
Returns: <code>Array<object></code> - a list of position structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | <code>Array<string></code>, <code>undefined</code> | Yes | list of unified market symbols |
| since | <code>number</code> | No | since timestamp |
| limit | <code>number</code> | No | limit |
| params | <code>object</code> | Yes | extra parameters specific to the exchange API endpoint |
aster.watchPositions (symbols[, since, limit, params])
<a name="watchOrders" id="watchorders"></a>
watches information on multiple orders made by the user
Kind: instance method of <code>aster</code>
Returns: <code>Array<object></code> - a list of order structures
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | No | unified market symbol of the market orders were made in |
| since | <code>int</code> | No | the earliest time in ms to fetch orders for |
| limit | <code>int</code> | No | the maximum number of order structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.type | <code>string</code> | No | 'spot' or 'swap', default is 'spot' if symbol is not provided |
aster.watchOrders ([symbol, since, limit, params])
<a name="watchMyTrades" id="watchmytrades"></a>
watches information on multiple trades made by the user
Kind: instance method of <code>aster</code>
Returns: <code>Array<object></code> - a list of trade structures
See
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | <code>string</code> | No | unified market symbol of the market orders were made in |
| since | <code>int</code> | No | the earliest time in ms to fetch orders for |
| limit | <code>int</code> | No | the maximum number of order structures to retrieve |
| params | <code>object</code> | No | extra parameters specific to the exchange API endpoint |
| params.type | <code>string</code> | No | 'spot' or 'swap', default is 'spot' if symbol is not provided |
aster.watchMyTrades ([symbol, since, limit, params])