LegendTrade Health API

Service health and liveness.

OpenAPI Specification

legendtrade-health-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Legend Info Health 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: Health
  description: Service health and liveness.
paths:
  /health:
    get:
      operationId: getHealth
      tags:
      - Health
      summary: Health check
      description: Returns service health, the deployed git SHA, a server timestamp, and per-dependency check results (Hyperliquid visor and Postgres) with latency in milliseconds.
      security: []
      responses:
        '200':
          description: Service health snapshot.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Health'
              example:
                status: healthy
                gitSha: 8d5b251
                timestamp: '2026-07-19T21:14:24.074Z'
                checks:
                  hlVisor:
                    status: ok
                    latencyMs: 3
                  postgres:
                    status: ok
                    latencyMs: 235
components:
  schemas:
    HealthCheck:
      type: object
      properties:
        status:
          type: string
        latencyMs:
          type: integer
    Health:
      type: object
      properties:
        status:
          type: string
          examples:
          - healthy
        gitSha:
          type: string
        timestamp:
          type: string
          format: date-time
        checks:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/HealthCheck'
  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.