> For the complete documentation index, see [llms.txt](https://docs.hydromancer.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hydromancer.xyz/readme/rest-api/asset-data/assetcontext.md).

# assetContext

## Single coin

Request

<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>assetContext<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></tbody></table>

{% 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": "assetContext",
    "coin": "BTC"
  }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import os
import json

response = requests.post(
    'https://api.hydromancer.xyz/info',
    json={
        'type': 'assetContext',
        'coin': 'BTC'
    },
    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: 'assetContext',
    coin: 'BTC'
}, {
    headers: {
        'Authorization': `Bearer ${process.env.HYDROMANCER_API_KEY}`,
        'Content-Type': 'application/json'
    }
});

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

{% endtab %}
{% endtabs %}

<details>

<summary>Response</summary>

```json
{
  "oraclePx": "96500.50",
  "markPx": "96485.25",
  "midPx": "96490.50",
  "impactPxs": [ "96490", "96491" ],
  "openInterest": "25401.1214",
  "dayNtlVlm": "1643278247.97882",
  "dayBaseVlm": "26703.40439"
}
```

</details>

{% hint style="warning" %}
If the coin is not found (all prices are unavailable), the endpoint returns `HTTP 404 Not Found`.
{% endhint %}

***

## Multiple coins

Query up to 20 coins in a single request. Use `coins` instead of `coin`.

<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>"assetContext"</code></td></tr><tr><td><code>coins</code></td><td>string[]</td><td>Array of symbols, max 20. e.g. <code>["BTC", "ETH"]</code></td></tr></tbody></table>

{% 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": "assetContext",
    "coins": ["BTC", "ETH", "SOL"]
  }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import os
import json

response = requests.post(
    'https://api.hydromancer.xyz/info',
    json={
        'type': 'assetContext',
        'coins': ['BTC', 'ETH', 'SOL']
    },
    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: 'assetContext',
    coins: ['BTC', 'ETH', 'SOL']
}, {
    headers: {
        'Authorization': `Bearer ${process.env.HYDROMANCER_API_KEY}`,
        'Content-Type': 'application/json'
    }
});

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

{% endtab %}
{% endtabs %}

<details>

<summary>Response</summary>

```json
{
  "BTC": {
    "oraclePx": "96500.50",
    "markPx": "96485.25",
    "midPx": "96490.50",
    "impactPxs": [ "96490", "96491" ],
    "openInterest": "25401.1214",
    "dayNtlVlm": "1643278247.97882",
    "dayBaseVlm": "26703.40439"
  },
  "ETH": {
    "oraclePx": "3450.10",
    "markPx": "3448.75",
    "midPx": "3449.50",
    "impactPxs": [ "3449", "3450" ],
    "openInterest": "192841.521",
    "dayNtlVlm": "543210987.65432",
    "dayBaseVlm": "157234.21098"
  },
  "SOL": null
}
```

</details>

{% hint style="info" %}
Coins that are not found return `null` in the response map instead of causing a 404.
{% endhint %}

***

## Response Fields

| Field          | Type    | Description                                                                                                                                                                                                                                                               |
| -------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `oraclePx`     | string? | Oracle price (null if not available)                                                                                                                                                                                                                                      |
| `markPx`       | string? | Mark price (null if not available)                                                                                                                                                                                                                                        |
| `midPx`        | string? | Mid price (null if not available)                                                                                                                                                                                                                                         |
| `impactPxs`    | array?  | Avg execution price to trade impact notional (20k$ BTC/ETH, 6k$ other coins) on the bid and ask (null if not available)                                                                                                                                                   |
| `openInterest` | string? | Number of outstanding contracts (null if not available)                                                                                                                                                                                                                   |
| `dayNtlVlm`    | string? | 24-hour notional volume — sum of price × size over the trailing 24 hours. `"0.0"` for an untraded perp; null for a coin absent from the context store, or briefly after a service restart while the 24h window re-seeds (last-known values are preserved where available) |
| `dayBaseVlm`   | string? | 24-hour base volume — sum of size over the trailing 24 hours. `"0.0"` for an untraded perp; null for a coin absent from the context store, or briefly after a service restart while the 24h window re-seeds (last-known values are preserved where available)             |
