# oraclePriceHistory

<table><thead><tr><th width="115.50848388671875">Field</th><th width="177.66351318359375">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>type</code></td><td>string</td><td>Must be <code>"</code>oraclePriceHistory<code>"</code></td></tr><tr><td><code>coin</code></td><td>string</td><td>symbol e.g. "BTC" or with dex prefix "xyz:XYZ100"</td></tr><tr><td><code>limit</code></td><td>int</td><td>max 2000</td></tr><tr><td><code>dex</code></td><td>string</td><td>DEX identifier e.g. "hyna", "xyz" (optional, returns all if omitted)</td></tr></tbody></table>

Request

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST https://api.hydromancer.xyz/info \
  -H "Authorization: Bearer $HYDROMANCER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "oraclePriceHistory",
    "coin": "BTC",
    "limit": 100
  }'
```

{% endtab %}

{% tab title="Python" %}

```python
import json
import os

import requests

response = requests.post(
    'https://api.hydromancer.xyz/info',
    json={
        'type': 'oraclePriceHistory',
        'coin': 'BTC',
        'limit': 100
    },
    headers={
        'Authorization': f'Bearer {os.environ["HYDROMANCER_API_KEY"]}',
        'Content-Type': 'application/json'
    }
)

print(json.dumps(response.json(), indent=2))
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
import axios from 'axios';

const response = await axios.post(
  'https://api.hydromancer.xyz/info',
  {
    type: 'oraclePriceHistory',
    coin: 'BTC',
    limit: 100
  },
  {
    headers: {
      'Authorization': `Bearer ${process.env.HYDROMANCER_API_KEY}`,
      'Content-Type': 'application/json'
    }
  }
);

console.log(JSON.stringify(response.data, null, 2));
```

{% endtab %}
{% endtabs %}

***

## Response Fields

| Field       | Type    | Description                                                                                                                      |
| ----------- | ------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `time`      | int     | Unix timestamp in milliseconds                                                                                                   |
| `dex`       | string  | DEX source (e.g. `"hyna"`)                                                                                                       |
| `coin`      | string  | Coin symbol                                                                                                                      |
| `oraclePx`  | string? | Oracle price (null if not available)                                                                                             |
| `markPx`    | string? | Mark price (null if not available)                                                                                               |
| `markPx2`   | string? | Secondary mark price, only relevant for some HIP-3 dexes (available from 12 Jan 2026, null for earlier data or non-HIP-3 assets) |
| `extPerpPx` | string? | External perp price (null if not available)                                                                                      |

<details>

<summary>Response</summary>

```json
[ 
    { 
        "time": 1765641295024, 
        "dex": "hyna", 
        "coin": "hyna:BTC", 
        "oraclePx": "90090.00",
        "markPx": "90063.00",
        "markPx2": "90061.50",
        "extPerpPx": "90055.85"
    },
    {
        "time": 1765641292010,
        "dex": "hyna",
        "coin": "hyna:BTC",
        "oraclePx": "90090.00",
        "markPx": "90063.00",
        "markPx2": "90061.50",
        "extPerpPx": "90055.85" 
    } 
]
```

</details>


---

# 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.hydromancer.xyz/readme/rest-api/asset-data/oraclepricehistory.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.
