aftermath
aftermath cryptocurrency exchange — CCXT unified API: methods, parameters and endpoints.
aftermath
Kind: global class
Extends: Exchange
- fetchCurrencies
- fetchMarkets
- fetchTradingFee
- fetchTicker
- fetchOrderBook
- fetchTrades
- fetchOHLCV
- fetchBalance
- fetchAccounts
- fetchOpenOrders
- fetchPosition
- fetchPositions
- createOrder
- createOrders
- cancelOrder
- cancelOrders
- addMargin
- reduceMargin
- transfer
- withdraw
- setLeverage
- signTxEd25519
- watchTrades
- watchOrderBook
- watchPositions
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
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| params | object | No | extra 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
| 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 |
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
| 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 |
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
| 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 |
| params.until | int | No | the 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
| 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 | max=1000, max=100 when since is defined and is less than (now - (999 * (timeframe in ms))) |
| params | object | No | extra 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
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.account | string | No | account 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
| Param | Type | Required | Description |
|---|---|---|---|
| params | object | No | extra 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
| 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.accountNumber | int | No | account 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol of the market the position is held in |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.accountNumber | int | No | account 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
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string> | Yes | list of unified market symbols |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.accountNumber | int | No | account 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
- https://testnet.aftermath.finance/docs/#/CCXT/build_create_orders
- https://testnet.aftermath.finance/docs/#/CCXT/submit_create_orders
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified symbol of the market to create an order in |
| type | string | Yes | 'market' or 'limit' |
| side | string | Yes | 'buy' or 'sell' |
| amount | float | Yes | how much of currency you want to trade in units of base currency |
| price | float | No | the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.reduceOnly | bool | No | true or false whether the order is reduce-only |
| params.account | Account | No | account 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
- https://testnet.aftermath.finance/docs/#/CCXT/build_create_orders
- https://testnet.aftermath.finance/docs/#/CCXT/submit_create_orders
| Param | Type | Required | Description |
|---|---|---|---|
| orders | Array | Yes | list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.account | Account | No | account id to use, required |
aftermath.createOrders (orders, params?)cancelOrder
cancels an open order
Kind: instance method of aftermath
Returns: object - An order structure
See
- https://testnet.aftermath.finance/docs/#/CCXT/build_cancel_orders
- https://testnet.aftermath.finance/docs/#/CCXT/submit_cancel_orders
| 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 |
aftermath.cancelOrder (id, symbol, params?)cancelOrders
cancel multiple orders
Kind: instance method of aftermath
Returns: Array<Order> - an list of order structures
See
- https://testnet.aftermath.finance/docs/#/CCXT/build_cancel_orders
- https://testnet.aftermath.finance/docs/#/CCXT/submit_cancel_orders
| 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 |
| params.account | Account | No | account to cancel orders for, required |
aftermath.cancelOrders (ids, symbol?, params?)addMargin
add margin
Kind: instance method of aftermath
Returns: object - a margin structure
See
- https://testnet.aftermath.finance/docs/#/CCXT/build_allocate
- https://testnet.aftermath.finance/docs/#/CCXT/submit_allocate
| 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 |
| params.account | Account | No | account 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
- https://testnet.aftermath.finance/docs/#/CCXT/build_deallocate
- https://testnet.aftermath.finance/docs/#/CCXT/submit_deallocate
| Param | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | unified market symbol |
| amount | float | Yes | amount of margin to remove |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.account | Account | No | account 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
- https://testnet.aftermath.finance/docs/#/CCXT/build_deposit
- https://testnet.aftermath.finance/docs/#/CCXT/submit_deposit
| 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 |
aftermath.transfer (code, amount, fromAccount, toAccount, params?)withdraw
make a withdrawal
Kind: instance method of aftermath
Returns: object - a transaction structure
See
- https://testnet.aftermath.finance/docs/#/CCXT/build_withdraw
- https://testnet.aftermath.finance/docs/#/CCXT/submit_withdraw
| 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 |
| params.account | Account | No | account 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
- https://testnet.aftermath.finance/docs/#/CCXT/build_set_leverage
- https://testnet.aftermath.finance/docs/#/CCXT/submit_set_leverage
| Param | Type | Required | Description |
|---|---|---|---|
| leverage | float | Yes | the rate of leverage |
| symbol | string | Yes | unified market symbol |
| params | object | No | extra parameters specific to the exchange API endpoint |
| params.account | Account | No | account 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
| Param | Type | Required | Description |
|---|---|---|---|
| tx | object | No | transaction 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
| 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 |
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
| 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 |
aftermath.watchOrderBook (symbol, limit?, params?)watchPositions
watch all open positions
Kind: instance method of aftermath
Returns: Array<object> - a list of position structure
| Param | Type | Required | Description |
|---|---|---|---|
| symbols | Array<string>, undefined | Yes | list of unified market symbols |
| since | int | No | the earliest time in ms to fetch positions for |
| limit | int | No | the maximum number of position structures to retrieve |
| params | object | Yes | extra parameters specific to the exchange API endpoint |
| params.accountNumber | int | No | account number to query orders for, required |
aftermath.watchPositions (symbols, since?, limit?, params)