StarkFiStarkFi

Trading Commands

Token swaps and multi-swap via Fibrous, AVNU, Ekubo, or auto routing

Prerequisite: All trading commands require an active authenticated session. Run starkfi auth login first.

trade

Swaps one token for another using the best available route via Fibrous (default), AVNU, Ekubo, or auto to race all providers.

starkfi trade <amount> <fromToken> <toToken> [flags]

Arguments:

ArgumentDescription
amountAmount to swap (e.g., 0.1, 100)
fromTokenSource token symbol (e.g., ETH, USDC)
toTokenDestination token symbol (e.g., STRK, DAI)

Flags:

FlagDefaultDescription
-p, --provider <name>fibrousSwap provider: fibrous, avnu, ekubo, or auto
-s, --slippage <percent>1Maximum slippage tolerance (%)
--simulatefalseEstimate fees without executing
--jsonfalseOutput raw JSON

Examples:

starkfi trade 0.5 ETH USDC
starkfi trade 100 USDC STRK --slippage 0.5
starkfi trade 0.1 ETH DAI --simulate
starkfi trade 50 STRK USDC --json

Tip: Use --simulate first to preview the route and estimated fees before committing. Simulation fees are always displayed in STRK.


multi-swap

Executes up to 3 swap pairs in a single multicall transaction. More gas-efficient than separate trades.

starkfi multi-swap "<amount> <from>><to>, <amount> <from>><to>"

Pair format: <amount> <from>><to> — separate pairs with commas.

Flags:

FlagDefaultDescription
-p, --provider <name>fibrousSwap provider: fibrous, avnu, ekubo, or auto
-s, --slippage <percent>1Maximum slippage tolerance (%)
--simulatefalseEstimate fees without executing
--jsonfalseOutput raw JSON

Examples:

starkfi multi-swap "100 USDC>ETH, 50 USDC>STRK"
starkfi multi-swap "0.1 ETH>USDC, 0.05 ETH>STRK" --slippage 0.5
starkfi multi-swap "100 USDC>ETH, 50 STRK>ETH" --simulate

Note: Minimum 2, maximum 3 swap pairs per transaction.


MCP equivalent: Trade Toolsget_swap_quote, swap_tokens, get_multi_swap_quote, multi_swap, batch_execute

Edit on GitHub

Last updated on

On this page