> For the complete documentation index, see [llms.txt](https://docs.xy.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xy.finance/single-bridge-integration/ybridge-contract-integration/integrate-ybridgevault-contract/maximum-available-liquidity.md).

# Maximum Available Liquidity

{% hint style="warning" %}
If you're going to initiate a cross-chain request, please make sure there's enough buffer liquidity on the target chain since there will always be a time gap between reading the stats and executing the request.
{% endhint %}

The major concept is that we can get the rough available liquidity by getting the balance of the `YBridgeVault` contract If the deposit token is native token. If it's ERC20-like token, we get the balance of the `YBridgeVault` contract from the vault token's ERC20 contract.

However, the balance we get directly from the contract is just a rough number since some of the balance might belong to the YBridge worker.

If you need a more accurate way to access the Maximum Available Liquidity, please use the following API ([Get Pool Liquidity](/single-bridge-integration/ybridge-api/get-pool-liquidity.md)) to obtain liquidity information.


---

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

```
GET https://docs.xy.finance/single-bridge-integration/ybridge-contract-integration/integrate-ybridgevault-contract/maximum-available-liquidity.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.
