Back to Ccxt

Aftermath

wiki/exchanges/aftermath.md

4.5.6021.6 KB
Original Source

<a name="aftermath" id="aftermath"></a>

aftermath{docsify-ignore}

Kind: global class
Extends: <code>Exchange</code>

<a name="fetchCurrencies" id="fetchcurrencies"></a>

fetchCurrencies{docsify-ignore}

fetches all available currencies on an exchange

Kind: instance method of <code>aftermath</code>
Returns: <code>object</code> - an associative dictionary of currencies

See: https://testnet.aftermath.finance/docs/#/CCXT/currencies

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
aftermath.fetchCurrencies (params?)

<a name="fetchMarkets" id="fetchmarkets"></a>

fetchMarkets{docsify-ignore}

retrieves data on all markets for woo

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

See: https://testnet.aftermath.finance/docs/#/CCXT/markets

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
aftermath.fetchMarkets (params?)

<a name="fetchTradingFee" id="fetchtradingfee"></a>

fetchTradingFee{docsify-ignore}

fetch the trading fees for a market

Kind: instance method of <code>aftermath</code>
Returns: <code>object</code> - a fee structure

See: https://testnet.aftermath.finance/docs/#/CCXT/markets

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
aftermath.fetchTradingFee (symbol, params?)

<a name="fetchTicker" id="fetchticker"></a>

fetchTicker{docsify-ignore}

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>aftermath</code>
Returns: <code>object</code> - a ticker structure

See: https://testnet.aftermath.finance/docs/#/CCXT/ticker

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the ticker for
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
aftermath.fetchTicker (symbol, params?)

<a name="fetchOrderBook" id="fetchorderbook"></a>

fetchOrderBook{docsify-ignore}

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

Kind: instance method of <code>aftermath</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols

See: https://testnet.aftermath.finance/docs/#/CCXT/orderbook

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the order book for
limit<code>int</code>Nothe maximum amount of order book entries to return
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
aftermath.fetchOrderBook (symbol, limit?, params?)

<a name="fetchTrades" id="fetchtrades"></a>

fetchTrades{docsify-ignore}

get the list of most recent trades for a particular symbol

Kind: instance method of <code>aftermath</code>
Returns: <code>Array<Trade></code> - a list of trade structures

See: https://testnet.aftermath.finance/docs/#/CCXT/trades

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch trades for
since<code>int</code>Notimestamp in ms of the earliest trade to fetch
limit<code>int</code>Nothe maximum amount of trades to fetch
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.until<code>int</code>Nothe latest time in ms to fetch trades for
javascript
aftermath.fetchTrades (symbol, since?, limit?, params?)

<a name="fetchOHLCV" id="fetchohlcv"></a>

fetchOHLCV{docsify-ignore}

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

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

See: https://testnet.aftermath.finance/docs/#/CCXT/ohlcv

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch OHLCV data for
timeframe<code>string</code>Yesthe length of time each candle represents
since<code>int</code>Notimestamp in ms of the earliest candle to fetch
limit<code>int</code>Nomax=1000, max=100 when since is defined and is less than (now - (999 * (timeframe in ms)))
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
aftermath.fetchOHLCV (symbol, timeframe, since?, limit?, params?)

<a name="fetchBalance" id="fetchbalance"></a>

fetchBalance{docsify-ignore}

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

Kind: instance method of <code>aftermath</code>
Returns: <code>object</code> - a balance structure

See: https://testnet.aftermath.finance/docs/#/CCXT/balance

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>string</code>Noaccount object ID, required
javascript
aftermath.fetchBalance (params?)

<a name="fetchAccounts" id="fetchaccounts"></a>

fetchAccounts{docsify-ignore}

query for accounts owned by the walletAddress. An Account is needed for all trading methods.

Kind: instance method of <code>aftermath</code>
Returns: <code>Array</code> - a list of account structures

See: https://testnet.aftermath.finance/docs/#/CCXT/accounts

ParamTypeRequiredDescription
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
aftermath.fetchAccounts (params?)

<a name="fetchOpenOrders" id="fetchopenorders"></a>

fetchOpenOrders{docsify-ignore}

fetch all unfilled currently open orders

