Skip to main content
Vanish wraps your swap instructions unchanged and routes them through a fresh one-time wallet, so the user’s wallet is never exposed as a signer on-chain. Trading runs on a funded Vanish balance, so this page covers all three steps: Deposit, Trade, and Withdraw. Every request also needs a signature - see Signing.

Deposit

1

Get a deposit address

Pass the token mint you want to deposit, or 11111111111111111111111111111111 for native SOL. Always fetch a fresh address before each deposit - addresses may rotate to ensure maximum privacy.
Response
2

Transfer on-chain, then commit

Send tokens to the returned address and wait for on-chain confirmation, then commit the signature:
POST /commit
A completed status means the balance is live and ready to trade. /account/balances confirms it. For every other status, see Commit Status.
Reference: Get Deposit Address · Commit Action

Trade

1

Get a one-time wallet

This wallet is for a single trade only - never reuse it.
Response
2

Build the swap transaction

Fetch a route from any DEX or aggregator that outputs a standard Solana transaction body - Titan and Jupiter are common choices, and nothing is restricted to them. Assemble all swap instructions into a single unsigned transaction and base64-encode it as swap_transaction.The one-time wallet must be the signer for all swap instructions, and must be a regular Solana wallet - not an ATA. Do not add any extra instructions: Vanish Core wraps the transaction and returns the full signed version.
3

Create the trade

POST /trade/create
Vanish Core automatically deducts a 50bps protocol fee at trade settlement. If you would like to enable fees, speak to the Vanish team.
4

Broadcast if needed, then commit

On the Jito route the response is tx_id + jito_bundle_id and Vanish has already broadcast it. On the non-Jito route it is a signed transaction for you to broadcast through your own RPC - commit the on-chain signature it returns, not tx_id.
POST /commit
/commit must be called for every transaction - success, failure, or expiry. Balances in a pending state are only resolved once commit is received.
Reference: Get One-Time Wallet · Create Trade · Commit Action

Withdraw

Withdrawals are always routed back to the wallet that made the original deposit. This is enforced at the protocol level and cannot be bypassed - see Compliance.
1

Create the withdrawal

Verify the balance via /account/balances first.
POST /withdraw/create
additional_sol covers ATA creation at the destination wallet if required - 2000000 (0.002 SOL) is a safe default.
2

Broadcast and commit

The response returns transaction_data, routed through the user’s initial deposit wallet for compliant fund flow. Broadcast it through your RPC, then commit the on-chain signature at POST /commit.
Reference: Withdraw · Commit Action

Routing

Jito (default) - omit prefer_non_jito. Vanish builds, signs, and broadcasts via a Jito bundle. Best for most trades and high-value amounts where MEV protection matters.Non-Jito - add prefer_non_jito to the request. Vanish returns a fully signed transaction for you to broadcast. Use it when you have your own low-latency RPC, want control over retry logic, and transaction size is small.
Vanish Core preserves your compute budget settings when wrapping the transaction.Lending does not offer this choice - Vanish picks by transaction size. See Lending.
Lower values mean fewer account metas and instructions, a smaller overall transaction, and a higher likelihood of atomic execution without Jito bundling.Start with 1 for most trades. Only increase if amount_out exceeds 0.5% of total token supply. Maximum is 9. On the non-Jito route, always use 1.

Next Steps

  • Lending - Open a position with funds advanced by Vanish.
  • Error Handling - Commit statuses and recovering interrupted flows.