# 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.yo.xyz`</mark>

### Protocol-level data

#### Get a snapshot of the current TVL, yield, underlying pools and allocation of the protocol vaults.&#x20;

## GET /api/v1/vault/{network}/{vaultAddress}

>

```json
{"openapi":"3.0.0","info":{"title":"Yo Protocol API","version":"1.0"},"paths":{"/api/v1/vault/{network}/{vaultAddress}":{"get":{"operationId":"VaultController_getVault_v1","parameters":[{"name":"vaultAddress","required":true,"in":"path","schema":{"type":"string"}},{"name":"network","required":true,"in":"path","schema":{"enum":["base","ethereum","unichain","arbitrum","tac","plasma","hyperevm"],"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Vault"]}}}}
```

#### Check the status of pending redeem requests for a given YO vault on a given blockchain.&#x20;

## GET /api/v1/vault/pending-redeems/{network}/{vaultAddress}

>

```json
{"openapi":"3.0.0","info":{"title":"Yo Protocol API","version":"1.0"},"paths":{"/api/v1/vault/pending-redeems/{network}/{vaultAddress}":{"get":{"operationId":"VaultController_getTotalPendingRedeems_v1","parameters":[{"name":"vaultAddress","required":true,"in":"path","schema":{"type":"string"}},{"name":"network","required":true,"in":"path","schema":{"enum":["base","ethereum","unichain","arbitrum","tac","plasma","hyperevm"],"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponseDto"},{"properties":{"data":{"$ref":"#/components/schemas/AmountDto"}}}]}}}}},"tags":["Vault"]}}},"components":{"schemas":{"ApiResponseDto":{"type":"object","properties":{"data":{"type":"object","description":"The response data"},"message":{"type":"string","description":"Message describing the response"},"statusCode":{"type":"number","description":"HTTP status code of the response"}},"required":["data","message","statusCode"]},"AmountDto":{"type":"object","properties":{"raw":{"format":"int64","type":"integer"},"formatted":{"type":"string"}},"required":["raw","formatted"]}}}}
```

#### Fetch the historical  yield of a specific YO vault.

## GET /api/v1/vault/yield/timeseries/{network}/{vaultAddress}

>

```json
{"openapi":"3.0.0","info":{"title":"Yo Protocol API","version":"1.0"},"paths":{"/api/v1/vault/yield/timeseries/{network}/{vaultAddress}":{"get":{"operationId":"VaultController_getYieldTimeseries_v1","parameters":[{"name":"vaultAddress","required":true,"in":"path","schema":{"type":"string"}},{"name":"network","required":true,"in":"path","schema":{"enum":["base","ethereum","unichain","arbitrum","tac","plasma","hyperevm"],"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Vault"]}}}}
```

#### Fetch the historical TVL of a specific YO vault

## GET /api/v1/vault/tvl/timeseries/{network}/{vaultAddress}

>

```json
{"openapi":"3.0.0","info":{"title":"Yo Protocol API","version":"1.0"},"paths":{"/api/v1/vault/tvl/timeseries/{network}/{vaultAddress}":{"get":{"operationId":"VaultController_getTvlTimeseries_v1","parameters":[{"name":"vaultAddress","required":true,"in":"path","schema":{"type":"string"}},{"name":"network","required":true,"in":"path","schema":{"enum":["base","ethereum","unichain","arbitrum","tac","plasma","hyperevm"],"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Vault"]}}}}
```

### User-level data

#### Fetch the historical deposits and withdrawals of a specific address for a specific YO vault on a specific blockchain.&#x20;

## GET /api/v1/history/user/{network}/{vaultAddress}/{userAddress}

>

```json
{"openapi":"3.0.0","info":{"title":"Yo Protocol API","version":"1.0"},"paths":{"/api/v1/history/user/{network}/{vaultAddress}/{userAddress}":{"get":{"operationId":"HistoryController_getAggregatedHistory_v1","parameters":[{"name":"vaultAddress","required":true,"in":"path","schema":{"type":"string"}},{"name":"userAddress","required":true,"in":"path","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"number"}},{"name":"network","required":true,"in":"path","schema":{"enum":["base","ethereum","unichain","arbitrum","tac","plasma","hyperevm"],"type":"string"}}],"responses":{"200":{"description":""}},"tags":["History"]}}}}
```

#### Fetch the pending redemptions for a specific user on a specific vault

## GET /api/v1/vault/pending-redeems/{network}/{vaultAddress}/{userAddress}

>

```json
{"openapi":"3.0.0","info":{"title":"Yo Protocol API","version":"1.0"},"paths":{"/api/v1/vault/pending-redeems/{network}/{vaultAddress}/{userAddress}":{"get":{"operationId":"VaultController_getPendingRedeemsForUser_v1","parameters":[{"name":"vaultAddress","required":true,"in":"path","schema":{"type":"string"}},{"name":"userAddress","required":true,"in":"path","schema":{"type":"string"}},{"name":"network","required":true,"in":"path","schema":{"enum":["base","ethereum","unichain","arbitrum","tac","plasma","hyperevm"],"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponseDto"},{"properties":{"data":{"$ref":"#/components/schemas/PendingRedeemsForUserResponseDto"}}}]}}}}},"tags":["Vault"]}}},"components":{"schemas":{"ApiResponseDto":{"type":"object","properties":{"data":{"type":"object","description":"The response data"},"message":{"type":"string","description":"Message describing the response"},"statusCode":{"type":"number","description":"HTTP status code of the response"}},"required":["data","message","statusCode"]},"PendingRedeemsForUserResponseDto":{"type":"object","properties":{"assets":{"$ref":"#/components/schemas/AmountDto"},"shares":{"$ref":"#/components/schemas/AmountDto"}},"required":["assets","shares"]},"AmountDto":{"type":"object","properties":{"raw":{"format":"int64","type":"integer"},"formatted":{"type":"string"}},"required":["raw","formatted"]}}}}
```

#### Fetch the P\&L of a user in a specific vault

## GET /api/v1/performance/user/{network}/{vaultAddress}/{userAddress}

>

```json
{"openapi":"3.0.0","info":{"title":"Yo Protocol API","version":"1.0"},"paths":{"/api/v1/performance/user/{network}/{vaultAddress}/{userAddress}":{"get":{"operationId":"PerformanceController_getUserPerformance_v1","parameters":[{"name":"vaultAddress","required":true,"in":"path","schema":{"type":"string"}},{"name":"userAddress","required":true,"in":"path","schema":{"type":"string"}},{"name":"network","required":true,"in":"path","schema":{"enum":["base","ethereum","unichain","arbitrum","tac","plasma","hyperevm"],"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Performance"]}}}}
```


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