Kind: instance method of <code>aftermath</code>
Returns: <code>Array<Order></code> - a list of order structures

See: https://testnet.aftermath.finance/docs/#/CCXT/my_pending_orders

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
since<code>int</code>Nothe earliest time in ms to fetch open orders for
limit<code>int</code>Nothe maximum number of open orders structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.accountNumber<code>int</code>Noaccount number to query orders for, required
javascript
aftermath.fetchOpenOrders (symbol, since?, limit?, params?)

<a name="fetchPosition" id="fetchposition"></a>

fetchPosition{docsify-ignore}

fetch data on an open position

Kind: instance method of <code>aftermath</code>
Returns: <code>object</code> - a position structure

See: https://testnet.aftermath.finance/docs/#/CCXT/positions

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market the position is held in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.accountNumber<code>int</code>Noaccount number to query positions for, required
javascript
aftermath.fetchPosition (symbol, params?)

<a name="fetchPositions" id="fetchpositions"></a>

fetchPositions{docsify-ignore}

fetch all open positions

Kind: instance method of <code>aftermath</code>
Returns: <code>Array<object></code> - a list of position structure

See: https://testnet.aftermath.finance/docs/#/CCXT/positions

ParamTypeRequiredDescription
symbols<code>Array<string></code>Yeslist of unified market symbols
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.accountNumber<code>int</code>Noaccount number to query positions for, required
javascript
aftermath.fetchPositions (symbols, params?)

<a name="createOrder" id="createorder"></a>

createOrder{docsify-ignore}

create a trade order

Kind: instance method of <code>aftermath</code>
Returns: <code>object</code> - an order structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to create an order in
type<code>string</code>Yes'market' or 'limit'
side<code>string</code>Yes'buy' or 'sell'
amount<code>float</code>Yeshow much of currency you want to trade in units of base currency
price<code>float</code>Nothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.reduceOnly<code>bool</code>Notrue or false whether the order is reduce-only
params.account<code>Account</code>Noaccount id to use, required
javascript
aftermath.createOrder (symbol, type, side, amount, price?, params?)

<a name="createOrders" id="createorders"></a>

createOrders{docsify-ignore}

create a list of trade orders

Kind: instance method of <code>aftermath</code>
Returns: <code>object</code> - an order structure

See

ParamTypeRequiredDescription
orders<code>Array</code>Yeslist 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>Noextra parameters specific to the exchange API endpoint
params.account<code>Account</code>Noaccount id to use, required
javascript
aftermath.createOrders (orders, params?)

<a name="cancelOrder" id="cancelorder"></a>

cancelOrder{docsify-ignore}

cancels an open order

Kind: instance method of <code>aftermath</code>
Returns: <code>object</code> - An order structure

See

ParamTypeRequiredDescription
id<code>string</code>Yesorder id
symbol<code>string</code>Yesunified symbol of the market the order was made in
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
aftermath.cancelOrder (id, symbol, params?)

<a name="cancelOrders" id="cancelorders"></a>

cancelOrders{docsify-ignore}

cancel multiple orders

Kind: instance method of <code>aftermath</code>
Returns: <code>Array<Order></code> - an list of order structures

See

ParamTypeRequiredDescription
ids<code>Array<string></code>Yesorder ids
symbol<code>string</code>Nounified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>Account</code>Noaccount to cancel orders for, required
javascript
aftermath.cancelOrders (ids, symbol?, params?)

<a name="addMargin" id="addmargin"></a>

addMargin{docsify-ignore}

add margin

Kind: instance method of <code>aftermath</code>
Returns: <code>object</code> - a margin structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
amount<code>float</code>Yesamount of margin to add
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>Account</code>Noaccount id to use, required
javascript
aftermath.addMargin (symbol, amount, params?)

<a name="reduceMargin" id="reducemargin"></a>

reduceMargin{docsify-ignore}

remove margin from a position

Kind: instance method of <code>aftermath</code>
Returns: <code>object</code> - a margin structure

See

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol
amount<code>float</code>Yesamount of margin to remove
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>Account</code>Noaccount id to use, required
javascript
aftermath.reduceMargin (symbol, amount, params?)

<a name="transfer" id="transfer"></a>

