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
{
"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
{
"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
{
"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
{ "reference": "deposit-0001", "vaultId": "sandbox", "duplicate": false }| Status | Error | Meaning |
|---|---|---|
200, 202 | Recorded. "duplicate": true when this exact request was already recorded: nothing changed | |
409 | SimulationConflict | The reference was used with different content: use a new one |
422 | SimulationRefused | The vault refuses it, as the real one will: a withdrawal of reserved money, or a claim of more than the user can claim |
503 | Unavailable | Retry the same request |