.png?fit=max&auto=format&n=Hkc377OV9piHitLz&q=85&s=c1c0a2222740f78f80be289c3e493ff0)
Getting Started
How do we get an API key?
How do we get an API key?
What DEX aggregators can we use to build the swap route?
What DEX aggregators can we use to build the swap route?
Creating a Trade
How do we create a one-time wallet?
How do we create a one-time wallet?
GET /trade/one-time-wallet - Vanish Core returns a fresh single-use Solana keypair address. You do not generate this yourself. Never reuse a one-time wallet address across transactions.How does the loan/repay mechanism work?
How does the loan/repay mechanism work?
What do we submit to Vanish Core?
What do we submit to Vanish Core?
swap_transaction (base64-encoded) in POST /trade/create.What does Vanish Core return?
What does Vanish Core return?
tx_id + jito_bundle_id. No broadcast required - Vanish handles it.On the non-Jito route, Vanish Core returns a signed transaction payload containing your original swap instructions (unmodified), with loan instructions prepended and repay instructions appended. Broadcast through your RPC.What happens if the trade fails?
What happens if the trade fails?
POST /commit with the failed transaction’s tx_id. This resolves the user’s balance from its pending state.Can we verify the transaction before broadcasting?
Can we verify the transaction before broadcasting?
- Your original swap instructions are present and unchanged
- Only loan and repay instructions were added
- No unauthorised modifications were made
Authentication & Signing
How do we authenticate API calls?
How do we authenticate API calls?
x-api-key header. Keys are provisioned during onboarding.How does request signing work?
How does request signing work?
/trade/create, /withdraw/create) and read operations (/account/balances, /account/pending, etc.) require a user-signed message proving ownership of user_address.Sign with the user’s Solana keypair (Ed25519) and base64-encode the result. The message format varies by endpoint - see Signing requests for the exact format for each operation.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?
- Using seconds instead of milliseconds for the timestamp
- Missing or incorrect newlines in the message string
- Base58 or hex encoding instead of base64
- Signing with the wrong keypair
Balances & Commit
Why must /commit be called even for failed transactions?
Why must /commit be called even for failed transactions?
/commit - 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.Use POST /account/pending to detect any transactions awaiting commit, including after app crashes.What does already_processed mean in the commit response?
What does already_processed mean in the commit response?
already_processed: true, this tx_id was already committed in a previous call. The response still contains the correct status and balance_changes. This is by design - /commit is idempotent and safe to retry.What statuses can /commit return?
What statuses can /commit return?
| Status | Meaning |
|---|---|
completed | Action processed successfully - the user’s Vanish balance has been updated |
rejected | Deposit failed compliance or risk screening - funds will be refunded to the originating wallet after extended screening is completed |
pending | Waiting for the transaction to land on-chain or undergo compliance screening - check back shortly |
failed | The transaction was rejected on-chain - the user’s balance is no longer held in a pending state |
expired | The transaction was not confirmed within the required window - the user’s balance is no longer held in a pending state |
Fees & Network
What is loan_additional_sol and how should we set it?
What is loan_additional_sol and how should we set it?
loan_additional_sol covers the cost of creating any token accounts (ATAs) needed during the trade. The safe default is 12000000 lamports (0.012 SOL). Any unused amount is automatically refunded after settlement.If the target token’s ATA already exists in the user’s wallet, a lower value may work - but the default is safe for all cases.How does platform fee sharing work?
How does platform fee sharing work?
How do priority fees work during network congestion?
How do priority fees work during network congestion?
compute_unit_price and compute_unit_limit inside the prefer_non_jito object. Vanish Core preserves your compute budget settings when injecting loan/repay instructions.What is the expected latency overhead?
What is the expected latency overhead?
How do I convert between SOL and lamports?
How do I convert between SOL and lamports?
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.