Type/to search
Built-in Functions
Structures
Built-in Variables and Constants
Conventions
Exchanges
Capability Matrix
Centralized Exchanges
Decentralized Exchanges (DEX)
Hyperliquid
Lighter
edgeX
Aster
Aevo
Pendle
WOOFi Pro
Uniswap / PancakeSwap
Aerodrome / Velodrome
KyberSwap
1inch
EVM DEX Common Commands
Jupiter
OKX DEX
DEX Strategy Examples
Prediction Markets
Securities and Futures
On-chain & Custom

USDC perpetual contracts and USDC options. Queries, cancellations and leverage changes are signed with the API key; orders, order amendments and conditional orders are additionally signed (EIP-712) with a signing key registered on the Aevo account (the "Signing Key" option).

Names and Configuration

exchange.GetName(): Futures_Aevo (Futures).

FieldRequiredDescription
Access KeyYesThe Aevo API key, sent as the AEVO-KEY header of private endpoints.
Secret KeyYesThe Aevo API secret, used for the HMAC-SHA256 signature of private endpoints.
Signing KeyYesThe EIP-712 signing private key registered on the Aevo account (0x plus 64 hex digits), used for orders, order amendments and conditional orders. (more below the table)

The rest of the longer descriptions in the table:

  • Signing Key: Generate it on Aevo's settings page (https://app.aevo.xyz/settings, not the API Keys page); it expires automatically one week after generation, after which a new one must be generated and entered here. Without it, placing or amending orders and creating conditional orders fail, while queries, cancellations and leverage settings still work; it can also be set at run time with exchange.IO("signingKey", key).

Trading Pairs and Contract Codes

Pair examples: BTC_USDC, ETH_USDC

Aevo quotes and settles in USDC; trading pairs are written as ETH_USDC, and any quote currency other than USDC is rejected.

Contract codeDescription
swapPerpetual contract (exchange code ETH-PERP); the full symbol looks like ETH_USDC.swap.

Aevo has no delivery contracts; any contract code other than swap and option codes is rejected.

Exchange-specific IO Commands
CommandArgumentsDescriptionReturns
signingKeystringSet the EIP-712 signing private key (0x plus 64 hex digits) used for orders by this exchange object, overriding the "Signing Key" option for the current run only. The signing key is generated and registered on the account when an API key is created on the Aevo website; it has an expiry and must be regenerated after it expires.The wallet address of the key, to check against the signing key list on the Aevo website; an error if the key is malformed. Registration is not checked here; an unregistered key fails when an order is placed.
apimethod, path[, params[, raw[, sign]]]Call an Aevo endpoint directly. (more below the table)The raw exchange response; an error is raised when the response carries error.

The rest of the longer descriptions in the table:

  • api: Public paths (/markets, /statistics, /orderbook, /instrument/..., /funding, /coingecko-statistics; for a full URL path, its path part decides) are unsigned by default and other paths are signed with the API key (AEVO-KEY, AEVO-SIGNATURE and related headers); sign set to true/false (it may also be given directly as the 4th argument) forces signing on or off. GET parameters go into the query string, other methods send a JSON body (numbers and booleans keep their types). raw is not a request body but a parameter table (a JSON object, a JSON string or a=1&b=2) that replaces params entirely when non-empty. Orders are not EIP-712-signed for the caller.

For the common commands base and currency see exchange.IO.

