your agent · cli reference

serve

Usage

soulpass serve [--port <port>]

Start a localhost-only HTTP daemon exposing JSON-RPC 2.0 methods with warm caches. Eliminates CLI spawn overhead (~600ms/op → ~0ms) — ideal for trading bots and high-frequency operations. Binds to 127.0.0.1 only; every method requires the auth token.

◆ human-only — a long-running process started by a human, not an agent; agents call the methods it serves.

Flags

  • --port <port> — Listen port (default: 8402)

JSON-RPC methods

priceReal-time token prices
balanceCheck balances
tx_statusTransaction status
spotMarket-price token buy/sell via the planner; an hl: asset is refused, naming perps_market
perps_marketHyperliquid perpetual at market — soulpass perps market over JSON-RPC (amount in US dollars, reduce_only, leverage, all; no_wait refused)
payToken transfer
batchParallel SOL transfers
cache_invalidateClear local caches

Examples

# Start daemon
soulpass serve --port 9000

# Call via curl (auth token required)
TOKEN=$(cat ~/.soulpass/daemon.token)
curl http://127.0.0.1:9000 \
  -H "Authorization: Bearer $TOKEN" \
  -d '{"jsonrpc":"2.0","method":"price","params":{"tokens":["SOL"]},"id":1}'