Skip to main content
This picks up where Setup left off, and uses the vanish, signMessage, broadcast, and commit helpers defined there.

Fund Your Account

Trading requires a Vanish balance: fetch a deposit address, send funds on-chain, then commit the transaction.
1

Get a deposit address

Always fetch a fresh address before each deposit - addresses may rotate to ensure maximum privacy.
2

Send SOL on-chain

3

Commit the deposit


Execute a Trade

Vanish wraps your swap instructions - it does not build the route itself. Fetch an unsigned transaction from your DEX aggregator of choice and pass it to POST /trade/create.
Critical: set the one-time wallet as the transaction signer - not the user’s wallet. Pass it wherever your aggregator asks for the signing wallet or user public key.
1

Get a one-time wallet and build the swap

2

Create the trade and commit

/commit must be called for every transaction - success, failure, or expiry. Without it, the user’s balance remains in a pending state indefinitely.
On the non-Jito route, add prefer_non_jito to the request and commit the on-chain signature returned by broadcasting, not trade.tx_id. See Routing.

Check Balances

See POST /account/balances for full reference.

Next Steps

  • Lend - Open a position with funds advanced by Vanish, then settle it.
  • Trading - The full reference for the trade flow, including routing guidance.
  • Error Handling - Commit statuses and recovering interrupted flows.
  • Before Going Live - The pre-launch checklist, covering both flows.