Common Usage
Query markets and the account with api, and switch to another signing key
javascript
function main() { // Public paths are unsigned by default var q = {asset: "ETH", instrument_type: "PERPETUAL"} var markets = exchange.IO("api", "GET", "/markets", q) Log(markets[0].instrument_name, "mark price:", markets[0].mark_price) // Other paths are signed with the API key by default var account = exchange.IO("api", "GET", "/account") Log("Available balance:", account.available_balance, "positions:", account.positions.length) // Switch to another registered signing key for this run only; the key's wallet address // is returned, to check against the signing key list on the Aevo website var addr = exchange.IO("signingKey", "0x...") // replace with the signing private key Log("Signing key address:", addr) }

Function Support

Not supported (the call fails with an error and returns null): exchange.GetTickers.

Served through a fallback:

  • exchange.GetRecords: The exchange has no K-line endpoint; bars are synthesized by the docker from trades. The first call covers only the few bars spanned by recent trades, and more accumulate with later calls. The result is empty while the contract has no trades.

Margin, Account and Simulation

Margin mode: Aevo uses a unified margin account with no cross/isolated switch; the margin mode in exchange.GetPositions() follows the exchange (the position's margin_type, falling back to the account's setting for that contract), and option positions without a per-contract setting are cross. exchange.SetMarginLevel() sets leverage per perpetual contract; options are not supported. A position's MarginLevel is the contract's leverage (the position's leverage, falling back to the account's setting for that contract; 0 for options), and Margin is the initial margin held by the position (initial_margin).

Position mode: One-way (net) positions only, no hedge mode. Closing orders (closebuy, closesell) are placed as reduce-only.

Account: In exchange.GetAccount(), Balance is the available USDC balance, FrozenBalance the initial margin in use and Equity the account equity; collateral other than USDC is listed per currency in exchange.GetAssets().

Options

Aevo USDC options are supported; orders, cancellations and queries use the same interfaces as perpetuals. Limitations:

  • The result of exchange.GetMarkets() includes option contracts (active ones only), and exchange.SetContractType() validates option codes against it.
  • Last in exchange.GetTicker() is the mark price; Buy and Sell are 0 when nobody is quoting; Open, High and Low are 0.
  • exchange.SetMarginLevel() and exchange.GetFundings() are not supported.
  • Prices and amounts are signed as 6-decimal fixed point; a non-zero price or amount below 0.000001 is rejected.

Option code examples: ETH-30JUN23-1600-C, ETH-24SEP27-2800-P

Option codes are Aevo native codes: underlying-expiry (DDMMMYY)-strike-C/P, C for a call and P for a put. Options settle in USDC; set the trading pair to the underlying plus _USDC (the underlying must match the pair's base currency), the full symbol looks like ETH_USDC.ETH-30JUN23-1600-C.

Notes
  • Limit orders only; market orders are rejected. Conditional orders (take-profit, stop-loss) need a limit order price; market take-profit/stop-loss and OCO are not supported.
  • Order options go in the last object argument: {tif: "ioc"}, {tif: "fok"} and {postOnly: true} map to the exchange's IOC, FOK and post-only; other keys are merged into the order request body as they are (overriding fields of the same name built by the connector).
  • exchange.ModifyOrder() and exchange.ModifyConditionOrder() have the exchange re-issue the order and return a new order ID, which should be used from then on; exchange.ModifyOrder() keeps the original order's reduce-only flag. The exchange keeps reporting a conditional order replaced by exchange.ModifyConditionOrder() as open (it is no longer in the open order list, and cancelling it fails with ORDER_DOES_NOT_EXIST); for conditional orders modified within the same docker process, exchange.GetConditionOrder(original ID) checks the open order list and returns canceled, while orders modified after a restart or by another process are returned as the exchange reports them.
  • When the order query has no average fill price, exchange.GetOrder() and exchange.GetConditionOrder() compute AvgPrice for orders with fills from the exchange's trade history (volume-weighted, one or a few extra requests), and cache the result for finished orders; AvgPrice is 0 while the fills have not been recorded yet.
  • For perpetuals, Last in exchange.GetTicker() is the mark price and Open the mark price 24 hours ago; there is no high or low (High and Low are 0), and Volume is the 24-hour volume in contracts.
  • Funding is settled every hour; exchange.GetFundings() returns perpetuals only.
  • exchange.GetHistoryOrders() and exchange.GetHistoryConditionOrders() query one symbol at a time; an empty string (all symbols) is rejected.