Skip to Content
HyperQuote is live on HyperEVM — Start trading →
API ReferenceAPI Overview

API Overview

HyperQuote exposes two API surfaces for programmatic access: a REST API for RFQ management and data queries, and a WebSocket relay for real-time RFQ broadcasting and quote collection.

Who This Is For

  • Makers building automated quoting bots that receive RFQs and submit quotes programmatically.
  • Takers who want to create and manage RFQs via API instead of the web UI.
  • Integrators building applications on top of HyperQuote liquidity.
  • Data consumers who need access to the live feed, leaderboard, or fill history.

API Surfaces

SurfaceProtocolBase URLPurpose
REST APIHTTP/JSONhttps://hyperquote.xyz/api/v1RFQ management, quotes, fills, leaderboard, agent operations
WebSocket RelayWebSocketwss://relay.hyperquote.xyzReal-time RFQ broadcast and quote collection

Base URLs

REST API

Production: https://hyperquote.xyz/api/v1 Local: http://localhost:3000/api/v1

WebSocket Relay

Production: wss://relay.hyperquote.xyz Local: ws://127.0.0.1:8080

Versioning

All REST API endpoints use the /api/v1/ prefix. Breaking changes will be introduced under a new version prefix (e.g. /api/v2/). Non-breaking additions (new fields, new endpoints) may be added to v1 without a version bump.

Response Format

All API responses use JSON (application/json). Include the Content-Type: application/json header in POST requests.

curl -X POST https://hyperquote.xyz/api/v1/quotes \ -H "Content-Type: application/json" \ -d '{ ... }'

Successful Responses

Successful responses return an HTTP 2xx status code with a JSON body. The structure varies by endpoint but always contains the relevant data at the top level.

Error Responses

All errors follow a consistent JSON format:

{ "error": "Human-readable error description" }

HTTP status codes follow standard conventions. See Error Codes for the complete reference.

Pagination

List endpoints use cursor-based pagination for efficient traversal of large result sets.

ParameterTypeDescription
limitnumberMaximum items to return (default: 50, max: 100)
cursorstringOpaque cursor from a previous response’s nextCursor

Paginated responses include:

{ "items": [ ... ], "nextCursor": "abc123-def456" }

When nextCursor is null, there are no more results. Pass the nextCursor value as the cursor query parameter in the next request to fetch the next page.

Authentication

The REST API supports two authentication methods:

  1. Bearer Token — For agent API access. Keys are prefixed with hq_live_.
  2. Wallet Signature — For operations tied to a specific wallet address (EIP-191).

Public endpoints (leaderboard, feed, badges, profile) do not require authentication. See Authentication for details.

Endpoint Categories

Public (No Auth Required)

CategoryEndpointsDocs
RFQ ListingGET /api/v1/rfqsRFQ Endpoints
RFQ DetailGET /api/v1/rfqs/:idRFQ Endpoints
Quote SubmissionPOST /api/v1/quotesQuote Endpoints
Fill RecordingPOST /api/v1/fillsFill Endpoints
LeaderboardGET /api/v1/leaderboard, GET /api/v1/leaderboard/meLeaderboard
LeagueGET /api/v1/league, GET /api/v1/league/activityLeague
BadgesGET /api/v1/badges/:addressBadges
ProfileGET /api/v1/profile/:addressProfile
FeedGET /api/v1/feed/streamFeed & Stream
BenchmarkGET /api/v1/bench/ht/priceBenchmark
SORGET /api/v1/sor/quoteSOR

Agent API (Bearer Token Required)

CategoryEndpointsDocs
RegistrationPOST /api/v1/agent/registerAgent Registration
Auth CheckGET /api/v1/agent/authAuthentication
RFQ ManagementPOST /api/v1/agent/rfqs, GET /api/v1/agent/rfqsRFQ Endpoints
RFQ DetailGET /api/v1/agent/rfqs/:idRFQ Endpoints
QuotingPOST /api/v1/agent/rfqs/:id/quotesQuote Endpoints
FillsPOST /api/v1/agent/rfqs/:id/fillFill Endpoints
FeedGET /api/v1/agent/feed/streamFeed & Stream
Key RotationPOST /api/v1/agent/keys/rotateAgent Registration

Rate Limiting

All endpoints are rate-limited. Rate limit headers are included in responses:

Retry-After: 30

See Rate Limits for per-endpoint limits.

Edge Cases

ScenarioWhat happens
Bearer token is expired or revoked401 Unauthorized. Rotate your key via POST /api/v1/agent/keys/rotate.
Rate limit exceeded429 Too Many Requests with a Retry-After header. Back off and retry.
WebSocket relay disconnectsReconnect with exponential backoff. Quotes already submitted remain valid on-chain.
Cursor becomes invalid (e.g., data purged)Start pagination from the beginning by omitting the cursor parameter.
Submitting a quote for an expired RFQThe relay rejects the quote. The REST API returns 400 Bad Request.

For a complete list of error codes and troubleshooting guidance, see Error Codes.

Last updated on