For the complete documentation index, see llms.txt. This page is also available as Markdown.

allMids

Get the mid prices of all perp assets

Request

Field
Type
Description

type

string

Must be "allMids"

dex

string

optional will default to the first dex, can set to ALL_DEXS for all mids of all dexes

curl -X POST https://api.hydromancer.xyz/info \
  -H "Authorization: Bearer $HYDROMANCER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "allMids",
    "dex": ""
  }'
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))

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

Response
{
  "BTC": "96500.50",
  "ETH": "3000.21",
  ....
}

Last updated