openapi: 3.1.0
info:
title: Legend Info Health Wallets API
version: 0.1.0
summary: Hyperliquid-compatible info API with local processing, operated by Legend (legend.trade).
description: 'The public read surface of Legend''s trading platform, served at https://api.legend.trade. The service self-identifies as `@legend/hl-node` v0.1.0 — "Hyperliquid-compatible info API with local processing" — and mirrors the Hyperliquid `POST /info` request-type convention while adding Legend-specific endpoints (`/sparklines`) and an operator-authenticated wallet registration surface used for fill tracking.
This description was GENERATED by the API Evangelist enrichment pipeline from the API''s own self-describing root document (GET https://api.legend.trade) and from live probes of each endpoint on 2026-07-19. Legend publishes an `openapi.json` at docs.legend.trade/api-reference/openapi.json, but as of this run that file is the unmodified Mintlify "OpenAPI Plant Store" scaffold and does not describe the Legend API — it was deliberately NOT harvested. Request/response schemas below are typed only where a live response was observed; unobserved shapes are left open rather than invented.'
contact:
name: Legend
url: https://docs.legend.trade
x-api-evangelist:
method: generated
generated: '2026-07-19'
source: https://api.legend.trade (self-describing root document) + live endpoint probes
upstream: https://hyperliquid.xyz
servers:
- url: https://api.legend.trade
description: Production
security:
- bearerAuth: []
tags:
- name: Wallets
description: Wallet registration for fill tracking (authenticated).
paths:
/wallets/register:
post:
operationId: registerWallet
tags:
- Wallets
summary: Register a wallet for fill tracking
description: Authenticated operator endpoint. Unauthenticated calls return HTTP 401.
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: true
responses:
'200':
description: Wallet registered.
'401':
$ref: '#/components/responses/Unauthorized'
/wallets/bulk:
post:
operationId: bulkRegisterWallets
tags:
- Wallets
summary: Bulk register wallets
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: true
responses:
'200':
description: Wallets registered.
'401':
$ref: '#/components/responses/Unauthorized'
/wallets/sync:
post:
operationId: syncWallets
tags:
- Wallets
summary: Sync all wallets from Postgres to cache
responses:
'200':
description: Sync started or completed.
'401':
$ref: '#/components/responses/Unauthorized'
/wallets/stats:
get:
operationId: getWalletStats
tags:
- Wallets
summary: Get wallet sync stats
responses:
'200':
description: Wallet sync statistics.
'401':
$ref: '#/components/responses/Unauthorized'
/wallets/{address}:
delete:
operationId: unregisterWallet
tags:
- Wallets
summary: Unregister a wallet
parameters:
- name: address
in: path
required: true
description: On-chain wallet address.
schema:
type: string
responses:
'204':
description: Wallet unregistered.
'401':
$ref: '#/components/responses/Unauthorized'
components:
schemas:
Error:
type: object
description: Legend's error envelope — a single `error` string.
properties:
error:
type: string
required:
- error
responses:
Unauthorized:
description: Missing or invalid credentials.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error: Unauthorized
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: The `/wallets/*` endpoints are authenticated — unauthenticated requests return `401 {"error":"Unauthorized"}`. Legend does not publish the credential format for this operator surface; `bearer` is recorded as the observed-unauthenticated default and is NOT a documented provider claim.