Skip to main content

Register

POST /api/users/register

Create a new user account.
username
string
required
Unique username for the account.
email
string
Optional email address.
password
string
Optional password for authentication.
Example request
curl -X POST https://api.hyperoru.com/api/users/register \
  -H "Content-Type: application/json" \
  -d '{"username": "trader1", "email": "trader@example.com", "password": "secret"}'
Example response
{
  "id": 1,
  "username": "trader1",
  "email": "trader@example.com",
  "is_active": true
}

Login

POST /api/users/login

Authenticate and receive a session token.
username
string
required
Account username.
password
string
required
Account password.
Example request
curl -X POST https://api.hyperoru.com/api/users/login \
  -H "Content-Type: application/json" \
  -d '{"username": "trader1", "password": "secret"}'
Example response
{
  "user": { "id": 1, "username": "trader1", "email": "trader@example.com", "is_active": true },
  "session_token": "abc123-session-token",
  "expires_at": "2026-05-09T00:00:00Z"
}

Get profile

GET /api/users/profile

Retrieve the authenticated user’s profile.
session_token
string
required
Active session token.
Example request
curl "https://api.hyperoru.com/api/users/profile?session_token=abc123"
Example response
{
  "id": 1,
  "username": "trader1",
  "email": "trader@example.com",
  "is_active": true
}

Update profile

PUT /api/users/profile

Update the authenticated user’s profile fields.
session_token
string
required
Active session token.
username
string
New username.
email
string
New email address.
Example request
curl -X PUT "https://api.hyperoru.com/api/users/profile?session_token=abc123" \
  -H "Content-Type: application/json" \
  -d '{"email": "newemail@example.com"}'
Example response
{
  "id": 1,
  "username": "trader1",
  "email": "newemail@example.com",
  "is_active": true
}

List users

GET /api/users/

List all registered users. Example request
curl https://api.hyperoru.com/api/users/
Example response
[
  { "id": 1, "username": "trader1", "email": "trader@example.com", "is_active": true }
]

Get exchange config

GET /api/users/exchange-config

Retrieve the user’s selected exchange configuration. Example request
curl https://api.hyperoru.com/api/users/exchange-config
Example response
{
  "selected_exchange": "hyperliquid"
}

Set exchange config

POST /api/users/exchange-config

Set the user’s preferred exchange.
selected_exchange
string
required
Exchange identifier (hyperliquid or binance).
Example request
curl -X POST https://api.hyperoru.com/api/users/exchange-config \
  -H "Content-Type: application/json" \
  -d '{"selected_exchange": "binance"}'
Example response
{
  "status": "ok"
}

Sync membership

POST /api/users/sync-membership

Synchronize external membership data with the user’s account.
membership_data
object
required
Membership payload from the external provider.
Example request
curl -X POST https://api.hyperoru.com/api/users/sync-membership \
  -H "Content-Type: application/json" \
  -d '{"plan": "pro", "valid_until": "2027-01-01"}'
Example response
{
  "status": "ok"
}

Clear membership

POST /api/users/clear-membership

Remove membership data from the user’s account. Example request
curl -X POST https://api.hyperoru.com/api/users/clear-membership
Example response
{
  "status": "ok"
}