Skip to main content

Documentation Index

Fetch the complete documentation index at: https://core.vanish.trade/llms.txt

Use this file to discover all available pages before exploring further.

Dark Sv
For the full implementation walkthrough, see the Integration Guide. For code examples, see the Quickstart.

Getting Started

API keys are provisioned during onboarding. Contact the Vanish team via Discord to get started. Keys are scoped to your team and should be kept server-side - never expose them in client-side code.
Vanish supports native SOL and any SPL token. Pass 11111111111111111111111111111111 for native SOL. For SPL tokens, pass the token mint address. Token support is not restricted by Vanish - any token tradeable on Titan or Jupiter can be used.
Any DEX aggregator that outputs a standard Solana transaction body. Titan is the primary recommended aggregator. Jupiter is also supported. Your swap instructions are passed through unchanged - Vanish Core wraps them in its own transaction layer.
Vanish Core automatically deducts a 50bps protocol fee at settlement. If you would like to enable fees, speak to the Vanish team to configure your fee address and basis points.

Deposits

Yes. A Vanish balance is required before any trade can be executed. Call GET /deposit_address to get the deposit address for the token you want to fund with, transfer on-chain, then call POST /commit with the confirmed transaction signature. Once the commit returns completed, your balance is available for trading.See Fund Your Account in the Quickstart for a full code example.
Each call to GET /deposit_address returns the current deposit address for a given token. Always fetch a fresh address before each deposit - addresses may rotate based on the token and Vanish’s routing to ensure maximum privacy.
Once the transfer is confirmed on-chain, call POST /commit with the transaction signature. Vanish will verify the transaction and update your balance.
  • completed - balance updated, ready to trade
  • pending - compliance screening in progress, check back shortly
  • rejected - deposit failed screening, funds will be refunded automatically to the originating wallet
Check the status field in the /commit response. A rejected status means the deposit failed compliance or risk screening. Do not re-attempt the deposit - funds will be refunded to the originating wallet automatically after extended screening is completed.

Creating a Trade

Call GET /trade/one-time-wallet - Vanish Core returns a fresh single-use Solana wallet address. You do not generate this yourself. Set the returned address as the signer for all swap instructions in your transaction before submitting.
No. Each address returned by GET /trade/one-time-wallet is single-use. Fetch a fresh one for every trade - reusing a one-time wallet will cause the trade to fail.
No. Submit an unsigned transaction in swap_transaction. Vanish Core signs and wraps it. Sending a pre-signed transaction will cause it to fail.
A base64-encoded unsigned Solana transaction, with the one-time wallet address set as the signer for all swap instructions. Do not add any extra instructions - Vanish Core wraps the transaction and returns the full signed version.
Vanish Core wraps your swap instructions inside its own transaction, advancing the required funds to the one-time wallet to execute the trade. If any instruction fails, all operations revert atomically - you are never left with partial state.The one-time wallet must be a regular Solana wallet (not an ATA) and must be set as the signer for all swap instructions.
On the Jito route (default), Vanish Core returns tx_id + jito_bundle_id. No broadcast is required - Vanish handles it.On the non-Jito route, Vanish Core returns a fully signed transaction payload. Broadcast this through your own RPC.
Start with 1 for most trades. Only increase it if amount_out exceeds 0.5% of the token’s total supply, which may require spreading holdings across multiple Trading Accounts. Maximum is 9.On the non-Jito route, always use 1 - higher values add more account metas and instructions, increasing the risk of exceeding Solana’s transaction size limit.
All operations revert atomically. Failed transactions only cost the base network fee.You must still call POST /commit with the failed transaction’s tx_id to release the user’s balance from its pending state.
Yes. On the non-Jito route, Vanish returns the complete signed transaction bytes. Deserialise it and inspect the instruction list before broadcasting to confirm:
  • Your original swap instructions are present and unchanged
  • Only Vanish’s injected instructions were added
  • No unauthorised modifications were made

Routing

