openapi: 3.1.0
info:
title: Legend Info Health Market Data 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: Market Data
description: Legend-specific market data extensions.
paths:
/sparklines:
get:
operationId: getSparklines
tags:
- Market Data
summary: 24h price sparklines for multiple coins
description: Legend-custom endpoint. Returns 24 hours of close-price candles keyed by coin symbol. Candle entries carry `t` (epoch milliseconds) and `c` (close price as a string).
security: []
parameters:
- name: coins
in: query
required: true
description: Comma-separated coin symbols, e.g. `BTC,ETH`.
schema:
type: string
example: BTC,ETH
responses:
'200':
description: Sparklines keyed by coin symbol.
content:
application/json:
schema:
$ref: '#/components/schemas/SparklineMap'
example:
BTC:
candles:
- t: 1784409300000
c: '64720'
- t: 1784411100000
c: '64729'
/sparklines/{coin}:
get:
operationId: getCoinSparkline
tags:
- Market Data
summary: 24h price sparkline for a single coin
security: []
parameters:
- name: coin
in: path
required: true
description: Coin symbol, e.g. `BTC`.
schema:
type: string
example: BTC
responses:
'200':
description: Sparkline for the requested coin.
content:
application/json:
schema:
$ref: '#/components/schemas/SparklineMap'
components:
schemas:
SparklineMap:
type: object
description: Sparklines keyed by coin symbol.
additionalProperties:
$ref: '#/components/schemas/Sparkline'
Candle:
type: object
properties:
t:
type: integer
description: Candle timestamp, epoch milliseconds.
c:
type: string
description: Close price, decimal string.
Sparkline:
type: object
properties:
candles:
type: array
items:
$ref: '#/components/schemas/Candle'
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.