Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.base.org/llms.txt

Use this file to discover all available pages before exploring further.

Avantis is a perpetual futures DEX on Base mainnet. The plugin fetches unsigned calldata from the Avantis tx-builder (tx-builder.avantisfi.com) from a CLI-capable harness and executes it through Base MCP’s send_calls. Collateral is USDC; ETH is used only for gas and execution fees. Chain: Base mainnet. Operations: open trade (market, limit, stop-limit, zero-fee), close, cancel, update margin, set TP/SL, approve USDC, set/remove delegate, plus reads for pairs, positions, limit orders, and PnL history.
CLI-only plugin. This plugin requires shell or terminal access for tx-builder HTTP calls. It works in Claude Code, Codex, Cursor terminal, and similar CLI harnesses. It does not work in chat-only environments such as ChatGPT or Claude.ai.

Try it

Open long
Open a 10x long BTC/USD with 100 USDC collateral on Avantis
Limit order
Place a limit long on ETH/USD at 3000 with 50 USDC at 5x
Close
Close my BTC/USD position on Avantis
Set TP/SL
Set TP to 100000 and SL to 80000 on my BTC long

Pattern

Every prepare endpoint returns a single-call envelope ({ ok, data: { to, value, data, chainId } }) that maps to a Base MCP send_calls call with chain: "base". Approval and trade can be batched into one approval. The plugin reads /v2/trading to validate pair, leverage, and minimum notional before building the open call, and reads core /user-data to resolve real position/order indices for management actions.
No additional MCP server is required. Use the harness shell or direct HTTP capability for Avantis reads and tx-builder requests, then submit the unsigned calldata through Base MCP.

Reference

Full plugin spec on GitHub

Endpoint inventory, parameters, unit/scaling rules, batching guidance, and error handling.