Skip to main content
Glama

hl_create_outcome_order

Destructive

Place and validate buy or sell orders on Hyperliquid HIP-4 outcome markets, returning resting, filled, or rejected status.

Instructions

Place an order on a Hyperliquid HIP-4 outcome market. Structured mode (apiKey, walletAddress=control address, sessionPrivateKey, outcomeId, one of coin/sideIndex/sideLabel, isBuy, size, and price unless isMarket) is validated against the live market first: side must belong to outcomeId, size is whole contracts, price in [0.00001, 0.99999] with max 5 decimals, size×price >= 11 quote (a full-position sell is exempt when managedAddress is given), market must not be expired/settled. isBuy=false sells side tokens you hold. reduceOnly is ignored by the backend. Returns status resting (with orderId) | filled | rejected. Pre-built mode: computedData alone.

Input Schema

NameRequiredDescriptionDefault
coinNoSide coin "#<assetId>" from hl_outcomes sides[].coin. Give exactly one of coin / sideIndex / sideLabel.
sizeNoWhole contracts, e.g. "30"
isBuyNoStructured mode: true buys side tokens; false sells held tokens
priceNoLimit price, e.g. "0.42" (omit for isMarket)
apiKeyNoStructured mode: API key
isMarketNoTake the book at ±5% of top of book
outcomeIdNoStructured mode: outcome market id
sideIndexNoSide index in sides[] (sides are NOT always Yes/No; read the labels)
sideLabelNoExact side label from sides[].label, e.g. "No" or a team name
accountRefNoConnected account from gdex_connect. Supplies session key, wallet address, API key and session data so no secret is passed in chat
reduceOnlyNoIgnored by the backend
computedDataNoPre-built mode ONLY: encrypted payload. Must be sent alone (no structured fields).
walletAddressNoStructured mode: CONTROL wallet address from sign-in (not the managed address)
managedAddressNoManaged wallet; enables position-aware sell checks
sessionPrivateKeyNoStructured mode: session private key

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed15 schema fields changedv5.1.0
    • addedInput schema / properties / apiKey / description
      Added value: +"Structured mode: API key"
    • changedInput schema / properties / coin / description
      Previous value: -"Outcome asset id, e.g. \"#1010\" (outcome 101 Yes)"New value: +"Side coin \"#<assetId>\" from hl_outcomes sides[].coin. Give exactly one of coin / sideIndex / sideLabel."
    • addedInput schema / properties / computedData / description
      Added value: +"Pre-built mode ONLY: encrypted payload. Must be sent alone (no structured fields)."
    • removedInput schema / properties / dex
      Removed value: -{
      -  "type": "string"
      -}
    • addedInput schema / properties / isBuy / description
      Added value: +"Structured mode: true buys side tokens; false sells held tokens"
    • addedInput schema / properties / isMarket / description
      Added value: +"Take the book at ±5% of top of book"
    • addedInput schema / properties / managedAddress
      Added value: +{
      +  "description": "Managed wallet; enables position-aware sell checks",
      +  "type": "string"
      +}
    • addedInput schema / properties / outcomeId / description
      Added value: +"Structured mode: outcome market id"
    • changedInput schema / properties / price / description
      Previous value: -"Limit price in [0,1]; pass \"0\" for market"New value: +"Limit price, e.g. \"0.42\" (omit for isMarket)"
    • addedInput schema / properties / reduceOnly / description
      Added value: +"Ignored by the backend"
    • addedInput schema / properties / sessionPrivateKey / description
      Added value: +"Structured mode: session private key"
    • addedInput schema / properties / sideIndex
      Added value: +{
      +  "description": "Side index in sides[] (sides are NOT always Yes/No; read the labels)",
      +  "type": "integer"
      +}
    • addedInput schema / properties / sideLabel
      Added value: +{
      +  "description": "Exact side label from sides[].label, e.g. \"No\" or a team name",
      +  "type": "string"
      +}
    • changedInput schema / properties / size / description
      Previous value: -"Order size in contracts"New value: +"Whole contracts, e.g. \"30\""
    • changedInput schema / properties / walletAddress / description
      Previous value: -"CONTROL wallet address from sign-in"New value: +"Structured mode: CONTROL wallet address from sign-in (not the managed address)"
  2. Changed1 schema field changedv4.12.0
    • addedInput schema / properties / accountRef
      Added value: +{
      +  "description": "Connected account from gdex_connect. Supplies session key, wallet address, API key and session data so no secret is passed in chat",
      +  "type": "string"
      +}
  3. First observedv4.11.3

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations flag destructive/openWorld, and the description goes well beyond them: it discloses that orders are validated against the live market (side belongs to outcomeId, whole-contract size, price bounds and decimals, minimum notional, expired/settled rejection), that reduceOnly is ignored by the backend, and that the return status is resting/filled/rejected. That is substantial behavioral context an agent could not get from the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action and mode split, and every clause carries validation detail. The structured-mode sentence is long and dense with nested constraints, which slightly hurts scannability, but nothing is redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 15-parameter mutation with no output schema and no required fields declared, it covers mode selection, validation rules, and return statuses. It is only mildly incomplete: it does not spell out the accountRef-vs-explicit-secrets alternative or the prerequisite lookup for sides[], which an agent would need.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so the baseline is 3, but the description adds cross-parameter semantics the schema cannot express: the walletAddress-is-control-address distinction, 'one of coin/sideIndex/sideLabel', 'price unless isMarket', and the full-position sell exemption tied to managedAddress.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Starts with a specific verb and resource: 'Place an order on a Hyperliquid HIP-4 outcome market.' This clearly separates it from siblings like hl_cancel_outcome_order, hl_close_outcome_order, and limit_buy, which are cancellation/close/CEX-style equivalents.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It names two operational modes (structured vs pre-built with computedData alone) and explains the structured path. It does not explicitly say when to prefer this over sibling order tools (limit_buy, execute_spot) or what precondition fetches (hl_outcomes sides[]) must precede it, so it is clear but lacks explicit alternatives/exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools