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 Funds

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

Execute 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 its own 50bps protocol fee at trade settlement. To charge a platform fee of your own on top of it, speak to the Vanish team.
4

Broadcast if needed, then commit

On the Jito route Vanish has already submitted the bundle, so commit tx_id. On the non-Jito route you get a signed transaction to broadcast through your own RPC, and you commit the signature your RPC returns.
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.

Routing Options

Jito is the default - leave prefer_non_jito out and Vanish builds, signs and submits the bundle for you. It is the right choice for most trades, and for any size where MEV protection matters.Non-Jito returns the signed transaction instead, for you to broadcast. Choose it when you run your own low-latency RPC and want control over retries.
Your compute budget settings are preserved when the transaction is wrapped.
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.
Reference: Get One-Time Wallet · Create Trade · Commit Action

Withdraw Funds

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

Next Steps

  • Lending - Open a position against the same funded balance.
  • Error Handling - Commit statuses and recovering interrupted flows.