Skip to main content

Outcome

Produce one agent-run market-data result that can be repeated from its route, bounded inputs, response contract, and quality decision.

Prerequisites

  • Choose one coding-agent host and one call surface. The host is where the agent runs; the surface is what it can call or read.
  • Give the agent the matching OpenAPI route page and the relevant Responses page.
  • Keep the API key in the host environment or secret manager. Never place it in a prompt, source file, or saved response.
  • Set a stop condition before the agent can add pagination, symbols, windows, or downstream writes.

Inputs

Steps

1

State the job in the prompt

Tell the agent: “Fetch the Hyperliquid core BTC native L2 order book through GET /v1/hyperliquid/orderbook/{symbol} with depth=1. Make one request. Parse the endpoint response. Stop after saving the response and request metadata.”
2

Give the route contract

Point the agent to OpenAPI and the Hyperliquid REST reference. The route uses X-API-Key; the symbol stays BTC; depth=1 is a bounded request.
3

Run the call

4

Stop before widening

Save the body, status, route, query, venue family, symbol, and request ID. Check data quality before changing the task to historical rows, another family, or a wider loop.

Expected state

The agent returns the endpoint-specific order-book response, preserves the response meta.request_id, and produces no extra calls. The saved record shows whether the response was usable for the named task.

Verification

Confirm that the request path names the venue family, the symbol was not recased or stripped, and the response matches the endpoint schema. For a historical task, add the exact data-quality route and a finite window before asking the agent to paginate. A successful first call is not evidence for another family or data type.

Failure and recovery

  • 401: stop the agent and repair the key source or X-API-Key header.
  • 403: inspect the exact endpoint/account/key response and keep the one-call scope. Do not ask the agent to change routes based on an assumed upgrade path.
  • 404: check Venue coverage and the exact symbol namespace.
  • 429: honor Retry-After when present, otherwise use capped exponential backoff with jitter. Keep retries inside the declared budget.
  • A missing or stale quality decision: stop downstream writes and route to Reliability and data gaps.

Saved run metadata

The zero UUID is a shape placeholder only. Store the returned UUID or client request handle after the call, and keep the API key out of this record.

Next task

Use Choose a tooling workflow to move the same bounded task to an SDK, CLI, MCP Server, Skill, WebSocket, or generated client. Use Agent market data API for the wider agent surface map.
Last modified on August 28, 2026