https://core-api-dev.vanish.trade
Base URL (Prod): https://core-api.vanish.trade
SOL Native Address: 11111111111111111111111111111111
Authentication: All endpoints require an x-api-key header.
The Vanish Core injection process adds approximately 200ms to trade finality. Your swap instructions are injected into Vanish’s transaction wrapper, keeping you in full control over route, slippage, and execution.
We recommend
12,000,000 lamports (0.012 SOL) for loan_additional_sol - this covers the cost of any token account (ATA) creation during the trade. Any unused amount is automatically refunded after settlement.How It Works
Before trading, your Vanish account must have a funded balance - see the Deposit section to fund it first. When a trade is submitted, Vanish:- Advances funds from its trading accounts to a one-time use wallet to execute the swap.
- Wraps your swap transaction - your swap instructions are passed through unchanged, with settlement instructions added around them.
- Routes the transaction via Jito bundle (default) or returns a signed payload for self-broadcast.
- Settles atomically at the end. If any instruction fails, everything reverts - failed transactions only cost the base network fee.
Compliance
Vanish operates on a same wallet in, same wallet out model. Your connected wallet is the fixed origin for all fund movements - it is the only address from which you can deposit and the only address to which withdrawals are returned. This is enforced at the protocol level and cannot be bypassed.Signing Requests
Write and read endpoints require a signed message proving ownership ofuser_address. Sign with the user’s Solana keypair (Ed25519) and base64-encode the result. Use the current Unix timestamp in milliseconds - stale timestamps are rejected.
- Read Signing Format
- Trade Signing Format
- Withdraw Signing Format
Used by:
/account/balances, /account/pending, /account/points, and all position/transaction endpoints.Pass the result as signature.Deposit Flow
Get a deposit address
See the full reference for Get Deposit Address.Pass the token mint you want to deposit. Use
11111111111111111111111111111111 for native SOL.Response
Transfer funds on-chain
Send tokens to the returned
address. Wait for on-chain confirmation before continuing.Commit the deposit
See the full reference for Commit Action.
Call /account/balances after a
Request body
| Status | |
|---|---|
completed | Deposit successfully processed - the user’s Vanish balance has been updated |
rejected | Deposit failed compliance or risk screening - funds will be refunded to the originating wallet after extended screening is completed |
pending | Waiting for the transaction to land on-chain or undergo compliance screening - check back shortly |
failed | The transaction was rejected on-chain - the user’s balance is no longer in a pending state |
expired | The transaction was not confirmed within the required window - the user’s balance is no longer in a pending state |
completed status to verify the updated balance.Trade Flow
Get a one-time wallet
See the full reference for Get One-Time Wallet.This wallet is for a single trade only - never reuse it. Set the returned address as the signer for all swap instructions in your (unsigned) transaction.
Response
Prepare your swap transaction
- Fetch a route from Titan or another DEX aggregator.
- Assemble all swap instructions into a single unsigned transaction.
- Set the one-time wallet address as the signer for all swap instructions.
Create the trade
See the full reference for Create Trade.All operations revert atomically on failure. Failed transactions only cost the base network fee.
The user’s Solana wallet address.
Input token mint. Use
11111111111111111111111111111111 for SOL.Output token mint.
Input amount in lamports or SPL base units.
Base64-encoded unsigned swap transaction.
Address returned by
GET /trade/one-time-wallet.Amount to cover ATA creation during the trade. We recommend
12000000 (0.012 SOL) - unused amount is automatically refunded.Tip in lamports. Minimum recommended:
1000000 (0.001 SOL). Only applied on the Jito route.Number of Trading Accounts to distribute purchased tokens across. Max
9. Use 1 when amount_out is less than 0.5% of total supply.Unix timestamp in milliseconds.
See the Trade Signing Format above.
Compute budget for self-broadcast. Omit entirely to route via Jito (default).
- Jito (default)
- Non-Jito
Omit
prefer_non_jito. Vanish Core builds, signs, and broadcasts via Jito bundle - no further action needed.Response: tx_id + jito_bundle_id - transaction is nullBroadcast (non-Jito only), then commit
If using non-Jito, broadcast the returned
transaction through your RPC. Then commit regardless of route or outcome:Request body
Response
If
already_processed is true, this tx_id was already committed in a previous call. The response still contains the correct status and balance_changes - safe to use for idempotency checks.Withdraw Flow
Create the withdrawal
Verify the user’s balance via
/account/balances before proceeding. See the full reference for Withdraw.The user’s Solana wallet address.
Token mint to withdraw.
Amount in base units.
Lamports for destination ATA creation, if required.
Unix timestamp in milliseconds.
See the Withdraw Signing Format above.
Response
transaction_data is routed through the user’s initial deposit wallet for compliant fund flow. Broadcast this via your RPC.Handling Interrupted Flows
If a transaction is submitted but/commit is never called - due to a crash, timeout, or network issue - the user’s balance remains in a pending state.
Use /account/pending to detect and recover these states:
Request body
Response
/commit with each returned tx_id to resolve balances from their pending state - whether the original transaction succeeded or failed on-chain. /commit is idempotent, so it is safe to retry.
Routing Guidance
When to use Jito vs non-Jito
When to use Jito vs non-Jito
Use Jito (default) when:
- You want Vanish Core to handle broadcasting entirely
- You are trading high-value amounts where MEV protection matters
- Simplicity is preferred over control
- You have your own RPC infrastructure optimised for low latency
- You want full control over broadcasting and retry logic
- Transaction size is small (low
split_repay) and atomic execution is likely
Choosing split_repay
Choosing split_repay
split_repay controls how many Trading Accounts purchased tokens are distributed across. 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, which may require spreading holdings to reduce per-wallet concentration. Maximum value is 9.Setting loan_additional_sol
Setting loan_additional_sol
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 be sufficient - but the recommended value is safe for all cases.Lamport Reference
All amounts are denominated in lamports - the smallest unit of SOL (1 SOL = 1,000,000,000 lamports). SPL token amounts use the token’s own decimal precision.| Amount | Lamports |
|---|---|
| 1 SOL | 1,000,000,000 |
| 0.012 SOL (loan_additional_sol) | 12,000,000 |
| 0.001 SOL (minimum recommended Jito tip) | 1,000,000 |
Next Steps
- New to Vanish? Start with the Quickstart for working code examples.
- Hitting errors? See Error Handling for status codes, commit statuses, and debugging.
- Have questions? The FAQ covers common integration questions.
