> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hyperoru.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API reference

> A single HTTPS API to control everything you can do in the Hyperoru app.

The Hyperoru API gives you the same capabilities as the web app, accessible from your own scripts, bots, dashboards, or integrations. Every page under API Reference is generated directly from the live production service, so what you read here matches what the server actually accepts and returns.

## Before you start

You do **not** need to set anything up locally. Every request in these docs runs against the production service:

<Snippet file="base-url.mdx" />

To make authenticated calls you need a **session token**. You get one by logging in:

1. Create an account with `POST /api/users/register` (or sign up in the app).
2. Log in with `POST /api/users/login`. The response contains a `session_token` that is valid for 180 days.
3. Send that token on every subsequent request.

See [Authentication](/api-reference/authentication) for full examples.

## How to use these docs

<CardGroup cols={2}>
  <Card title="Try any endpoint in the browser" icon="play">
    Every endpoint page has a live **Try it** panel. Paste your session token once and you can send real requests to production without leaving the docs.
  </Card>

  <Card title="Copy a ready-made request" icon="copy">
    Each page ships with copy-pasteable examples in `curl`, JavaScript, Python, Go, and more. No setup required -- just swap in your token.
  </Card>

  <Card title="Inspect the full schema" icon="brackets-curly">
    Click any field to expand the type, constraints, and example values. The schemas are the same ones the server validates against.
  </Card>

  <Card title="Learn before you build" icon="book">
    New to the platform? Start with [Using the API](/api-reference/using-the-api) for a step-by-step tour.
  </Card>
</CardGroup>

## What you can do with the API

<Columns cols={2}>
  <Card title="Manage traders" icon="user-gear" href="/api-reference/authentication">
    Create AI traders, connect exchange wallets, switch strategies.
  </Card>

  <Card title="Execute trades" icon="arrow-right-arrow-left" href="/api-reference/using-the-api">
    Place orders on Hyperliquid and Binance Futures, monitor positions, cancel or roll.
  </Card>

  <Card title="Build strategies" icon="wand-magic-sparkles" href="/trading/prompt-strategies">
    Create prompts and programs, bind them to traders, and backtest before going live.
  </Card>

  <Card title="Watch the market" icon="chart-line" href="/api-reference/websocket">
    Query prices, klines, indicators, and factor rankings, or stream them in real time.
  </Card>

  <Card title="Talk to HyperAI" icon="brain" href="/features/hyper-ai">
    Use the conversational assistant endpoints to ask questions, run skills, and review performance.
  </Card>

  <Card title="Integrate bots" icon="robot" href="/features/bot-integration">
    Wire notifications and controls into your Telegram or Discord bot.
  </Card>
</Columns>

## API essentials

<Columns cols={2}>
  <Card title="Authentication" icon="key" href="/api-reference/authentication">
    Bearer tokens, rotation, and the legacy query-parameter fallback.
  </Card>

  <Card title="Errors and rate limits" icon="triangle-exclamation" href="/api-reference/errors-and-rate-limits">
    What the status codes mean and how to handle failures gracefully.
  </Card>

  <Card title="Using the API" icon="terminal" href="/api-reference/using-the-api">
    A five-minute walkthrough: log in, place an order, check your position.
  </Card>

  <Card title="Real-time streams" icon="bolt" href="/api-reference/websocket">
    WebSocket channels for prices, positions, AI decisions, and system events.
  </Card>
</Columns>

<Note>
  The API is versioned implicitly by URL path. The current base path is `/api` and all endpoints in these docs are served from `https://api.production.hyperoru.com`.
</Note>
