Vaults

Reference for the Trader Vault endpoints: the marketplace list, single-vault detail, and per-vault history feeds (trades, deposits, withdraws, fee claims). All six endpoints are public — no API key required. For what Trader Vaults are and how to use them from the app, see /guides/trader-vaults.

All six endpoints are served from indexer projections (not live chain reads), so data can lag the chain — check indexer.ledgerAgeSeconds on GET /v1/health to see how fresh the read side is. Money fields are strings of 7-decimal fixed-point USDC integers (10000000 = 1 USDC); *Bps fields are plain basis points.

Two timestamp units appear in vault payloads. createdAt and ts are unix seconds; updatedAt is milliseconds since epoch. Handle both when parsing.

GET /v1/vaults

Lists all Trader Vaults, newest first, with computed aggregates. The aggregates (depositorCount, openPositions, tradeCount, drawdownBps, apyBps, closedTradePnl) are computed per vault and cached for 10 seconds.

Query parameters

ParameterTypeRequiredDescription
leaderstring (56 chars)noFilter to vaults led by this Stellar address
limitinteger, 1–200noRows to return. Default 50

Example

curl -s "https://noetherapi-production.up.railway.app/v1/vaults?limit=1"
{
  "vaults": [
    {
      "id": 12,
      "leader": "GA4N5KYW2OR6BB5COLDEA6BPQEQLGDCBLHBQXEA2EUST7CETA7FIUNHR",
      "name": "staging-test",
      "createdAt": 1780259257,
      "totalUsdc": "182672426343",
      "circulatingShares": "166156808982",
      "hwmNav": "10000000",
      "realizedPnl": "0",
      "leaderShares": "166156808982",
      "profitShareBps": 1000,
      "paused": false,
      "updatedAt": 1783348357206,
      "depositorCount": 1,
      "openPositions": 0,
      "tradeCount": 2,
      "drawdownBps": 0,
      "apyBps": 617,
      "closedTradePnl": "1211692361"
    }
  ]
}

Vault object fields

FieldTypeDescription
idintegerVault ID (used in the path of the other five endpoints)
leaderstringLeader’s Stellar address
namestringVault name
createdAtintegerCreation time, unix seconds
totalUsdcstringVault TVL in USDC (7-decimal integer)
circulatingSharesstringVault shares outstanding (7-decimal integer)
hwmNavstringHigh-water NAV per share, 7-decimal scaled ("10000000" = 1.0)
realizedPnlstringLeader profit-share payouts to date (USDC, 7-decimal)
leaderSharesstringShares held by the leader (7-decimal integer)
profitShareBpsintegerLeader profit share in basis points (1000 = 10%)
pausedbooleanWhether the vault is paused
updatedAtintegerLast projection update, milliseconds since epoch
depositorCountintegerDistinct depositors
openPositionsintegerCurrently open leader positions
tradeCountintegerLifetime leader trades (counts position opens)
drawdownBpsintegerCurrent drawdown from the high-water mark: (hwm − nav) / hwm × 10000, floored at 0
apyBpsintegerAnnualized closedTradePnl over TVL, in basis points
closedTradePnlstringLifetime PnL from closed leader trades (USDC, 7-decimal)

GET /v1/vaults/{id}

Returns a single vault by ID, in the same enriched shape as a list row.

Path parameters

ParameterTypeRequiredDescription
idinteger ≥ 0yesVault ID

Example

curl -s "https://noetherapi-production.up.railway.app/v1/vaults/12"

Response 200 is one vault object (fields as above). Unknown IDs return 404:

{"error":"vault_not_found","id":999}

GET /v1/vaults/{id}/trades

The vault leader’s open/close trade history, newest first.

Parameters

ParameterInTypeRequiredDescription
idpathinteger ≥ 0yesVault ID
limitqueryinteger, 1–200noRows to return. Default 50
before_tsqueryinteger ≥ 0noReturn rows strictly older than this unix-seconds timestamp (cursor pagination)

Example

curl -s "https://noetherapi-production.up.railway.app/v1/vaults/12/trades?limit=1"
{
  "trades": [
    {
      "id": 50,
      "vaultId": 12,
      "positionId": "317",
      "action": "close",
      "leader": "GA4N5KYW2OR6BB5COLDEA6BPQEQLGDCBLHBQXEA2EUST7CETA7FIUNHR",
      "collateral": "0",
      "ledger": 2849806,
      "ts": 1780260063,
      "txHash": "e49dcfae0cc5dcd2943cdbc4929286ca1751dc54be48c88da314e7d2ba9f1784",
      "pnl": "-32835774"
    }
  ]
}
FieldTypeDescription
actionstringopen or close
positionIdstringMarket-contract position ID the leader traded
collateralstringCollateral committed (USDC, 7-decimal)
pnlstring or nullRealized PnL (USDC, 7-decimal). null on open rows and on older close rows
tsintegerTrade time, unix seconds
ledger, txHashinteger, stringOn-chain reference for the event

GET /v1/vaults/{id}/deposits, /withdraws, /fee-claims

Three history feeds with identical parameters, newest first:

  • GET /v1/vaults/{id}/deposits — depositor inflows. Response key deposits.
  • GET /v1/vaults/{id}/withdraws — depositor outflows. Response key withdraws.
  • GET /v1/vaults/{id}/fee-claims — leader profit-share claims. Response key feeClaims.

Parameters

ParameterInTypeRequiredDescription
idpathinteger ≥ 0yesVault ID
limitqueryinteger, 1–200noRows to return. Default 50
before_tsqueryinteger ≥ 0noReturn rows strictly older than this unix-seconds timestamp

Example

curl -s "https://noetherapi-production.up.railway.app/v1/vaults/12/deposits?limit=1"
{
  "deposits": [
    {
      "id": 36,
      "vaultId": 12,
      "principal": "GA4N5KYW2OR6BB5COLDEA6BPQEQLGDCBLHBQXEA2EUST7CETA7FIUNHR",
      "amount": "166156808982",
      "ledger": 2849699,
      "ts": 1780259527,
      "txHash": "336145032c3755a2f62a2a4c808e2de05804cefc8a66267965ffe3dd8e2d06f4",
      "shares": "166156808982"
    }
  ]
}

All three feeds share this row shape:

FieldTypeDescription
idintegerRow ID
vaultIdintegerVault ID
principalstringThe depositor’s address (deposits/withdraws) or the leader’s address (fee-claims)
amountstringUSDC amount (7-decimal integer). On withdraws this is the USDC paid out
sharesstringVault shares minted/burned (7-decimal integer). Present on deposits and withdraws only — absent on fee-claims
tsintegerEvent time, unix seconds
ledger, txHashinteger, stringOn-chain reference for the event

Notes

  • Vaults trade as contract addresses. A Trader Vault holds positions under its own C… contract address, so vault activity also appears in GET /v1/positions/open and the leaderboard with a contract address in the trader field.
  • Rate limits. Without an API key you share the public tier of 60 requests per minute per IP. See the REST overview for tiers and headers.
  • Pagination. before_ts is a strict less-than cursor in unix seconds: take the ts of the oldest row you have and pass it as before_ts to fetch the next page. There are no page tokens or total counts.

Next steps

  • Positions — open positions, including vault-held ones
  • Trading — the prepare → sign → submit flow
  • Trader Vaults guide — creating and depositing into vaults from the app