Skip to main content
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.
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 - if a token trades on Solana, it can be used, whichever venue you route through.
Any of them. On a trade, any DEX or aggregator that outputs a standard Solana transaction body works - Titan and Jupiter are common choices, but nothing is restricted to them. On a lending position, the same applies to the provider you deploy into.Your instructions are passed through unchanged in every case - Vanish Core wraps them in its own transaction layer without touching the route, the venue, or the protocol you chose.
Vanish Core automatically deducts a 50bps protocol fee at trade 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 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, the balance is available.See Fund Your Account in the Quickstart for a full code example.
Check the status field in the /commit response. A rejected status means the deposit failed compliance or risk screening. Do not re-attempt - funds will be refunded to the originating wallet automatically after extended screening is completed.

One-Time Wallets

For a trade, call GET /trade/one-time-wallet - Vanish Core returns a fresh single-use address. For a lending position, call POST /borrow/smart-wallet, which returns the wallet the position will live in. You do not generate either yourself.In both cases, set the returned address as the signer for all of your instructions before submitting.
On a trade, no - each address is single-use, and reusing one will cause the trade to fail. Fetch a fresh one for every trade.On a lending position, the wallet is reused: provision it once and pass the same smart_wallet_id to every lending action on that position, until a settle with cleanup_leftover_sol closes it.
No. Submit an unsigned transaction - swap_transaction on a trade, main_tx on a lending action. Vanish Core wraps and signs it. Sending a pre-signed transaction will cause it to fail.
All operations revert atomically, and failed transactions only cost the base network fee. You must still commit the failed transaction to release the balance from its pending state - /commit for a trade, /borrow/commit for a lending action.
Yes - whenever Vanish returns a signed transaction rather than broadcasting itself. Deserialise it and inspect the instruction list before broadcasting to confirm your original instructions are present and unchanged, and that only Vanish’s injected instructions were added.

Lending

Vanish advances them from its trading accounts into the position’s one-time wallet, and they are returned there on settle. Balances are validated before anything is signed: /borrow/initiate is rejected with a 400 if there is insufficient balance for the token.
Call POST /borrow/positions and read has_active_balance. It is true only when the wallet holds a non-SOL token with a positive balance, so filter on it rather than applying your own dust threshold. An empty balances array means the on-chain lookup did not return - treat it as unknown and re-read.

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.

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. Requests are also capped per second, per team - exceeding the cap returns 429.
Every endpoint except the two commit endpoints requires a user-signed message proving ownership of user_address. Sign with the user’s Solana keypair (Ed25519) and base64-encode the result.All messages share the same prefix and differ only in the Details: line - see Signing Requests for the line each endpoint expects. Timestamps must be Unix time in milliseconds; stale timestamps are rejected to prevent replay attacks.
Malformed signatures - usually seconds instead of milliseconds, missing newlines, base58 or hex encoding instead of base64, or the wrong keypair. Note also that most endpoints take the signature as user_signature, while the account reads and /borrow/pending take it as signature.See Handling 401 for a full checklist.

Commit & Balances

Vanish Core places a portion of the balance in a pending state when a transaction is submitted. Committing - 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.If a commit is missed, POST /account/pending and POST /borrow/pending return the transactions still awaiting one. Both commit endpoints are idempotent and safe to retry.
POST /commit for deposits, trades, and withdrawals. POST /borrow/commit for lending actions. They track separate actions and are not interchangeable.
That this tx_id was already committed in a previous call. The response still contains the correct status and balance_changes. This is by design - both commit endpoints are idempotent and safe to retry.

Fees & Network

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 finality on top of your existing RPC or node submission time.

Compliance

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.