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

# allMids

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>allMids<code>"</code></td></tr><tr><td><code>dex</code></td><td>string</td><td><strong>optional</strong> will default to the first dex, can set to ALL_DEXS for all mids of all dexes</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": "allMids",
    "dex": ""
  }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import os
import json

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

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

{% endtab %}
{% endtabs %}

***

## Response Fields

Returns a JSON object where each key is a coin symbol and the value is the mid price as a string.

| Field    | Type   | Description                  |
| -------- | ------ | ---------------------------- |
| `{coin}` | string | Mid price for the given coin |

{% hint style="warning" %}
Currently only returns perp mid prices, not spot mid prices.
{% endhint %}

<details>

<summary>Response</summary>

```json
{
  "BTC": "96500.50",
  "ETH": "3000.21",
  ....
}
```

</details>
