Hyperliquid Spot API

POST
/info#retrieveSpotMetadata

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#retrieveSpotMetadata" \  -H "Content-Type: application/json" \  -d '{    "type": "spotMeta"  }'
{
  "tokens": [
    {
      "name": "USDC",
      "szDecimals": 8,
      "weiDecimals": 8,
      "index": 0,
      "tokenId": "0x6d1e7cde53ba9467b783cb7c530ce054",
      "isCanonical": true,
      "evmContract": null,
      "fullName": null
    },
    {
      "name": "PURR",
      "szDecimals": 0,
      "weiDecimals": 5,
      "index": 1,
      "tokenId": "0xc1fb593aeffbeb02f85e0308e9956a90",
      "isCanonical": true,
      "evmContract": null,
      "fullName": null
    },
    {
      "name": "HFUN",
      "szDecimals": 2,
      "weiDecimals": 8,
      "index": 2,
      "tokenId": "0xbaf265ef389da684513d98d68edf4eae",
      "isCanonical": false,
      "evmContract": null,
      "fullName": null
    }
  ],
  "universe": [
    {
      "name": "PURR/USDC",
      "tokens": [
        1,
        0
      ],
      "index": 0,
      "isCanonical": true
    },
    {
      "tokens": [
        2,
        0
      ],
      "name": "@1",
      "index": 1,
      "isCanonical": false
    }
  ]
}
POST
/info#retrieveSpotAssetContexts

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#retrieveSpotAssetContexts" \  -H "Content-Type: application/json" \  -d '{    "type": "spotMetaAndAssetCtxs"  }'
[
  {
    "tokens": [
      {
        "name": "USDC",
        "szDecimals": 8,
        "weiDecimals": 8,
        "index": 0,
        "tokenId": "0x6d1e7cde53ba9467b783cb7c530ce054",
        "isCanonical": true,
        "evmContract": null,
        "fullName": null
      },
      {
        "name": "PURR",
        "szDecimals": 0,
        "weiDecimals": 5,
        "index": 1,
        "tokenId": "0xc1fb593aeffbeb02f85e0308e9956a90",
        "isCanonical": true,
        "evmContract": null,
        "fullName": null
      }
    ],
    "universe": [
      {
        "name": "PURR/USDC",
        "tokens": [
          1,
          0
        ],
        "index": 0,
        "isCanonical": true
      }
    ]
  },
  [
    {
      "dayNtlVlm": "8906.0",
      "markPx": "0.14",
      "midPx": "0.209265",
      "prevDayPx": "0.20432"
    }
  ]
]
POST
/info#retrieveUserTokenBalances

See a user's token balances.

Under unified account or portfolio margin, this is the source of truth for trading account balance across spot and perps.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#retrieveUserTokenBalances" \  -H "Content-Type: application/json" \  -d '{    "type": "spotClearinghouseState",    "user": "0x0000000000000000000000000000000000000000"  }'
{
  "balances": [
    {
      "coin": "USDC",
      "token": 0,
      "hold": "0.0",
      "total": "14.625485",
      "entryNtl": "0.0"
    },
    {
      "coin": "PURR",
      "token": 1,
      "hold": "0",
      "total": "2000",
      "entryNtl": "1234.56"
    }
  ]
}
POST
/info#retrieveSpotDeployAuction

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#retrieveSpotDeployAuction" \  -H "Content-Type: application/json" \  -d '{    "type": "spotDeployState",    "user": "0x0000000000000000000000000000000000000000"  }'
{
  "states": [
    {
      "token": 150,
      "spec": {
        "name": "HYPE",
        "szDecimals": 2,
        "weiDecimals": 8
      },
      "fullName": "Hyperliquid",
      "spots": [
        107
      ],
      "maxSupply": 1000000000,
      "hyperliquidityGenesisBalance": "120000",
      "totalGenesisBalanceWei": "100000000000000000",
      "userGenesisBalances": [],
      "existingTokenGenesisBalances": []
    }
  ],
  "gasAuction": {
    "startTimeSeconds": 1733929200,
    "durationSeconds": 111600,
    "startGas": "181305.90046",
    "currentGas": null,
    "endGas": "181291.247358"
  }
}
POST
/info#retrieveSpotPairDeployAuction

Note: This returns the status of the Dutch auction for spot pair deployments between existing base and quote tokens. Participation in this auction is permissionless through the same action as the registerSpot phase of base token deployment.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#retrieveSpotPairDeployAuction" \  -H "Content-Type: application/json" \  -d '{    "type": "spotPairDeployAuctionStatus"  }'
{
  "startTimeSeconds": 1755468000,
  "durationSeconds": 111600,
  "startGas": "500.0",
  "currentGas": "500.0",
  "endGas": null
}
POST
/info#retrieveTokenDetails

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#retrieveTokenDetails" \  -H "Content-Type: application/json" \  -d '{    "type": "tokenDetails",    "tokenId": "0x00000000000000000000000000000000"  }'
{
  "name": "TEST",
  "maxSupply": "1852229076.12716007",
  "totalSupply": "851681534.05516005",
  "circulatingSupply": "851681534.05516005",
  "szDecimals": 0,
  "weiDecimals": 5,
  "midPx": "3.2049",
  "markPx": "3.2025",
  "prevDayPx": "3.2025",
  "genesis": {
    "userBalances": [
      [
        "0x0000000000000000000000000000000000000001",
        "1000000000.0"
      ],
      [
        "0xffffffffffffffffffffffffffffffffffffffff",
        "1000000000.0"
      ]
    ],
    "existingTokenBalances": []
  },
  "deployer": "0x0000000000000000000000000000000000000001",
  "deployGas": "100.0",
  "deployTime": "2024-06-05T10:50:59.434",
  "seededUsdc": "0.0",
  "nonCirculatingUserBalances": [],
  "futureEmissions": "0.0"
}
POST
/info#retrieveOutcomeMeta

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/info#retrieveOutcomeMeta" \  -H "Content-Type: application/json" \  -d '{    "type": "outcomeMeta"  }'
{
  "outcomes": [
    {
      "outcome": 123,
      "name": "Recurring",
      "description": "class:priceBinary|underlying:HYPE|expiry:20260310-1100|targetPrice:34.5|period:3m",
      "sideSpecs": [
        {
          "name": "Yes"
        },
        {
          "name": "No"
        }
      ]
    }
  ]
}