https://core-api-dev.vanish.trade
Base API URL (Prod): https://core-api.vanish.trade
SOL Native Address: 11111111111111111111111111111111 (For submission to API)
Authentication: All endpoints require x-api-key header with your API key.
The Vanish Core injection process adds approximately 200ms to your trade finality. The system utilises one-time use trading wallets and loan/repay mechanisms to enable stealth trading while keeping you in full control over swap parameters and transaction speeds.
Deposit Flow
1: Get Deposit Address
2: Deposit Funds
- Transfer the SOL/SPL tokens to the provided deposit address.
3: Commit Deposit
- Once the deposit transaction is confirmed on-chain, call
/commit. - Vanish Core processes the deposit and updates internal balances.
- Call
/account/balancesto verify updated balances.
Trade Flow
1: Retrieve One-Time Wallet
- Retrieve a new Solana keypair for each trade.
- This wallet is used exclusively for one transaction.
2: Prepare Swap Transaction
- Fetch route from Titan or other DEX aggregators.
- Assemble all swap instructions into a single transaction body.
- Set one-time wallet address as the signer for all swap instructions.
3: Create Trade
- Your original swap instructions (unmodified).
- Injected loan instructions (at the beginning).
- Injected repay instructions (at the end).
- 1: Using Jito: Vanish Core submits and broadcasts the transaction via a Jito bundle (response includes
tx_id+jito_bundle_id;transactionisnull). - 2: Not using Jito (
prefer_non_jito): Vanish Core returns the fully-signedtransactionpayload for self submission/broadcasting (jito_bundle_idisnull).
4: Sign and Broadcast
- Using Jito: No broadcast necessary - Vanish Core broadcasts via Jito (response is
tx_id+jito_bundle_id). - Not using Jito: Receive the signed
transactionpayload from Vanish Core, then broadcast through your existing RPC/Node infrastructure.
5: Commit Trade
The
/commit endpoint must be called for all transactions, regardless of their final status (success, failure, or expiration). This is to ensure balances are unfrozen and reverted if a transaction has failed.Technical Details:
- All operations revert atomically if any instruction fails.
- Failed transactions only cost the base network transaction fee.
Withdraw Flow
1: Create Withdraw
- Verify user has sufficient balance using
/account/balances. - Validate destination address format.
2: Broadcast Withdraw
Response: The API returns a withdrawal transaction body that:- Transfers from Vanish to user’s destination address.
- Routes through user’s initial deposit wallet for compliant fund flow.
3: Commit Withdraw
The
/commit endpoint must be called for all transactions, regardless of their final status (success, failure, or expiration). This is to ensure balances are unfrozen and reverted if a transaction has failed.