Skip to content
Gave

Sandbox vault

In the sandbox, your vault is simulated: deposits, withdrawals and claims are recorded as if they were confirmed on-chain. Each integrator has one sandbox vault, sandbox, holding USDC and EURe. These endpoints don't exist in production.

Read the vault

GET /v1/sandbox/vault

SandboxVault
{
  "vaultId": "sandbox",
  "balances": [
    { "asset": "USDC", "held": "100000000", "free": "99500000" },
    { "asset": "EURe", "held": "0", "free": "0" }
  ]
}

held is everything in the vault. free is what isn't reserved for rewards: what new rewards can be reserved from, and what you can withdraw. When a reward is earned and there isn't enough free money, it waits as AwaitingFunding. Rewards waiting are reserved first in, first out after your next deposit.

Deposit and withdraw

POST /v1/sandbox/deposits and POST /v1/sandbox/withdrawals

deposit.json
{
  "reference": "deposit-0001",
  "amount": { "asset": "USDC", "amount": "100000000" }
}

reference is your ID for the transaction, 1 to 128 printable characters, unique in your vault. A withdrawal can only take free money.

Pay a claim

POST /v1/sandbox/claims, answered 202 Accepted

claim.json
{
  "reference": "claim-0001",
  "userId": "alice",
  "amount": { "asset": "USDC", "amount": "500000" }
}

The vault pays your user part or all of what they can claim: the oldest claimable rewards first.

Responses

SimulationRecorded
{ "reference": "deposit-0001", "vaultId": "sandbox", "duplicate": false }
StatusErrorMeaning
200, 202Recorded. "duplicate": true when this exact request was already recorded: nothing changed
409SimulationConflictThe reference was used with different content: use a new one
422SimulationRefusedThe vault refuses it, as the real one will: a withdrawal of reserved money, or a claim of more than the user can claim
503UnavailableRetry the same request