Aerodrome Trading
Read ../../references/unified-runtime.md
before any Superior Trade request. Use the current OpenAPI schema for every
payload and stop if Aerodrome/Freqtrade is not listed as supported.
Overview
Use this skill only for Aerodrome trading on Base through Superior Trade. Aerodrome is spot-only AMM swap execution: no futures, no margin, no shorting, no leverage, no sub-accounts, and no order book.
Production Defaults
- Superior Trade API base URL:
https://unified-api-zag4gzx6gq-an.a.run.app
- Auth header:
x-api-key: $SUPERIOR_TRADE_API_KEY
- Base RPC URL:
https://mainnet.base.org
- Keep setup simple: one pair, one numeric stake amount, static pairlist, market orders, and no orderbook pricing.
Source Of Truth
When behavior is unclear, inspect these local sources before answering:
- Production API:
https://unified-api-zag4gzx6gq-an.a.run.app
Non-Negotiables
- Use
exchange.name: "aerodrome".
- Use only the supported spot pairs:
AERO/USDC and CHECK/USDC. Never use :USDC.
- Omit
trading_mode, or set it to "spot" only.
- Never set
margin_mode, leverage, short entries, or futures fields.
- Set
entry_pricing.use_order_book: false and exit_pricing.use_order_book: false.
- Do not call
self.dp.orderbook(), fetch_order_book, fetch_l2_order_book, or order-book depth checks in strategy code.
- Use market orders. Aerodrome's CCXT adapter supports AMM market swaps, not limit-order-book execution.
- Use explicit numeric
stake_amount. Avoid "unlimited" unless the user explicitly accepts balance exhaustion risk.
- Never include wallet private keys or platform-injected exchange credentials in config.
- Use
https://mainnet.base.org for exchange.ccxt_config.options.rpcUrl unless the user explicitly provides another Base RPC.
- Always backtest before suggesting live deployment.
- Never start live trading without explicit user confirmation.
Wallet And Balance Rules
Aerodrome live trading depends heavily on the Base wallet balances because every order is an on-chain swap.
Before live deployment or when troubleshooting zero trades:
- Verify the wallet has enough quote token for buys, usually USDC.
- Verify it has enough base token for sells, such as AERO for
AERO/USDC.
- Verify it has Base ETH for gas. A small ETH balance is required even when trading USDC pairs.
- Size
stake_amount * max_open_trades below free quote balance and leave room for AMM slippage, token fees, and gas. Prefer 70-90% of available quote balance, lower for small wallets.
- If the wallet balance cannot be checked in the current turn, say it has not been checked. Do not infer or fabricate balances.
Important distinction: Aerodrome uses Base wallet balances directly for on-chain swaps. Do not apply external exchange account rules here.
Supported Markets
Hard-code these Aerodrome/Base market definitions when configuring exchange.ccxt_config.options.markets:
| Symbol |
Base address |
Base decimals |
Quote address |
Quote decimals |
Pool address |
Stable |
AERO/USDC |
0x940181a94A35A4569E4529A3CDfB74e38FD98631 |
18 |
0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 |
6 |
0x6cdcb1c4a4d1c3c6d054b27ac5b77e89eafb971d |
false |
CHECK/USDC |
0x9126236476eFBA9Ad8aB77855c60eB5BF37586Eb |
18 |
0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 |
6 |
0x6a4BeFa1337865071E27c62dc9d7E3bCa253cE0f |
false |
Backtesting data is available for both supported pairs on 5m, 15m, 1h, 4h, and 1d.
Minimum Config
Start from this shape and only change pair_whitelist, timeframe, stake, and strategy parameters. Keep the hard-coded supported markets and no-orderbook fields.
{
"exchange": {
"name": "aerodrome",
"pair_whitelist": ["AERO/USDC"],
"ccxt_config": {
"options": {
"rpcUrl": "https://mainnet.base.org",
"markets": [
{
"symbol": "AERO/USDC",
"baseAddress": "0x940181a94A35A4569E4529A3CDfB74e38FD98631",
"baseDecimals": 18,
"quoteAddress": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"quoteDecimals": 6,
"poolAddress": "0x6cdcb1c4a4d1c3c6d054b27ac5b77e89eafb971d",
"stable": false
},
{
"symbol": "CHECK/USDC",
"baseAddress": "0x9126236476eFBA9Ad8aB77855c60eB5BF37586Eb",
"baseDecimals": 18,
"quoteAddress": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"quoteDecimals": 6,
"poolAddress": "0x6a4BeFa1337865071E27c62dc9d7E3bCa253cE0f",
"stable": false
}
]
}
}
},
"stake_currency": "USDC",
"stake_amount": 10,
"max_open_trades": 1,
"timeframe": "5m",
"stoploss": -0.1,
"minimal_roi": { "0": 0.05 },
"order_types": {
"entry": "market",
"exit": "market",
"force_entry": "market",
"force_exit": "market",
"emergency_exit": "market",
"stoploss": "market",
"stoploss_on_exchange": false
},
"entry_pricing": { "price_side": "other", "use_order_book": false },
"exit_pricing": { "price_side": "other", "use_order_book": false },
"pairlists": [{ "method": "StaticPairList" }]
}
Notes:
stake_currency must appear in the configured markets. For AERO/USDC, use USDC.
- Use
trading_min_order_amount only when the strategy needs an explicit minimum; the API pads Aerodrome configs to 1 when omitted.
- Do not include
dry_run, initial_state, api_server, walletAddress, privateKey, wallet_address, or private_key.
ccxt_async_config is usually unnecessary for Aerodrome authoring unless current API tests show otherwise.
Backtest Workflow
- Build Aerodrome config and Freqtrade strategy code.
- Check data availability with
GET https://unified-api-zag4gzx6gq-an.a.run.app/runtime/backtests/dataset and the query fields published by OpenAPI.
- Create a backtest with
POST https://unified-api-zag4gzx6gq-an.a.run.app/runtime/backtests using framework: "freqtrade", venue: "aerodrome", strategy source/config, instruments, and timerange fields from the current contract.
- Creation queues the run; poll
GET https://unified-api-zag4gzx6gq-an.a.run.app/runtime/backtests/{id} until completed or failed.
- Fetch the backtest record and
GET /runtime/backtests/{id}/logs for full metrics and diagnostics.
- Present total trades, win rate, profit, drawdown, and whether results justify live testing.
Do not offer live deployment after a zero-trade backtest unless the user explicitly wants to debug live behavior.
Live Deployment Workflow
- Create a deployment with
POST https://unified-api-zag4gzx6gq-an.a.run.app/runtime/deployments using top-level framework, venue, mode, name, code, and config fields.
- If credentials are required, use
PUT /runtime/deployments/{id}/credentials with the exact form published by Unified OpenAPI. Never improvise private-key fields.
- Run the pre-deployment checklist below.
- Show a concise live trading summary and wait for explicit confirmation.
- Start with
PUT https://unified-api-zag4gzx6gq-an.a.run.app/runtime/deployments/{id}/status and { "action": "start" }.
- Monitor status and logs with
GET https://unified-api-zag4gzx6gq-an.a.run.app/runtime/deployments/{id} and GET https://unified-api-zag4gzx6gq-an.a.run.app/runtime/deployments/{id}/logs.
- Stop with
PUT https://unified-api-zag4gzx6gq-an.a.run.app/runtime/deployments/{id}/status and { "action": "stop" }.
Pre-Deployment Checklist
- Backtest completed and was reviewed.
- Config is Aerodrome spot-only and has no
margin_mode, leverage, shorting, or :USDC pair suffix.
entry_pricing.use_order_book and exit_pricing.use_order_book are false.
stake_amount is numeric and fits wallet balances with gas/slippage buffer.
- Wallet has Base ETH for gas and enough relevant token balance for intended buys/sells.
- Strategy has no custom orderbook or RPC polling.
- User explicitly confirmed live trading.
Use this confirmation format:
Deployment Summary:
- Exchange: aerodrome on Base
- Trading mode: spot only
- Pair: [pair]
- Stake amount: [amount] [stake_currency] per trade
- Max open trades: [n]
- Stoploss: [percentage]
- Order execution: AMM market swaps, no orderbook
- Wallet balance checked: [yes/no, source]
- Base ETH gas checked: [yes/no, source]
This will trade with real funds. Proceed? (yes/no)
Reference files
Load on demand.
| Read |
When |
references/api.md |
You need endpoint shapes or a complete AERO/USDC backtest payload. |
references/strategy-template.md |
You are writing or adapting the strategy code. |
references/troubleshooting.md |
A swap failed, gas is short, or a deployment trades zero times. |
1---2name: aerodrome3description: Use when creating, validating, backtesting, deploying, sizing, or troubleshooting Aerodrome/Base spot trading strategies through the Superior Trade API, especially Freqtrade configs using exchange.name "aerodrome", AERO/USDC or CHECK/USDC pairs, AMM market swaps, wallet/gas balance checks, no-orderbook pricing, or Aerodrome live deployment safety.4---56# Aerodrome Trading78Read [`../../references/unified-runtime.md`](../../references/unified-runtime.md)9before any Superior Trade request. Use the current OpenAPI schema for every10payload and stop if Aerodrome/Freqtrade is not listed as supported.1112## Overview1314Use this skill only for Aerodrome trading on Base through Superior Trade. Aerodrome is spot-only AMM swap execution: no futures, no margin, no shorting, no leverage, no sub-accounts, and no order book.1516## Production Defaults1718- Superior Trade API base URL: `https://unified-api-zag4gzx6gq-an.a.run.app`19- Auth header: `x-api-key: $SUPERIOR_TRADE_API_KEY`20- Base RPC URL: `https://mainnet.base.org`21- Keep setup simple: one pair, one numeric stake amount, static pairlist, market orders, and no orderbook pricing.2223## Source Of Truth2425When behavior is unclear, inspect these local sources before answering:2627- Production API: `https://unified-api-zag4gzx6gq-an.a.run.app`2829## Non-Negotiables3031- Use `exchange.name: "aerodrome"`.32- Use only the supported spot pairs: `AERO/USDC` and `CHECK/USDC`. Never use `:USDC`.33- Omit `trading_mode`, or set it to `"spot"` only.34- Never set `margin_mode`, `leverage`, short entries, or futures fields.35- Set `entry_pricing.use_order_book: false` and `exit_pricing.use_order_book: false`.36- Do not call `self.dp.orderbook()`, `fetch_order_book`, `fetch_l2_order_book`, or order-book depth checks in strategy code.37- Use market orders. Aerodrome's CCXT adapter supports AMM market swaps, not limit-order-book execution.38- Use explicit numeric `stake_amount`. Avoid `"unlimited"` unless the user explicitly accepts balance exhaustion risk.39- Never include wallet private keys or platform-injected exchange credentials in config.40- Use `https://mainnet.base.org` for `exchange.ccxt_config.options.rpcUrl` unless the user explicitly provides another Base RPC.41- Always backtest before suggesting live deployment.42- Never start live trading without explicit user confirmation.4344## Wallet And Balance Rules4546Aerodrome live trading depends heavily on the Base wallet balances because every order is an on-chain swap.4748Before live deployment or when troubleshooting zero trades:49501. Verify the wallet has enough quote token for buys, usually USDC.512. Verify it has enough base token for sells, such as AERO for `AERO/USDC`.523. Verify it has Base ETH for gas. A small ETH balance is required even when trading USDC pairs.534. Size `stake_amount * max_open_trades` below free quote balance and leave room for AMM slippage, token fees, and gas. Prefer 70-90% of available quote balance, lower for small wallets.545. If the wallet balance cannot be checked in the current turn, say it has not been checked. Do not infer or fabricate balances.5556Important distinction: Aerodrome uses Base wallet balances directly for on-chain swaps. Do not apply external exchange account rules here.5758## Supported Markets5960Hard-code these Aerodrome/Base market definitions when configuring `exchange.ccxt_config.options.markets`:6162| Symbol | Base address | Base decimals | Quote address | Quote decimals | Pool address | Stable |63| --- | --- | ---: | --- | ---: | --- | --- |64| `AERO/USDC` | `0x940181a94A35A4569E4529A3CDfB74e38FD98631` | 18 | `0x833589fcd6edb6e08f4c7c32d4f71b54bda02913` | 6 | `0x6cdcb1c4a4d1c3c6d054b27ac5b77e89eafb971d` | false |65| `CHECK/USDC` | `0x9126236476eFBA9Ad8aB77855c60eB5BF37586Eb` | 18 | `0x833589fcd6edb6e08f4c7c32d4f71b54bda02913` | 6 | `0x6a4BeFa1337865071E27c62dc9d7E3bCa253cE0f` | false |6667Backtesting data is available for both supported pairs on `5m`, `15m`, `1h`, `4h`, and `1d`.6869## Minimum Config7071Start from this shape and only change `pair_whitelist`, timeframe, stake, and strategy parameters. Keep the hard-coded supported markets and no-orderbook fields.7273```json74{75 "exchange": {76 "name": "aerodrome",77 "pair_whitelist": ["AERO/USDC"],78 "ccxt_config": {79 "options": {80 "rpcUrl": "https://mainnet.base.org",81 "markets": [82 {83 "symbol": "AERO/USDC",84 "baseAddress": "0x940181a94A35A4569E4529A3CDfB74e38FD98631",85 "baseDecimals": 18,86 "quoteAddress": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",87 "quoteDecimals": 6,88 "poolAddress": "0x6cdcb1c4a4d1c3c6d054b27ac5b77e89eafb971d",89 "stable": false90 },91 {92 "symbol": "CHECK/USDC",93 "baseAddress": "0x9126236476eFBA9Ad8aB77855c60eB5BF37586Eb",94 "baseDecimals": 18,95 "quoteAddress": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",96 "quoteDecimals": 6,97 "poolAddress": "0x6a4BeFa1337865071E27c62dc9d7E3bCa253cE0f",98 "stable": false99 }100 ]101 }102 }103 },104 "stake_currency": "USDC",105 "stake_amount": 10,106 "max_open_trades": 1,107 "timeframe": "5m",108 "stoploss": -0.1,109 "minimal_roi": { "0": 0.05 },110 "order_types": {111 "entry": "market",112 "exit": "market",113 "force_entry": "market",114 "force_exit": "market",115 "emergency_exit": "market",116 "stoploss": "market",117 "stoploss_on_exchange": false118 },119 "entry_pricing": { "price_side": "other", "use_order_book": false },120 "exit_pricing": { "price_side": "other", "use_order_book": false },121 "pairlists": [{ "method": "StaticPairList" }]122}123```124125Notes:126127- `stake_currency` must appear in the configured markets. For `AERO/USDC`, use `USDC`.128- Use `trading_min_order_amount` only when the strategy needs an explicit minimum; the API pads Aerodrome configs to `1` when omitted.129- Do not include `dry_run`, `initial_state`, `api_server`, `walletAddress`, `privateKey`, `wallet_address`, or `private_key`.130- `ccxt_async_config` is usually unnecessary for Aerodrome authoring unless current API tests show otherwise.131132## Backtest Workflow1331341. Build Aerodrome config and Freqtrade strategy code.1352. Check data availability with `GET https://unified-api-zag4gzx6gq-an.a.run.app/runtime/backtests/dataset` and the query fields published by OpenAPI.1363. Create a backtest with `POST https://unified-api-zag4gzx6gq-an.a.run.app/runtime/backtests` using `framework: "freqtrade"`, `venue: "aerodrome"`, strategy source/config, instruments, and timerange fields from the current contract.1374. Creation queues the run; poll `GET https://unified-api-zag4gzx6gq-an.a.run.app/runtime/backtests/{id}` until `completed` or `failed`.1385. Fetch the backtest record and `GET /runtime/backtests/{id}/logs` for full metrics and diagnostics.1396. Present total trades, win rate, profit, drawdown, and whether results justify live testing.140141Do not offer live deployment after a zero-trade backtest unless the user explicitly wants to debug live behavior.142143## Live Deployment Workflow1441451. Create a deployment with `POST https://unified-api-zag4gzx6gq-an.a.run.app/runtime/deployments` using top-level `framework`, `venue`, `mode`, `name`, `code`, and `config` fields.1462. If credentials are required, use `PUT /runtime/deployments/{id}/credentials` with the exact form published by Unified OpenAPI. Never improvise private-key fields.1473. Run the pre-deployment checklist below.1484. Show a concise live trading summary and wait for explicit confirmation.1495. Start with `PUT https://unified-api-zag4gzx6gq-an.a.run.app/runtime/deployments/{id}/status` and `{ "action": "start" }`.1506. Monitor status and logs with `GET https://unified-api-zag4gzx6gq-an.a.run.app/runtime/deployments/{id}` and `GET https://unified-api-zag4gzx6gq-an.a.run.app/runtime/deployments/{id}/logs`.1517. Stop with `PUT https://unified-api-zag4gzx6gq-an.a.run.app/runtime/deployments/{id}/status` and `{ "action": "stop" }`.152153### Pre-Deployment Checklist154155- Backtest completed and was reviewed.156- Config is Aerodrome spot-only and has no `margin_mode`, leverage, shorting, or `:USDC` pair suffix.157- `entry_pricing.use_order_book` and `exit_pricing.use_order_book` are false.158- `stake_amount` is numeric and fits wallet balances with gas/slippage buffer.159- Wallet has Base ETH for gas and enough relevant token balance for intended buys/sells.160- Strategy has no custom orderbook or RPC polling.161- User explicitly confirmed live trading.162163Use this confirmation format:164165```text166Deployment Summary:167- Exchange: aerodrome on Base168- Trading mode: spot only169- Pair: [pair]170- Stake amount: [amount] [stake_currency] per trade171- Max open trades: [n]172- Stoploss: [percentage]173- Order execution: AMM market swaps, no orderbook174- Wallet balance checked: [yes/no, source]175- Base ETH gas checked: [yes/no, source]176177This will trade with real funds. Proceed? (yes/no)178```179180181## Reference files182183Load on demand.184185| Read | When |186| --- | --- |187| `references/api.md` | You need endpoint shapes or a complete AERO/USDC backtest payload. |188| `references/strategy-template.md` | You are writing or adapting the strategy code. |189| `references/troubleshooting.md` | A swap failed, gas is short, or a deployment trades zero times. |