Spot

The section documents the info endpoints that are specific to spot.

Retrieve spot metadata

POST https://api.hyperliquid.xyz/info

Request weight: 2

Headers

NameValue

Content-Type*

"application/json"

Body

NameTypeDescription

type*

String

"spotMeta"

Response

{
    "tokens": [
        {
            "name": "USDC",
            "szDecimals": 8,
            "weiDecimals" 8
        },
        {
            "name": "PURR",
            "szDecimals": 0,
            "weiDecimals": 5
        }
    ],
    "universe": [
        {
            "name": "PURR/USDC",
            "tokens": [1, 0]
        }
    ]
}

Retrieve spot asset contexts

POST https://api.hyperliquid.xyz/info

Request weight: 2

Headers

NameTypeDescription

Content-Type*

String

"application/json"

Request Body

NameTypeDescription

type*

String

"spotMetaAndAssetCtxs"

[
{
    "tokens": [
        {
            "name": "USDC",
            "szDecimals": 8,
            "weiDecimals" 8
        },
        {
            "name": "PURR",
            "szDecimals": 0,
            "weiDecimals": 5
        }
    ],
    "universe": [
        {
            "name": "PURR/USDC",
            "tokens": [1, 0]
        }
    ]
},
[
    {
        "dayNtlVlm":"8906.0",
        "markPx":"0.14",
        "midPx":"0.209265",
        "prevDayPx":"0.20432"
    }
]
]

Retrieve a user's token balances

POST https://api.hyperliquid.xyz/info

See a user's token balances

Request weight: 2

Headers

NameTypeDescription

Content-Type*

"application/json"

Request Body

NameTypeDescription

type*

String

"spotClearinghouseState"

user*

String

Onchain address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000.

{
    "balances": [
        {
            "coin": "USDC",
            "hold": "0.0",
            "total": "14.625485"
        },
        {
            "coin": "PURR",
            "hold": "0",
            "total": "2000"
        }
    ]
}

Last updated