Trading Commands
Token swaps and multi-swap via Fibrous aggregation
Prerequisite: All trading commands require an active authenticated session. Run
starkfi auth loginfirst.
trade
Swaps one token for another using the best available route via Fibrous DEX aggregation.
starkfi trade <amount> <fromToken> <toToken> [flags]Arguments:
| Argument | Description |
|---|---|
amount | Amount to swap (e.g., 0.1, 100) |
fromToken | Source token symbol (e.g., ETH, USDC) |
toToken | Destination token symbol (e.g., STRK, DAI) |
Flags:
| Flag | Default | Description |
|---|---|---|
-s, --slippage <percent> | 1 | Maximum slippage tolerance (%) |
--simulate | false | Estimate fees without executing |
--json | false | Output 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 --jsonTip: Use
--simulatefirst 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:
| Flag | Default | Description |
|---|---|---|
-s, --slippage <percent> | 1 | Maximum slippage tolerance (%) |
--simulate | false | Estimate fees without executing |
--json | false | Output 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" --simulateNote: Minimum 2, maximum 3 swap pairs per transaction.
Last updated on