Base API URL: https://core-api-dev.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 50ms 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

GET /deposit_address?token_address={token_address}

2: Deposit Funds

  • Transfer the SOL/SPL tokens to the provided deposit address.

3: Process Deposit

POST /deposit
Implementation Flow:
  1. Once the deposit transaction is confirmed on-chain, call /deposit .
  2. Vanish Core processes the deposit and updates internal balances.
  3. Call /account/balances to verify updated balances.

Trade Flow

1: Generate One-Time Wallet

  • Generate a new Solana keypair for each trade.
  • This wallet is used exclusively for one transaction.
The one-time wallet address you create and broadcast with must be a regular Solana wallet, not an ATA.

2: Prepare Swap Transaction

  1. Fetch route from Jupiter or other DEX aggregators.
  2. Assemble all swap instructions into a single transaction body.
  3. Set one-time wallet address as the signer for all swap instructions.

3: Create Trade

POST /trade/create
Response: Returns a partially-signed transaction payload with:
  • Your original swap instructions (unmodified).
  • Injected loan instructions (at the beginning).
  • Injected repay instructions (at the end).
  • Vanish Core’s signature applied.

4: Sign and Broadcast

  1. Receive the partially-signed transaction from Vanish Core.
  2. Sign the transaction with your one-time wallet’s private key.
  3. Broadcast through your existing RPC/Node infrastructure.
Technical Details:
  • Transaction requires two signatures: Vanish Core’s (already applied) and your one-time wallet’s
  • All operations revert atomically if any instruction fails.
  • You bear no financial liability - loan only executes if repay can complete.
  • Failed transactions only cost the base network transaction fee.

4: Commit Trade

POST /commit
Response: Returns the recognised trade status and internal balances changes.
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.

Withdraw Flow

1: Create Withdraw

POST /withdraw/create
Validation:
  • 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

POST /commit
Response: Returns the recognised withdrawal status and internal balances changes.
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.