Skills Overview
Detailed documentation for each OpenOcean skill.
quote
Get the best swap route and price for a token pair.
1 /quote 1 ETH to USDC on ethereum 2
3 /quote 100 USDC to WBTC on arbitrum 4
5 /quote 0.5 WBTC to DAI on polygon
Returns: expected output amount, USD value, exchange rate, estimated gas, and route path (DEXes used).
swap-build
Build a full swap transaction, including the route and encoded calldata. Requires a sender address. Shows quote details such as rate, minimum output, and gas, then asks for confirmation before building.
1 /swap-build 100 USDC to ETH on arbitrum from 0xYourAddress 2
3 /swap-build 1 ETH to USDC on ethereum from 0xYourAddress slippage 100
Returns: encoded calldata, router address, transaction value, gas estimate, minimum output after slippage. Does not submit on-chain.
swap-execute
Execute a previously built swap on-chain using Foundry's cast send. Consumes swap-build output and broadcasts it.
1 /swap-execute
Requires Foundry (cast). Supports multiple wallet options, including environment variables, Ledger, Trezor, or a keystore. Asks for confirmation before execution because the transaction is irreversible.
swap-execute-fast
Build and execute a swap in one step, with no confirmation prompt.
1 /swap-execute-fast 1 ETH to USDC on base from 0xYourAddress 2
3 /swap-execute-fast 100 USDC to ETH on arbitrum from 0xYourAddress keystore mykey 4
5 /swap-execute-fast 0.5 WBTC to DAI on polygon from 0xYourAddress ledger
Danger
Requires cast, curl, and jq. Extremely dangerous: builds and executes immediately with no confirmation. Use only when you fully trust the parameters and understand the risks.