your agent · cli reference

spot

Usage

soulpass spot --sell <token> --buy <token> --amount <amount> [--slippage <bps>] [--quote] [--chain <chain>] [--no-wait] [--session]

Buy/sell tokens or tokenized stocks at market price (a.k.a. swap) from wallet funds, on the route planned by matrix-market (Solana in this release); this device checks every leg against what you typed before signing. One side must be the chain's dollar stablecoin (USDC on Solana): selling it is a buy sized in dollars, buying it is a sell of --amount of the other token. Token-to-token trades are refused — sell for the stablecoin first, then buy.

Hyperliquid perpetuals are not tokens: trade them with soulpass perps market (market price) or soulpass perps order (limit). An hl: instrument on --sell/--buy is refused.

Flags

  • --sell <token> — Token to sell (symbol or mint address) (required)
  • --buy <token> — Token to buy (symbol or mint address) (required)
  • --amount <amount> — Amount to sell, human-readable (required)
  • --slippage <bps> — Max slippage in basis points (default: 50)
  • --quote — Quote only: ask the planner for the legs without executing them
  • --chain <chain> — SOLANA (default); EVM chains are refused for this command in this release
  • --no-wait — Return txHash as soon as it is broadcast. Refused on a multi-step plan (a plan with a move leg is always multi-step). Every Solana leg is simulated before signing, so there is no flag to skip simulation
  • --session — Solana only: consent to a spot session for this trade when none is live — native SOL only, 10 SOL per transaction, 50 SOL over its life; the terms are printed to stderr. Without it such a trade is signed once by the Secure Enclave key and no session is created
  • --account <i> — which wallet account's money: 0 = main (default), 1+ = a portfolio account (Solana only; each trade signed once by the Secure Enclave key, no funding moves)

A Solana trade signs through this device's session when one is live.

Output

The payload reads the plan as the planner sent it: feeBps with feeRaised (true when the planner's minimum fee raised this trade's rate); on a cash buy, funding — read-only facts about the chain's cash (cashUsd, needUsd, shortfallUsd, a stable reason code and a note putting it in words) — with fundingCovered (null = the cash was not read). Each leg's sponsor.mode says who pays its gas (self = this wallet needs the chain's native coin), and a refused or failed leg carries advice — its reason in words, while reason itself stays the stable code an agent branches on. A plan with no legs names why — dust (too small to cover the minimum fee), wsol-ata-exists, insufficient-balance (add cash or trade less) or venue-unreadable (retry shortly — not "no such market") among them. When the trade does not complete the payload is still printed and the command exits non-zero; nothing is rolled back.

When the chain is short of cash: the move leg

The planner puts a money move in front of the trade as leg 0, and the payload gets a top-level move block: amountUsd and arrivesUsd, covers (cash + what arrives ≥ need — this is what fundingCovered reports when a move exists), rail, etaClass / etaSec / settles (a move takes minutes where every trade leg here is seconds), sponsor, then outcome, txHash (gateway:<transferId>), receivedRaw (what this device verified arrived), reason, advice and retryAmountUsd.

The buy is sized from the cash that actually arrived. A plan whose move did not end in a buy never retries itself: read move.advice for what happened and order again with move.retryAmountUsd, never the consumed plan. A move this device could not verify as arrived stays in flight and no second move is planned for the same shortfall until it verifies or ages out after 7 days — soulpass move status --resume re-checks one.

Examples

soulpass spot --sell USDC --buy SOL --amount 100
soulpass spot --sell SOL --buy USDC --amount 1.5 --slippage 100
soulpass spot --sell USDC --buy SOL --amount 50 --quote