# Token Prices

This guide explains how to fetch the USD price of any token from the Dozer Pool Manager using the public Hathor mainnet node.

### Contract IDs

* **Mainnet**: `000080350ca5ef204bc29b3232bb197e12bec6b473f5e6bdb749a6921197e83c`
* **Testnet**: `00000eecf6a990576c12bfa9e12ee089a5b1ea65e6de1456687ba1f4dc7fd463`

### 1. Fetching HTR Price (Example)

Fetching the price of HTR (Token UID `00`) using the **Mainnet** contract ID.

> **Note**: The argument `"00"` must be in double quotes because the Node API parses arguments as JSON.

```bash
curl -s -G "https://node1.mainnet.hathor.network/v1a/nano_contract/state" \
  --data-urlencode "id=000080350ca5ef204bc29b3232bb197e12bec6b473f5e6bdb749a6921197e83c" \
  --data-urlencode 'calls[]=get_token_price_in_usd("00")' \
  | jq '.calls["get_token_price_in_usd(\"00\")"].value / 100000000'
```

### 2. Fetching Other Token Prices

You can fetch the price of **any token** by replacing `"00"` with the token's UID (hex string).

#### Command Template

Replace `TOKEN_UID` with the actual token ID (e.g., `00000000...`).

```bash
# Define the Token UID you want to check
TOKEN_UID="YOUR_TOKEN_UID_HERE"

curl -s -G "https://node1.mainnet.hathor.network/v1a/nano_contract/state" \
  --data-urlencode "id=000080350ca5ef204bc29b3232bb197e12bec6b473f5e6bdb749a6921197e83c" \
  --data-urlencode "calls[]=get_token_price_in_usd(\"$TOKEN_UID\")" \
  | jq --arg uid "$TOKEN_UID" '.calls["get_token_price_in_usd(\"" + $uid + "\")"].value / 100000000'
```

#### Example: Fetching specific Token Value

If you wanted to fetch the price for a token with UID `00002b66...`:

```bash
curl -s -G "https://node1.mainnet.hathor.network/v1a/nano_contract/state" \
  --data-urlencode "id=000080350ca5ef204bc29b3232bb197e12bec6b473f5e6bdb749a6921197e83c" \
  --data-urlencode 'calls[]=get_token_price_in_usd("00002b66...")' \
  | jq '.calls["get_token_price_in_usd(\"00002b66...\")"].value / 100000000'
```


---

# 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.dozer.finance/apis/token-prices.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.