Jito (default): Vanish builds, signs, and broadcasts via a Jito bundle. You receive a tx_id and jito_bundle_id - no broadcast needed before committing. Best for most trades and high-value amounts where MEV protection matters.Non-Jito: Vanish returns a fully-signed transaction that you broadcast yourself via your own RPC. Use this if you want custom retry logic, a low-latency node, or full control over submission.
Include the prefer_non_jito object in your /trade/create request body. Set compute_unit_price and compute_unit_limit inside it. Omitting prefer_non_jito entirely routes via Jito by default.See the Non-Jito Variant in the Quickstart for a full code example.
The minimum recommended tip is 1,000,000 lamports (0.001 SOL). Higher tips increase the likelihood of bundle inclusion during periods of network congestion.
Set compute_unit_price and compute_unit_limit inside the prefer_non_jito object. Vanish Core preserves your compute budget settings when wrapping the transaction.

Withdrawals

No. Vanish enforces a strict same wallet in, same wallet out model. Withdrawals are always routed back to the wallet that made the original deposit. This is required by Vanish’s AML framework and cannot be bypassed.
It covers the lamport cost of creating a token account (ATA) at the destination wallet if one doesn’t already exist. If the destination already has an ATA for the token being withdrawn, a lower value may work - but use a safe default to avoid failures.

Authentication & Signing

All API endpoints require an x-api-key header. Keys are provisioned during onboarding and should never be exposed in client-side code.
Write operations (/trade/create, /withdraw/create) and read operations (/account/balances, /account/pending, etc.) require a user-signed message proving ownership of user_address.Sign with the user’s Solana keypair (Ed25519) and base64-encode the result. The message format varies by endpoint - see Signing Requests for the exact format for each operation.Timestamps must be Unix time in milliseconds. Stale timestamps are rejected to prevent replay attacks.
Malformed signatures. The most frequent issues are:
  • Using seconds instead of milliseconds for the timestamp
  • Missing or incorrect newlines in the message string
  • Base58 or hex encoding instead of base64
  • Signing with the wrong keypair
See Error Handling - 401 for a full checklist.

Commit & Balances

Vanish Core places a portion of the user’s balance in a pending state when a transaction is submitted. Calling /commit - with any outcome - tells Vanish Core to resolve that balance, either applying the change or reverting it. Without a commit, the balance remains in a pending state indefinitely.
The user’s balance remains in a pending state. Use POST /account/pending on startup to detect any transactions awaiting commit - for example, after a crash or timeout. Call /commit with each returned tx_id to resolve them. /commit is idempotent and safe to retry.
StatusMeaning
completedAction processed successfully: the user’s Vanish balance has been updated
rejectedDeposit failed compliance or risk screening: funds will be refunded to the originating wallet after extended screening is completed
pendingWaiting for the transaction to land on-chain or undergo compliance screening: check back shortly
failedThe transaction was rejected on-chain: the user’s balance is no longer in a pending state
expiredThe transaction was not confirmed within the required window: the user’s balance is no longer in a pending state
If already_processed: true, this tx_id was already committed in a previous call. The response still contains the correct status and balance_changes. This is by design - /commit is idempotent and safe to retry.

Fees & Network

We recommend 12000000 lamports (0.012 SOL) for loan_additional_sol - this covers ATA creation costs during the trade. Any unused amount is automatically refunded after settlement.If the target token’s ATA already exists in the user’s wallet, a lower value may work - but the recommended value is safe for all cases.
Platform fees are deducted within the swap instruction and factored into settlement. Vanish Core automatically deducts its 50bps protocol fee at settlement. Speak to the Vanish team during onboarding to configure your fee address and basis points.
The injection process adds approximately 200ms to trade finality on top of your existing RPC or node submission time.
1 SOL = 1,000,000,000 lamports. All SOL amounts in the Vanish API are in lamports. SPL token amounts use the token’s own decimal precision.

Compliance

Vanish enforces a strict compliance model: funds can only be withdrawn to the same wallet they were deposited from. Users cannot redirect funds to a different address. This is required by Vanish’s AML framework and ensures a clear, auditable trail for all fund movements.
A rejected commit status means the deposit failed compliance or risk screening. Funds will be refunded to the originating wallet after extended screening is completed. Do not re-attempt the deposit until the refund is confirmed.

Experiencing an issue not covered here? Join us on Discord - our engineers are available to help.