← Receivers

hyperliquid:quote

hyperliquid family

mcp

Prepare a Hyperliquid action — transfer, order, cancel, withdraw — as the UNSIGNED action + EIP-712 typed data YOUR key signs and posts to Hyperliquid. ONE signs nothing. An agent moving value for someone else needs its owner's co-sign

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
no
Not safe to blind-retry — dedupe on the envelope idempotencyKey.

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:quote \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "action": "transfer", "between": "spot->perps", "amount": "5" }}'

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.

  • action transfer | order | cancel | withdraw required transfer (USDC/spot token to an address, or spot↔perps with between) · order · cancel · withdraw (to an EVM address on Arbitrum)
  • address string optional The Hyperliquid account that acts. Absent = yours. It must be yours: only its key can sign
  • net string optional 'mainnet' (default) or 'testnet'
  • to string optional transfer/withdraw: destination 0x address; withdraw defaults to the acting address
  • amount string optional transfer/withdraw: decimal string, e.g. '5' — never a number
  • token string optional transfer: spot token name, default USDC
  • between spot->perps | perps->spot optional transfer: move between your own spot and perps balances instead of to an address
  • coin string optional order/cancel: the asset name from hyperliquid:list {of:'assets'}
  • side buy | sell optional order
  • size string optional order: decimal string, at most the asset's szDecimals
  • price string optional order: limit price as a decimal string; absent = market (IOC at a slippage-bounded price)
  • reduceOnly boolean optional order: only reduce an open position
  • tif Gtc | Ioc | Alo optional order: time in force — default Gtc with a price, Ioc without one; a market order (no price) is Ioc only, anything else is refused bad_order
  • oid number optional cancel: the order id from hyperliquid:get orders

Response

What comes back from the call.

  • ok boolean true = unsigned action prepared; false = a named refusal
  • error string bad_net · bad_action · bad_amount · bad_destination · bad_between · bad_order · bad_oid · sign_in_required · bad_address · address_unknown · ambiguous_address · address_not_yours · needs_cosign · core_not_landed
  • detail string
  • options string[]
  • network string
  • action string
  • address string The account that acts
  • mine boolean
  • prepared object The checked, normalised request the typed data is built from
  • unsigned object Present only when ok — the server never signs or sends it
  • cosign object needs_cosign: an agent key asked to move value on an account, or to a destination, that is not its own
  • next string One sentence: what to do now

Traffic

Every call to hyperliquid:quote, 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:quote, 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:199
  • one.ie/web/src/lib/resolvers/hyperliquid.ts:2
→

Answered by

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

hyperliquid family · 2 more

JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "action": {
      "type": "string",
      "enum": [
        "transfer",
        "order",
        "cancel",
        "withdraw"
      ],
      "description": "transfer (USDC/spot token to an address, or spot↔perps with between) · order · cancel · withdraw (to an EVM address on Arbitrum)"
    },
    "address": {
      "description": "The Hyperliquid account that acts. Absent = yours. It must be yours: only its key can sign",
      "type": "string"
    },
    "net": {
      "description": "'mainnet' (default) or 'testnet'",
      "type": "string"
    },
    "to": {
      "description": "transfer/withdraw: destination 0x address; withdraw defaults to the acting address",
      "type": "string"
    },
    "amount": {
      "description": "transfer/withdraw: decimal string, e.g. '5' — never a number",
      "type": "string"
    },
    "token": {
      "description": "transfer: spot token name, default USDC",
      "type": "string"
    },
    "between": {
      "description": "transfer: move between your own spot and perps balances instead of to an address",
      "type": "string",
      "enum": [
        "spot->perps",
        "perps->spot"
      ]
    },
    "coin": {
      "description": "order/cancel: the asset name from hyperliquid:list {of:'assets'}",
      "type": "string"
    },
    "side": {
      "description": "order",
      "type": "string",
      "enum": [
        "buy",
        "sell"
      ]
    },
    "size": {
      "description": "order: decimal string, at most the asset's szDecimals",
      "type": "string"
    },
    "price": {
      "description": "order: limit price as a decimal string; absent = market (IOC at a slippage-bounded price)",
      "type": "string"
    },
    "reduceOnly": {
      "description": "order: only reduce an open position",
      "type": "boolean"
    },
    "tif": {
      "description": "order: time in force — default Gtc with a price, Ioc without one; a market order (no price) is Ioc only, anything else is refused bad_order",
      "type": "string",
      "enum": [
        "Gtc",
        "Ioc",
        "Alo"
      ]
    },
    "oid": {
      "description": "cancel: the order id from hyperliquid:get orders",
      "type": "number"
    }
  },
  "required": [
    "action"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "true = unsigned action prepared; false = a named refusal"
    },
    "error": {
      "description": "bad_net · bad_action · bad_amount · bad_destination · bad_between · bad_order · bad_oid · sign_in_required · bad_address · address_unknown · ambiguous_address · address_not_yours · needs_cosign · core_not_landed",
      "type": "string"
    },
    "detail": {
      "type": "string"
    },
    "options": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "network": {
      "type": "string"
    },
    "action": {
      "type": "string"
    },
    "address": {
      "description": "The account that acts",
      "type": "string"
    },
    "mine": {
      "type": "boolean"
    },
    "prepared": {
      "description": "The checked, normalised request the typed data is built from",
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "unsigned": {
      "description": "Present only when ok — the server never signs or sends it",
      "type": "object",
      "properties": {
        "action": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {},
          "description": "The Hyperliquid /exchange action object, exactly"
        },
        "nonce": {
          "type": "number",
          "description": "Millisecond nonce; Hyperliquid refuses a reused or stale one"
        },
        "signer": {
          "type": "string",
          "description": "user (EIP-712 user-signed: transfer · withdraw) · l1 (phantom-agent: order · cancel)"
        },
        "typedData": {
          "type": "object",
          "properties": {
            "domain": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "types": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "primaryType": {
              "type": "string"
            },
            "message": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            }
          },
          "required": [
            "domain",
            "types",
            "primaryType",
            "message"
          ],
          "description": "Pass to eth_signTypedData_v4 with the acting address's key, then POST {action, nonce, signature} to Hyperliquid /exchange"
        }
      },
      "required": [
        "action",
        "nonce",
        "signer",
        "typedData"
      ]
    },
    "cosign": {
      "description": "needs_cosign: an agent key asked to move value on an account, or to a destination, that is not its own",
      "type": "object",
      "properties": {
        "required": {
          "type": "boolean"
        },
        "who": {
          "type": "string"
        },
        "why": {
          "type": "string"
        },
        "proposal": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {},
          "description": "What the owner is asked to approve"
        },
        "notified": {
          "type": "boolean",
          "description": "false today: human:notify posts only from a workflow run — carry the proposal in a path with a human step"
        },
        "notifyNote": {
          "type": "string"
        }
      },
      "required": [
        "required",
        "who",
        "why",
        "proposal",
        "notified",
        "notifyNote"
      ]
    },
    "next": {
      "type": "string",
      "description": "One sentence: what to do now"
    }
  },
  "required": [
    "ok",
    "network",
    "next"
  ]
}