> For the complete documentation index, see [llms.txt](https://docs.yo.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yo.xyz/integrations/api.md).

# API

## YO Protocol API&#x20;

Anyone can use the API to fetch historical information at the protocol or address-level. <br>

**Base URL:** <mark style="color:orange;background-color:orange;">`https://api-v2.yo.xyz/`</mark>

## GET /v1/vaults/{slug}

> Get a snapshot of the current TVL, yield, and allocations for a vault.

```json
{"openapi":"3.0.0","info":{"title":"backend-next","version":"0.0.1"},"servers":[{"url":"https://api-v2.yo.xyz"}],"paths":{"/v1/vaults/{slug}":{"get":{"operationId":"VaultsController_detail","parameters":[{"name":"slug","required":true,"in":"path","schema":{"minLength":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultDetailDto"}}}},"404":{"description":"No vault family with that slug"}},"summary":"Get a snapshot of the current TVL, yield, and allocations for a vault.","tags":["vaults"]}}},"components":{"schemas":{"VaultDetailDto":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"address":{"type":"string","description":"The canonical vault contract, which is also the family’s share token and its registry key"},"authority":{"type":"string","description":"The access-control contract governing the vault — what the withdraw path builds against; one address across every chain"},"assets":{"type":"object","properties":{"base":{"type":"object","properties":{"chainId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"coingeckoId":{"type":"string","description":"CoinGecko listing id, when the deployment package records one","nullable":true}},"required":["chainId","address","symbol","name","decimals","coingeckoId"],"description":"The asset deposits are denominated in"},"share":{"type":"object","properties":{"chainId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"coingeckoId":{"type":"string","description":"CoinGecko listing id, when the deployment package records one","nullable":true}},"required":["chainId","address","symbol","name","decimals","coingeckoId"]}},"required":["base","share"],"description":"The tokens `stats` is denominated in — the settlement chain’s, or the lowest-chainId one"},"feederOf":{"type":"string","description":"Slug of the master family this feeder routes deposits into (a buffer-TVL share class, e.g. yousdt → \"yousd\"); null for standalone vaults","nullable":true},"bindingDeclarationAddress":{"type":"string","description":"Address whose PoolBinding rows serve this family's pools — equals `address` except for mirroring families (yoTest → yoUSD-Edge's); key every pool↔binding join on this"},"chains":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"role":{"type":"string","enum":["settlement","secondary"],"description":"`settlement` is the deposit home; `secondary` mirrors the share on another chain"},"assets":{"type":"object","properties":{"base":{"type":"object","properties":{"chainId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"coingeckoId":{"type":"string","description":"CoinGecko listing id, when the deployment package records one","nullable":true}},"required":["chainId","address","symbol","name","decimals","coingeckoId"],"description":"The asset deposits are denominated in"},"share":{"type":"object","properties":{"chainId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"decimals":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"coingeckoId":{"type":"string","description":"CoinGecko listing id, when the deployment package records one","nullable":true}},"required":["chainId","address","symbol","name","decimals","coingeckoId"],"description":"The family’s share token; null where the chain carries none","nullable":true}},"required":["base","share"]}},"required":["chainId","role","assets"]}},"stats":{"type":"object","properties":{"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The tick instant, UTC"},"importedFromLegacy":{"type":"boolean"},"baseAsset":{"type":"string"},"baseAssetDecimals":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"shareDecimals":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"nullable":true},"tvl":{"type":"string","description":"Decimal string of the raw bigint; null when this row’s source did not carry the metric","nullable":true},"idle":{"type":"string","description":"Decimal string of the raw bigint; null when this row’s source did not carry the metric","nullable":true},"invested":{"type":"string","description":"Decimal string of the raw bigint; null when this row’s source did not carry the metric","nullable":true},"pendingExits":{"type":"string","description":"Decimal string of the raw bigint; null when this row’s source did not carry the metric","nullable":true},"pendingRedemptionAssets":{"type":"string","description":"Decimal string of the raw bigint; null when this row’s source did not carry the metric","nullable":true},"totalShares":{"type":"string","description":"Decimal string of the raw bigint; null when this row’s source did not carry the metric","nullable":true},"assetsPerShare":{"type":"string","description":"Base-asset wei one whole share redeems for, where one whole share is 10^shareDecimals share units — value of a holding = shares × assetsPerShare / 10^shareDecimals, in this row’s baseAsset at baseAssetDecimals; descale by shareDecimals, never baseAssetDecimals","nullable":true},"tvlUsd":{"type":"number","nullable":true},"apy":{"type":"number","description":"Rate as a fraction, 0.045 = 4.5%; null when no source published one","nullable":true},"apy1d":{"type":"number","description":"Realised share-price growth over the trailing day, annualized (fraction, 0.045 = 4.5%); null without a day of live history","nullable":true},"apy7d":{"type":"number","description":"Realised share-price growth over the trailing week, annualized (fraction, 0.045 = 4.5%); null without a week of live history","nullable":true},"apy30d":{"type":"number","description":"Realised share-price growth over the trailing month, annualized (fraction, 0.045 = 4.5%); null without a month of live history","nullable":true},"rewardApr":{"type":"number","description":"Merkl reward APR (fraction, 0.045 = 4.5%), separate from apy and never blended into it; null when no Merkl campaign is live","nullable":true},"chains":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"block":{"type":"string"},"idle":{"type":"string","description":"Wei, as a decimal string — JSON has no 256-bit integer"},"invested":{"type":"string","description":"Wei, as a decimal string — JSON has no 256-bit integer"},"pendingExits":{"type":"string","description":"Wei, as a decimal string — JSON has no 256-bit integer"},"tvl":{"type":"string","description":"Wei, as a decimal string — JSON has no 256-bit integer"},"shareSupply":{"type":"string","description":"Wei, as a decimal string — JSON has no 256-bit integer"}},"required":["chainId","block","idle","invested","pendingExits","tvl","shareSupply"]},"nullable":true},"pools":{"type":"array","items":{"type":"object","properties":{"offchainId":{"type":"string"},"chainId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"type":"string","nullable":true},"protocolName":{"type":"string","nullable":true},"poolUrl":{"type":"string","description":"Where to read about this market at its own protocol","nullable":true},"description":{"type":"string","nullable":true},"value":{"type":"string","description":"Wei, as a decimal string — JSON has no 256-bit integer"},"allocationBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"availableLiquidity":{"type":"string","description":"Wei, as a decimal string — JSON has no 256-bit integer","nullable":true},"apy1d":{"type":"number","description":"Rate as a fraction, 0.045 = 4.5%; null when no source published one","nullable":true},"apy7d":{"type":"number","description":"Rate as a fraction, 0.045 = 4.5%; null when no source published one","nullable":true},"apy30d":{"type":"number","description":"Rate as a fraction, 0.045 = 4.5%; null when no source published one","nullable":true},"mechanismApy":{"type":"number","description":"Chain-measured/model rate (fraction, 0.045 = 4.5%) — the fallback when no aggregator publishes one","nullable":true},"riskScore":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The registry’s governance-set risk score for this pool, 0-100, higher is safer — a roster fact like status; null for a position the registry has since dropped","nullable":true},"status":{"type":"string","enum":["active","exitOnly",null],"description":"The pool-lens status union, ONE spelling everywhere (the on-chain registry's own vocabulary is upper-snake, restated at sync): 'active' | 'exitOnly'","nullable":true},"idleOnly":{"type":"boolean","nullable":true}},"required":["offchainId","chainId","name","protocolName","poolUrl","description","value","allocationBps","availableLiquidity","apy1d","apy7d","apy30d","mechanismApy","riskScore","status","idleOnly"]}}},"required":["updatedAt","importedFromLegacy","baseAsset","baseAssetDecimals","shareDecimals","tvl","idle","invested","pendingExits","pendingRedemptionAssets","totalShares","assetsPerShare","tvlUsd","apy","apy1d","apy7d","apy30d","rewardApr","chains","pools"],"nullable":true},"exposure":{"type":"object","properties":{"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the risk graph stated these figures, UTC — its own clock, not the stats tick’s"},"allocatedUsd":{"type":"number","description":"What the walk found the family to hold, in USD — the denominator of every exposurePct"},"uncollateralizedUsd":{"type":"number"},"uncollateralizedPct":{"type":"number","description":"uncollateralizedUsd as a share of allocatedUsd, as a fraction"},"underlying":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"address":{"type":"string"},"symbol":{"type":"string","description":"The token’s ticker as the risk graph states it; null when it states none","nullable":true},"exposureUsd":{"type":"number","description":"Value of the family’s exposure to this token, in USD"},"exposurePct":{"type":"number","description":"Share of allocatedUsd, as a fraction — 0.9897 = 98.97%"}},"required":["chainId","address","symbol","exposureUsd","exposurePct"]},"description":"The assets the family’s value resolves to, largest exposureUsd first"},"collateral":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"address":{"type":"string"},"symbol":{"type":"string","description":"The token’s ticker as the risk graph states it; null when it states none","nullable":true},"exposureUsd":{"type":"number","description":"Value of the family’s exposure to this token, in USD"},"exposurePct":{"type":"number","description":"Share of allocatedUsd, as a fraction — 0.9897 = 98.97%"}},"required":["chainId","address","symbol","exposureUsd","exposurePct"]},"description":"What the markets behind those positions hold as backing, largest exposureUsd first"}},"required":["at","allocatedUsd","uncollateralizedUsd","uncollateralizedPct","underlying","collateral"],"nullable":true}},"required":["slug","name","address","authority","assets","feederOf","bindingDeclarationAddress","chains","stats","exposure"]}}}}
```

## GET /v1/vaults/{slug}/timeseries/apy

> Fetch the historical yield of a vault.

```json
{"openapi":"3.0.0","info":{"title":"backend-next","version":"0.0.1"},"servers":[{"url":"https://api-v2.yo.xyz"}],"paths":{"/v1/vaults/{slug}/timeseries/apy":{"get":{"operationId":"VaultsController_apySeries","parameters":[{"name":"slug","required":true,"in":"path","schema":{"minLength":1,"type":"string"}},{"name":"from","required":false,"in":"query","schema":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}]}},{"name":"to","required":false,"in":"query","schema":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}]}},{"name":"interval","required":false,"in":"query","schema":{"default":"day","type":"string","enum":["raw","hour","day"]}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":5000,"default":1000,"type":"integer"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RateSeriesPointDto"}}}}},"404":{"description":"No vault family with that slug"}},"summary":"Fetch the historical yield of a vault.","tags":["vaults"]}}},"components":{"schemas":{"RateSeriesPointDto":{"type":"object","properties":{"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The tick instant, UTC"},"value":{"type":"number","description":"Rate as a fraction, 0.045 = 4.5%"}},"required":["at","value"]}}}}
```

## GET /v1/vaults/{slug}/timeseries/tvl

> Fetch the historical TVL of a vault.

```json
{"openapi":"3.0.0","info":{"title":"backend-next","version":"0.0.1"},"servers":[{"url":"https://api-v2.yo.xyz"}],"paths":{"/v1/vaults/{slug}/timeseries/tvl":{"get":{"operationId":"VaultsController_tvlSeries","parameters":[{"name":"slug","required":true,"in":"path","schema":{"minLength":1,"type":"string"}},{"name":"from","required":false,"in":"query","schema":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}]}},{"name":"to","required":false,"in":"query","schema":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}]}},{"name":"interval","required":false,"in":"query","schema":{"default":"day","type":"string","enum":["raw","hour","day"]}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":5000,"default":1000,"type":"integer"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TvlSeriesPointDto"}}}}},"404":{"description":"No vault family with that slug"}},"summary":"Fetch the historical TVL of a vault.","tags":["vaults"]}}},"components":{"schemas":{"TvlSeriesPointDto":{"type":"object","properties":{"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The tick instant, UTC"},"value":{"type":"string","description":"TVL in the family’s base asset"},"usd":{"type":"number","description":"The tick’s own USD enrichment; null when no price was held at the time","nullable":true}},"required":["at","value","usd"]}}}}
```

## GET /v1/history

> Fetch vault activity, optionally filtered by vault, user, chain, type, or period.

```json
{"openapi":"3.0.0","info":{"title":"backend-next","version":"0.0.1"},"servers":[{"url":"https://api-v2.yo.xyz"}],"paths":{"/v1/history":{"get":{"operationId":"HistoryController_list","parameters":[{"name":"family","required":false,"in":"query","description":"Vault family slug, e.g. yousd; unknown slugs are a 404","schema":{"minLength":1,"type":"string"}},{"name":"user","required":false,"in":"query","description":"Wallet address; matched as owner (deposits) or receiver (exits)","schema":{"type":"string"}},{"name":"chainId","required":false,"in":"query","description":"Narrows the fan-out to one chain","schema":{"maximum":9007199254740991,"exclusiveMinimum":true,"type":"integer","minimum":0}},{"name":"type","required":false,"in":"query","schema":{"type":"string","enum":["deposit","withdrawal","redeem-request"]}},{"name":"period","required":false,"in":"query","description":"Only events newer than 1/7/30 days ago","schema":{"type":"string","enum":["1d","7d","30d"]}},{"name":"whale","required":false,"in":"query","description":"Deposits worth at least $100k; requires family","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","description":"The previous response’s nextCursor, verbatim","schema":{"minLength":1,"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":20,"type":"integer"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoryPageDto"}}}}},"summary":"Fetch vault activity, optionally filtered by vault, user, chain, type, or period.","tags":["history"]}}},"components":{"schemas":{"HistoryPageDto":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["deposit","withdrawal","redeem-request"]},"chainId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The chain the event was indexed on"},"vaultAddress":{"type":"string","description":"Checksummed chain-side vault address"},"user":{"type":"string","description":"Checksummed owner (deposits) or receiver (exits) — whose event this is"},"assets":{"type":"string","description":"Base-asset amount, wei"},"shares":{"type":"string","description":"Share amount, wei"},"transactionHash":{"type":"string"},"blockTimestamp":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix seconds"}},"required":["type","chainId","vaultAddress","user","assets","shares","transactionHash","blockTimestamp"]},"description":"Newest first, at most `limit` of them"},"nextCursor":{"type":"string","description":"Opaque token for the next page; null when this page is the last. Never build one — pass it back verbatim","nullable":true},"incompleteChains":{"type":"array","items":{"type":"object","properties":{"family":{"type":"string"},"chainId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reason":{"type":"string","enum":["unconfigured","failed"]}},"required":["family","chainId","reason"]},"description":"Chains this page could not read. Empty means the page is complete; entries mean items may be missing from them"}},"required":["items","nextCursor","incompleteChains"]}}}}
```

## GET /v1/users/{walletAddress}/pending-redeems

> Fetch pending redemptions for a wallet, optionally filtered by vault.

```json
{"openapi":"3.0.0","info":{"title":"backend-next","version":"0.0.1"},"servers":[{"url":"https://api-v2.yo.xyz"}],"paths":{"/v1/users/{walletAddress}/pending-redeems":{"get":{"operationId":"PendingRedeemsController_list","parameters":[{"name":"walletAddress","required":true,"in":"path","schema":{"type":"string"}},{"name":"family","required":false,"in":"query","description":"Vault family slug, e.g. yousd; unknown slugs are a 404","schema":{"minLength":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingRedeemsDto"}}}},"404":{"description":"family names no vault family this build knows"}},"summary":"Fetch pending redemptions for a wallet, optionally filtered by vault.","tags":["pending-redeems"]}}},"components":{"schemas":{"PendingRedeemsDto":{"type":"object","properties":{"redeems":{"type":"array","items":{"type":"object","properties":{"family":{"type":"string","description":"Vault family slug, e.g. yousd"},"chainId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"vault":{"type":"string","description":"The family’s YoVault on that chain — the contract the redemption is queued on"},"shares":{"type":"string","description":"Escrowed shares awaiting fulfilment, in shareDecimals; 0 means nothing is queued"},"requestedAssets":{"type":"string","description":"What fulfilment will pay, in the base asset: the sum of each request’s own request-time quote, gross of the withdrawal fee. Fixed when the request was made, so it drifts from currentAssets as the share price moves"},"currentAssets":{"type":"string","description":"The same shares valued at the family’s latest live assetsPerShare, in this chain’s base-asset decimals — what they are worth now, against the requestedAssets they were quoted at. null when no snapshot prices them, never zero","nullable":true},"shareDecimals":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Decimals of the family’s share token on this chain — what shares is denominated in"},"baseAsset":{"type":"string","description":"The family’s base asset on this chain — what requestedAssets and currentAssets are denominated in"},"baseAssetDecimals":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"baseAssetSymbol":{"type":"string"}},"required":["family","chainId","vault","shares","requestedAssets","currentAssets","shareDecimals","baseAsset","baseAssetDecimals","baseAssetSymbol"]},"description":"One row per readable (family, chain), in family order then chain id order — zeros included"},"incompleteChains":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"Chains at least one read on did not answer — no RPC url here, a failed multicall, or a single vault read that failed. The unreadable reads contribute no rows (never fake zeros); a chain named here may still carry rows from its other vaults"}},"required":["redeems","incompleteChains"]}}}}
```

## GET /v1/performance/{walletAddress}

> Fetch the P\&L of a wallet, optionally filtered by vault.

```json
{"openapi":"3.0.0","info":{"title":"backend-next","version":"0.0.1"},"servers":[{"url":"https://api-v2.yo.xyz"}],"paths":{"/v1/performance/{walletAddress}":{"get":{"operationId":"PerformanceController_getPerformance","parameters":[{"name":"walletAddress","required":true,"in":"path","schema":{"type":"string"}},{"name":"family","required":false,"in":"query","description":"Vault family slug, e.g. yousd; unknown slugs are a 404","schema":{"minLength":1,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletPerformanceDto"}}}}},"summary":"Fetch the P&L of a wallet, optionally filtered by vault.","tags":["performance"]}}},"components":{"schemas":{"WalletPerformanceDto":{"type":"object","properties":{"wallet":{"type":"string","description":"Checksummed wallet address"},"families":{"type":"array","items":{"type":"object","properties":{"family":{"type":"string","description":"Vault family slug"},"baseAsset":{"type":"string","description":"Checksummed base-asset address — the denomination of every wei field here"},"baseAssetDecimals":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"baseAssetSymbol":{"type":"string"},"shareDecimals":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Decimals of sharesBalance"},"realized":{"type":"string","description":"Cumulative realized PnL, base-asset wei; signed"},"costBasis":{"type":"string","description":"Cost of the open lots, base-asset wei"},"sharesBalance":{"type":"string","description":"Shares held, share-wei"},"currentValue":{"type":"string","description":"Shares at the latest share price, base-asset wei; null when no live price is held","nullable":true},"unrealized":{"type":"string","description":"currentValue − costBasis, base-asset wei; null when no live price is held","nullable":true},"usd":{"type":"object","properties":{"currentValueUsd":{"type":"number","description":"Position value at the family’s current rate"},"unrealizedUsd":{"type":"number","description":"Unrealized PnL at the current rate"},"realizedUsd":{"type":"number","description":"Realized PnL restated at the CURRENT rate — a valuation, not the dollars realized then"}},"required":["currentValueUsd","unrealizedUsd","realizedUsd"],"description":"The same figures at the current rate; null when no USD price is held (never zero)","nullable":true},"pricedAt":{"type":"string","description":"ISO instant of the snapshot behind currentValue and usd","nullable":true}},"required":["family","baseAsset","baseAssetDecimals","baseAssetSymbol","shareDecimals","realized","costBasis","sharesBalance","currentValue","unrealized","usd","pricedAt"]}},"totals":{"type":"object","properties":{"currentValueUsd":{"type":"number","nullable":true},"unrealizedUsd":{"type":"number","nullable":true},"realizedUsd":{"type":"number","nullable":true},"unpricedFamilies":{"type":"array","items":{"type":"string"},"description":"Families left out of the totals because no USD price was held for them"}},"required":["currentValueUsd","unrealizedUsd","realizedUsd","unpricedFamilies"],"description":"USD valuation only — base-asset PnL is not summable across families"}},"required":["wallet","families","totals"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.yo.xyz/integrations/api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