transfer{docsify-ignore}

transfer currency internally between wallets on the same account

Kind: instance method of <code>aftermath</code>
Returns: <code>object</code> - a transfer structure

See

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
amount<code>float</code>Yesamount to transfer
fromAccount<code>string</code>Yesaccount to transfer from
toAccount<code>string</code>Yesaccount to transfer to
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
aftermath.transfer (code, amount, fromAccount, toAccount, params?)

<a name="withdraw" id="withdraw"></a>

withdraw{docsify-ignore}

make a withdrawal

Kind: instance method of <code>aftermath</code>
Returns: <code>object</code> - a transaction structure

See

ParamTypeRequiredDescription
code<code>string</code>Yesunified currency code
amount<code>float</code>Yesthe amount to withdraw
address<code>string</code>Yesthe address to withdraw to
tag<code>string</code>Yes
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>Account</code>Noaccount id to use, required
javascript
aftermath.withdraw (code, amount, address, tag, params?)

<a name="setLeverage" id="setleverage"></a>

setLeverage{docsify-ignore}

set the level of leverage for a market

Kind: instance method of <code>aftermath</code>
Returns: <code>object</code> - response from the exchange

See

ParamTypeRequiredDescription
leverage<code>float</code>Yesthe rate of leverage
symbol<code>string</code>Yesunified market symbol
params<code>object</code>Noextra parameters specific to the exchange API endpoint
params.account<code>Account</code>Noaccount id to use, required
javascript
aftermath.setLeverage (leverage, symbol, params?)

<a name="signTxEd25519" id="signtxed25519"></a>

signTxEd25519{docsify-ignore}

Helper to sign some transaction bytes and return a generic transaction execution request.

Kind: instance method of <code>aftermath</code>
Returns: <code>object</code> - the input transaction bytes and the signed digest

ParamTypeRequiredDescription
tx<code>object</code>Notransaction bytes and the signing digest for them
javascript
aftermath.signTxEd25519 (tx?)

<a name="watchTrades" id="watchtrades"></a>

watchTrades{docsify-ignore}

watches information on multiple trades made in a market

Kind: instance method of <code>aftermath</code>
Returns: <code>Array<object></code> - a list of trade structures

See: https://testnet.aftermath.finance/docs/#/CCXT/service%3A%3Ahandlers%3A%3Accxt%3A%3Astream%3A%3Atrades

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified market symbol of the market trades were made in
since<code>int</code>Nothe earliest time in ms to fetch trades for
limit<code>int</code>Nothe maximum number of trade structures to retrieve
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
aftermath.watchTrades (symbol, since?, limit?, params?)

<a name="watchOrderBook" id="watchorderbook"></a>

watchOrderBook{docsify-ignore}

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

Kind: instance method of <code>aftermath</code>
Returns: <code>object</code> - A dictionary of order book structures indexed by market symbols

See: https://testnet.aftermath.finance/docs/#/CCXT/service%3A%3Ahandlers%3A%3Accxt%3A%3Astream%3A%3Aorderbook

ParamTypeRequiredDescription
symbol<code>string</code>Yesunified symbol of the market to fetch the order book for
limit<code>int</code>Nothe maximum amount of order book entries to return.
params<code>object</code>Noextra parameters specific to the exchange API endpoint
javascript
aftermath.watchOrderBook (symbol, limit?, params?)

<a name="watchPositions" id="watchpositions"></a>

watchPositions{docsify-ignore}

watch all open positions

Kind: instance method of <code>aftermath</code>
Returns: <code>Array<object></code> - a list of position structure

See: https://testnet.aftermath.finance/docs/#/CCXT/service%3A%3Ahandlers%3A%3Accxt%3A%3Astream%3A%3Apositions

ParamTypeRequiredDescription
symbols<code>Array<string></code>, <code>undefined</code>Yeslist of unified market symbols
since<code>int</code>Nothe earliest time in ms to fetch positions for
limit<code>int</code>Nothe maximum number of position structures to retrieve
params<code>object</code>Yesextra parameters specific to the exchange API endpoint
params.accountNumber<code>int</code>Noaccount number to query orders for, required
javascript
aftermath.watchPositions (symbols, since?, limit?, params)