Events

Vault Position

GET
/api/v1/wallet/{address}/vault
Vault positions of any wallet, one per main (one vault serves every main; ?main= filters), with the vault loan (or null), all from the database. The vault is not a token: there is no wrapped balance, share price, transfer or approve. Alias for your own wallet: GET /api/v1/vault/position.
Auth: API Key (the /me alias: Session or API Key)

Query Parameters

ParamDescription
mainMain key or address (default: every main)

Response

Response
{
  "wallet": "0x...",
  "data": [
    {
      "main": "0x...",
      "vault": "0x...",
      "pairAsset": "0x...",
      "pairDecimals": 6,
      "staked": "500000000000000000000",
      "principal": "480000000000000000000",
      "pledged": "200000000000000000000",
      "hasActiveLoan": true,
      "hubId": 12,
      "hub": "0x...",
      "loan": {
        "hubId": 12,
        "hub": "0x...",
        "borrowed": "150000000",
        "fullAmount": "160000000",
        "liquidationTime": 1767225600,
        "active": true,
        "isLiquidated": false
      }
    }
  ]
}

Stake amounts are decimal strings in main-token units (18 decimals). staked, principal (what the wallet put in, net of withdrawals: only the database has it) and pledged are folded from the vault's events. loan is the stored vault loan, in raw pair-asset units: borrowed is what was received (plus adds and increases, never reduced), fullAmount the debt. An empty list before the deploy.

Read on chain (not served): pending rewards STAKING.earned(main, user), what unstake accepts now STAKING.freeToUnstake(main, user), the exact live position STAKING.positions(main, user), and USD values at the current price (the main's getPairPrice() times the pair's USD from GET /api/v1/prices).

200 Positions returned400 Invalid main401 Not authenticated