← Receivers

hyperliquid:get

hyperliquid family

mcp

Read a Hyperliquid account: perps + spot balances (never summed), open positions with entry/mark/liquidation/PnL, and open orders. Defaults to your own EVM address

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
public
The class of authority the caller must already hold, decided from the attested context with no round trip.
Cost
free
What one call costs, so you can budget before acting.
Reversible
yes
The effect can be undone by a later call.
Idempotent
yes
Safe to retry as-is.

Send it with your agent

One click hands your coding agent a prompt that registers the substrate, reads this contract, and makes the call. Launch opens the app; the others copy the prompt.

Claude Code
Codex
Cursor
Gemini CLI
Claude Desktop
ChatGPT
curl -X POST https://one.ie/api/ask/hyperliquid:get \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": {}}'

The key is never in a link. npx -y @oneie/cli login writes it to ~/.config/oneie/key on your machine.

Request

Validated before dispatch — an invalid payload is refused with the fix, never half-applied.

  • address string optional 0x address to read. Absent = your one EVM address from your wallet rows (needs a signed-in caller). Anyone's is readable — public data, answered mine:false
  • net string optional 'mainnet' (default — where real Hyperliquid funds live) or 'testnet'

Response

What comes back from the call.

  • ok boolean true = read; false = a named refusal in error
  • error string bad_net · bad_address · address_required · address_unknown · ambiguous_address · hyperliquid_unavailable
  • options string[] ambiguous_address: your EVM addresses — pass one as address
  • network string mainnet · testnet — the chain every number is from
  • address string The account read
  • mine boolean true = one of YOUR addresses (attested wallet rows or a signed proof); false = someone else's, or an unattested caller
  • source string Which row made it yours, or why it is not
  • perps object clearinghouseState, decimal USD
  • spot object[] Every non-zero spot balance (never paged)
  • margin object Perps margin summary; null = Hyperliquid sent no value
  • positions object[] Every open perps position (never paged)
  • orders object[] | null Open orders; null = the read failed (named in unread), never an empty book
  • firstDeposit boolean true = empty account; Hyperliquid MAY take a one-time ~1 USDC activation (unverified)
  • unread string[] Parts that failed to read and are null
  • note string
  • next string One sentence: what to do now

Traffic

Every call to hyperliquid:get, counted where it is dispatched — over HTTP or in-process alike. Aggregate only — no actor, no payload, no workspace.

Counting…

Wiring

Every place in the open source that names hyperliquid:get, and the file that answers it. Read from the tree at build time — a receiver is reached by NAME through one door, so there is no import edge to follow and a grep is the honest shape of the question. Structure, not volume — the count is in Traffic above.

Called from

API route 2
  • one.ie/web/src/lib/receiver-index.generated.ts:197
  • one.ie/web/src/lib/resolvers/hyperliquid.ts:2
→

Answered by

hyperliquid:get one.ie/web/src/lib/resolvers/hyperliquid.ts:371 Dispatched through POST /api/ask/hyperliquid:get, after the envelope validates the payload.

hyperliquid family · 2 more

JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "address": {
      "description": "0x address to read. Absent = your one EVM address from your wallet rows (needs a signed-in caller). Anyone's is readable — public data, answered mine:false",
      "type": "string"
    },
    "net": {
      "description": "'mainnet' (default — where real Hyperliquid funds live) or 'testnet'",
      "type": "string"
    }
  }
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "true = read; false = a named refusal in error"
    },
    "error": {
      "description": "bad_net · bad_address · address_required · address_unknown · ambiguous_address · hyperliquid_unavailable",
      "type": "string"
    },
    "options": {
      "description": "ambiguous_address: your EVM addresses — pass one as address",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "network": {
      "type": "string",
      "description": "mainnet · testnet — the chain every number is from"
    },
    "address": {
      "description": "The account read",
      "type": "string"
    },
    "mine": {
      "description": "true = one of YOUR addresses (attested wallet rows or a signed proof); false = someone else's, or an unattested caller",
      "type": "boolean"
    },
    "source": {
      "description": "Which row made it yours, or why it is not",
      "type": "string"
    },
    "perps": {
      "description": "clearinghouseState, decimal USD",
      "type": "object",
      "properties": {
        "accountValue": {
          "type": "string"
        },
        "withdrawable": {
          "type": "string"
        }
      },
      "required": [
        "accountValue",
        "withdrawable"
      ]
    },
    "spot": {
      "description": "Every non-zero spot balance (never paged)",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "coin": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "hold": {
            "type": "string"
          }
        },
        "required": [
          "coin",
          "total",
          "hold"
        ]
      }
    },
    "margin": {
      "description": "Perps margin summary; null = Hyperliquid sent no value",
      "type": "object",
      "properties": {
        "totalMarginUsed": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "totalNtlPos": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "maintenance": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "totalMarginUsed",
        "totalNtlPos",
        "maintenance"
      ]
    },
    "positions": {
      "description": "Every open perps position (never paged)",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "coin": {
            "type": "string"
          },
          "side": {
            "type": "string",
            "description": "long · short"
          },
          "size": {
            "type": "string",
            "description": "Absolute size in coin units"
          },
          "entryPx": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "markPx": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "DERIVED: positionValue ÷ size (clearinghouseState carries no mark field)"
          },
          "positionValue": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "unrealizedPnl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "returnOnEquity": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "liquidationPx": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "null = Hyperliquid names no liquidation price — never 0"
          },
          "leverage": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              },
              "value": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "type",
              "value"
            ]
          },
          "marginUsed": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "funding": {
            "type": "object",
            "properties": {
              "sinceOpen": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "allTime": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "sinceOpen",
              "allTime"
            ],
            "description": "Cumulative funding paid (+) or received (−)"
          }
        },
        "required": [
          "coin",
          "side",
          "size",
          "entryPx",
          "markPx",
          "positionValue",
          "unrealizedPnl",
          "returnOnEquity",
          "liquidationPx",
          "leverage",
          "marginUsed",
          "funding"
        ]
      }
    },
    "orders": {
      "description": "Open orders; null = the read failed (named in unread), never an empty book",
      "anyOf": [
        {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "coin": {
                "type": "string"
              },
              "side": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "buy · sell"
              },
              "limitPx": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "size": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "origSize": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "oid": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The id hyperliquid:quote {action:'cancel'} takes"
              },
              "timestamp": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "reduceOnly": {
                "type": "boolean"
              }
            },
            "required": [
              "coin",
              "side",
              "limitPx",
              "size",
              "origSize",
              "oid",
              "timestamp",
              "reduceOnly"
            ]
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "firstDeposit": {
      "description": "true = empty account; Hyperliquid MAY take a one-time ~1 USDC activation (unverified)",
      "type": "boolean"
    },
    "unread": {
      "description": "Parts that failed to read and are null",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "note": {
      "type": "string"
    },
    "next": {
      "type": "string",
      "description": "One sentence: what to do now"
    }
  },
  "required": [
    "ok",
    "network",
    "next"
  ]
}