CCXT
aftermath

aftermath

aftermath cryptocurrency exchange — CCXT unified API: methods, parameters and endpoints.

aftermath

Kind: global class
Extends: Exchange

fetchCurrencies

fetches all available currencies on an exchange

Kind: instance method of aftermath
Returns: object - an associative dictionary of currencies

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

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
aftermath.fetchCurrencies (params?)

fetchMarkets

retrieves data on all markets for woo

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

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

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
aftermath.fetchMarkets (params?)

fetchTradingFee

fetch the trading fees for a market

Kind: instance method of aftermath
Returns: object - a fee structure

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
aftermath.fetchTradingFee (symbol, 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 aftermath
Returns: object - a ticker structure

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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the ticker for
paramsobjectNoextra parameters specific to the exchange API endpoint
aftermath.fetchTicker (symbol, params?)

fetchOrderBook

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

Kind: instance method of aftermath
Returns: object - A dictionary of order book structures

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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
limitintNothe maximum amount of order book entries to return
paramsobjectNoextra parameters specific to the exchange API endpoint
aftermath.fetchOrderBook (symbol, limit?, params?)

fetchTrades

get the list of most recent trades for a particular symbol

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

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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch trades for
sinceintNotimestamp in ms of the earliest trade to fetch
limitintNothe maximum amount of trades to fetch
paramsobjectNoextra parameters specific to the exchange API endpoint
params.untilintNothe latest time in ms to fetch trades for
aftermath.fetchTrades (symbol, since?, limit?, params?)

fetchOHLCV

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

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

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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch OHLCV data for
timeframestringYesthe length of time each candle represents
sinceintNotimestamp in ms of the earliest candle to fetch
limitintNomax=1000, max=100 when since is defined and is less than (now - (999 * (timeframe in ms)))
paramsobjectNoextra parameters specific to the exchange API endpoint
aftermath.fetchOHLCV (symbol, timeframe, since?, limit?, params?)

fetchBalance

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

Kind: instance method of aftermath
Returns: object - a balance structure

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

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountstringNoaccount object ID, required
aftermath.fetchBalance (params?)

fetchAccounts

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

Kind: instance method of aftermath
Returns: Array - a list of account structures

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

ParamTypeRequiredDescription
paramsobjectNoextra parameters specific to the exchange API endpoint
aftermath.fetchAccounts (params?)

fetchOpenOrders

fetch all unfilled currently open orders

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

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol
sinceintNothe earliest time in ms to fetch open orders for
limitintNothe maximum number of open orders structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountNumberintNoaccount number to query orders for, required
aftermath.fetchOpenOrders (symbol, since?, limit?, params?)

fetchPosition

fetch data on an open position

Kind: instance method of aftermath
Returns: object - a position structure

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market the position is held in
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountNumberintNoaccount number to query positions for, required
aftermath.fetchPosition (symbol, params?)

fetchPositions

fetch all open positions

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

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

ParamTypeRequiredDescription
symbolsArray<string>Yeslist of unified market symbols
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountNumberintNoaccount number to query positions for, required
aftermath.fetchPositions (symbols, params?)

createOrder

create a trade order

Kind: instance method of aftermath
Returns: object - an order structure

See

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to create an order in
typestringYes'market' or 'limit'
sidestringYes'buy' or 'sell'
amountfloatYeshow much of currency you want to trade in units of base currency
pricefloatNothe price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
paramsobjectNoextra parameters specific to the exchange API endpoint
params.reduceOnlyboolNotrue or false whether the order is reduce-only
params.accountAccountNoaccount id to use, required
aftermath.createOrder (symbol, type, side, amount, price?, params?)

createOrders

create a list of trade orders

Kind: instance method of aftermath
Returns: object - an order structure

See

ParamTypeRequiredDescription
ordersArrayYeslist of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountAccountNoaccount id to use, required
aftermath.createOrders (orders, params?)

cancelOrder

cancels an open order

Kind: instance method of aftermath
Returns: object - An order structure

See

ParamTypeRequiredDescription
idstringYesorder id
symbolstringYesunified symbol of the market the order was made in
paramsobjectNoextra parameters specific to the exchange API endpoint
aftermath.cancelOrder (id, symbol, params?)

cancelOrders

cancel multiple orders

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

See

ParamTypeRequiredDescription
idsArray<string>Yesorder ids
symbolstringNounified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountAccountNoaccount to cancel orders for, required
aftermath.cancelOrders (ids, symbol?, params?)

addMargin

add margin

Kind: instance method of aftermath
Returns: object - a margin structure

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol
amountfloatYesamount of margin to add
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountAccountNoaccount id to use, required
aftermath.addMargin (symbol, amount, params?)

reduceMargin

remove margin from a position

Kind: instance method of aftermath
Returns: object - a margin structure

See

ParamTypeRequiredDescription
symbolstringYesunified market symbol
amountfloatYesamount of margin to remove
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountAccountNoaccount id to use, required
aftermath.reduceMargin (symbol, amount, params?)

transfer

transfer currency internally between wallets on the same account

Kind: instance method of aftermath
Returns: object - a transfer structure

See

ParamTypeRequiredDescription
codestringYesunified currency code
amountfloatYesamount to transfer
fromAccountstringYesaccount to transfer from
toAccountstringYesaccount to transfer to
paramsobjectNoextra parameters specific to the exchange API endpoint
aftermath.transfer (code, amount, fromAccount, toAccount, params?)

withdraw

make a withdrawal

Kind: instance method of aftermath
Returns: object - a transaction structure

See

ParamTypeRequiredDescription
codestringYesunified currency code
amountfloatYesthe amount to withdraw
addressstringYesthe address to withdraw to
tagstringYes
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountAccountNoaccount id to use, required
aftermath.withdraw (code, amount, address, tag, params?)

setLeverage

set the level of leverage for a market

Kind: instance method of aftermath
Returns: object - response from the exchange

See

ParamTypeRequiredDescription
leveragefloatYesthe rate of leverage
symbolstringYesunified market symbol
paramsobjectNoextra parameters specific to the exchange API endpoint
params.accountAccountNoaccount id to use, required
aftermath.setLeverage (leverage, symbol, params?)

signTxEd25519

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

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

ParamTypeRequiredDescription
txobjectNotransaction bytes and the signing digest for them
aftermath.signTxEd25519 (tx?)

watchTrades

watches information on multiple trades made in a market

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

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

ParamTypeRequiredDescription
symbolstringYesunified market symbol of the market trades were made in
sinceintNothe earliest time in ms to fetch trades for
limitintNothe maximum number of trade structures to retrieve
paramsobjectNoextra parameters specific to the exchange API endpoint
aftermath.watchTrades (symbol, since?, limit?, params?)

watchOrderBook

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

Kind: instance method of aftermath
Returns: object - A dictionary of order book structures

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

ParamTypeRequiredDescription
symbolstringYesunified symbol of the market to fetch the order book for
limitintNothe maximum amount of order book entries to return.
paramsobjectNoextra parameters specific to the exchange API endpoint
aftermath.watchOrderBook (symbol, limit?, params?)

watchPositions

watch all open positions

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

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

ParamTypeRequiredDescription
symbolsArray<string>, undefinedYeslist of unified market symbols
sinceintNothe earliest time in ms to fetch positions for
limitintNothe maximum number of position structures to retrieve
paramsobjectYesextra parameters specific to the exchange API endpoint
params.accountNumberintNoaccount number to query orders for, required
aftermath.watchPositions (symbols, since?, limit?, params)

On this page