Register
POST /api/users/register
Create a new user account.
Unique username for the account.
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.
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.
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.
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.
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
Sync membership
POST /api/users/sync-membership
Synchronize external membership data with the user’s account.
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
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