You’ll need an API key to follow this guide. Contact the Vanish team via Discord to get one during onboarding.
Prerequisites
https://core-api-dev.vanish.trade
Base URL (Prod): https://core-api.vanish.trade
Authentication: All endpoints require an x-api-key header.
1. Set Up the Client
2. Sign Requests
3. Execute a Private Trade
This example buys a token using native SOL via Jito routing (default). Vanish broadcasts automatically.4. Non-Jito Variant (Self-Broadcast)
If you want to broadcast through your own RPC, passprefer_non_jito:
5. Check Balances
6. Recover Interrupted Flows
If your app crashes after a trade is submitted but before/commit is called, the user’s balance is held in a pending state. Poll /account/pending to recover:
Lamport Reference
| Amount | Lamports |
|---|---|
| 1 SOL | 1,000,000,000 |
| 0.012 SOL (reserve) | 12,000,000 |
| 0.002 SOL (Jito tip) | 2,000,000 |
| 0.0002 SOL (min tip) | 200,000 |
