> 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/metadata/metaandassetctxs.md).

# metaAndAssetCtxs

Returns perpetual market metadata together with the per-asset trading context (prices, open interest, and 24h volume) in a single request.

<table><thead><tr><th width="115">Field</th><th width="177">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>type</code></td><td>string</td><td>Must be <code>"metaAndAssetCtxs"</code></td></tr><tr><td><code>dex</code></td><td>string</td><td>Perp DEX name (optional). Defaults to empty string for the first perp DEX; pass a builder-deployed DEX name for a HIP-3 market.</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" \
  -H "Accept-Encoding: gzip" \
  -d '{
    "type": "metaAndAssetCtxs"
  }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import os
import json

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

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

{% endtab %}
{% endtabs %}

The response can be large (\~50 KB for the full native universe). Send `Accept-Encoding: gzip` (or `br`) to receive it compressed.

***

## Response Fields

The response is a two-element array: `[meta, assetCtxs]`.

`meta` is identical to the [meta](/readme/rest-api/metadata/meta.md) endpoint (`universe`, `marginTables`, `collateralToken`).

`assetCtxs` is an array of per-asset context objects in the same order as `meta.universe`, so `assetCtxs[i]` corresponds to `meta.universe[i]`. An asset with no cached context is returned with null fields, keeping the array aligned with the universe.

| Field          | Type   | Description                                                              |
| -------------- | ------ | ------------------------------------------------------------------------ |
| `oraclePx`     | string | Oracle price                                                             |
| `markPx`       | string | Mark price                                                               |
| `midPx`        | string | Mid price; `null` when there is no book                                  |
| `impactPxs`    | array  | `[impact bid, impact ask]`; `null` when unavailable                      |
| `openInterest` | string | Open interest, in base units                                             |
| `dayNtlVlm`    | string | 24-hour notional volume (sum of price × size over the trailing 24 hours) |
| `dayBaseVlm`   | string | 24-hour base volume (sum of size over the trailing 24 hours)             |

<details>

<summary>Response</summary>

```json
[
  {
    "universe": [
      {
        "name": "BTC",
        "szDecimals": 5,
        "maxLeverage": 40,
        "onlyIsolated": false
      }
    ],
    "marginTables": [],
    "collateralToken": 0
  },
  [
    {
      "oraclePx": "63961",
      "markPx": "63970",
      "midPx": "63965.5",
      "impactPxs": ["63960", "63971"],
      "openInterest": "37318.54584",
      "dayNtlVlm": "1690219500.99709",
      "dayBaseVlm": "26703.40439"
    }
  ]
]
```

</details>
