Getting Started
How do we get an API key?
How do we get an API key?
What tokens are supported?
What tokens are supported?
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.Which DEXes, aggregators, and lending providers can we use?
Which DEXes, aggregators, and lending providers can we use?
What fee does Vanish Core charge?
What fee does Vanish Core charge?
Deposits
Do I need to deposit before trading?
Do I need to deposit before trading?
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.How do I know if a deposit was rejected?
How do I know if a deposit was rejected?
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
How do we get a one-time wallet?
How do we get a one-time wallet?
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.Can I reuse a one-time wallet?
Can I reuse a one-time wallet?
smart_wallet_id to every lending action on that position, until a settle with cleanup_leftover_sol closes it.Should I sign the transaction before submitting it?
Should I sign the transaction before submitting it?
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.What happens if a transaction fails on-chain?
What happens if a transaction fails on-chain?
/commit for a trade, /borrow/commit for a lending action.Can we verify the transaction before broadcasting?
Can we verify the transaction before broadcasting?
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
Where do the funds come from on a lending position?
Where do the funds come from on a lending position?
/borrow/initiate is rejected with a 400 if there is insufficient balance for the token.How do I tell whether a position is still active?
How do I tell whether a position is still active?
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
Can a user withdraw to a different wallet than the one they deposited from?
Can a user withdraw to a different wallet than the one they deposited from?
Authentication & Signing
How do we authenticate API calls?
How do we authenticate API calls?
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.How does request signing work?
How does request signing work?
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.What is the most common cause of 401 errors?
What is the most common cause of 401 errors?
user_signature, while the account reads and /borrow/pending take it as signature.See Handling 401 for a full checklist.Commit & Balances
Why must a transaction be committed, even when it failed?
Why must a transaction be committed, even when it failed?
POST /account/pending and POST /borrow/pending return the transactions still awaiting one. Both commit endpoints are idempotent and safe to retry.Which commit endpoint do I use?
Which commit endpoint do I use?
POST /commit for deposits, trades, and withdrawals. POST /borrow/commit for lending actions. They track separate actions and are not interchangeable.What does already_processed mean in the commit response?
What does already_processed mean in the commit response?
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
How does platform fee sharing work?
How does platform fee sharing work?
What is the expected latency overhead?
What is the expected latency overhead?
Compliance
What is the same-wallet-in, same-wallet-out rule?
What is the same-wallet-in, same-wallet-out rule?
What happens when a deposit is rejected?
What happens when a deposit is rejected?
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.