> For the complete documentation index, see [llms.txt](https://docs.aozo.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aozo.io/stake/developers-and-ecosystem/builder-resources/vtoken-apis.md).

# vToken APIs

There are three ways to query vToken exchange price:

1. Use the Bifrost Runtime API, which is the most up-to-date and accurate method.
2. Call EVM contract on Moonbeam.
3. API for Frontend (with more vToken related storages)

### Bifrost Runtime API

[<mark style="color:purple;">https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fbifrost-polkadot-rpc.dwellir.com#/runtime</mark>](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fbifrost-polkadot-rpc.dwellir.com#/runtime)

`vtokenMintingRuntimeApi`

1. `getCurrencyAmountByVCurrencyAmount`
2. `getVCurrencyAmountByCurrencyAmount`

<figure><img src="https://content.gitbook.com/content/r31MTx7UH8xa62qIBTTw/blobs/B0XyfnRwolYlJKTieM6u/image.png" alt=""><figcaption></figcaption></figure>

As the showcase above, `token2:0` is DOT and `vtoken2:0` is vDOT on Bifrost Polkadot, getCurrencyAmountByVCurrencyAmount is to input vDOT amount (with decimals) to query the exchange price in DOT.

{% hint style="info" %}
Check the Token indexs via [<mark style="color:purple;">here</mark>](/stake/user-guides/mint-redeem-vtoken-without-dapp.md#token-indexes-on-bifrost-polkadot).
{% endhint %}

### EVM contract on Moonbeam

Query the exchange rate from SLPx contract on Moonbeam:

[<mark style="color:purple;">https://github.com/bifrost-io/slpx-contracts?tab=readme-ov-file#xcmoracle</mark>](https://github.com/bifrost-io/slpx-contracts?tab=readme-ov-file#xcmoracle)

Check more details at [<mark style="color:purple;">here</mark>](/stake/protocol-and-security/slpx-xcm-oracle.md).

### API for Frontend

**`exchangeRatio`** is to get Token by vToken

[<mark style="color:purple;">Api 1</mark>](https://dapi.bifrost.io/api/staking): Includes the following queryable interfaces

```
    {
      "contractAddress": "",
      "symbol": "vDOT",
      "slug": "voucher-dot",
      "baseSlug": "polkadot",
      "unstakingTime": 2592000,
      "users": 4455,
      "apr": 15.34,
      "fee": 10,
      "price": 15.0575651785682,
      "exchangeRatio": 1.43132748845706,
      "supply": 7072122.86098662
    },
```

[<mark style="color:purple;">Api 2</mark>](https://dapi.bifrost.io/api/site): Includes the following queryable interfaces

```
{
  "tvl": 128783099,
  "addresses": 89168,
  "revenue": 3886150,
    "vDOT": {
    "apy": "15.34",
    "apyBase": "15.17",
    "apyReward": "0.17",
    "tvl": 74398732.4975793,
    "tvm": 7072122.86098662,
    "totalIssuance": 4940953.70767365,
    "holders": 4455,
    "holdersList": [
      {
        "name": "vDOT",
        "holders": 2551,
        "unique_id": "asset_registry/9658598ef1eace56a0662d4a067a260e42b36f2a",
        "network": "bifrost",
        "url": "<https://bifrost.subscan.io/custom_token?unique_id=asset_registry/9658598ef1eace56a0662d4a067a260e42b36f2a>"
      },
      {
        "name": "vDOT",
        "holders": 389,
        "unique_id": "standard_assets/29085784439601774464560083082574142143",
        "network": "moonbeam",
        "url": "<https://moonbeam.subscan.io/assets/29085784439601774464560083082574142143>"
      },
      {
        "name": "vDOT",
        "holders": 223,
        "unique_id": "standard_assets/18446744073709551624",
        "network": "astar",
        "url": "<https://astar.subscan.io/assets/18446744073709551624>"
      },
      {
        "name": "vDOT",
        "holders": 9,
        "unique_id": "standard_assets/313524628741076911470961827389955394913",
        "network": "polkadex",
        "url": "<https://polkadex.subscan.io/assets/313524628741076911470961827389955394913>"
      },
      {
        "name": "vDOT",
        "holders": 1283,
        "unique_id": "asset_registry/37444e63907d968b4a4947cb38ce9c019e6b6310",
        "network": "hydration",
        "url": "<https://hydration.subscan.io/custom_token?unique_id=asset_registry/37444e63907d968b4a4947cb38ce9c019e6b6310>"
      }
    ]
  },
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.aozo.io/stake/developers-and-ecosystem/builder-resources/vtoken-apis.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
