Account Endpoints
Manage your account, API keys, balance, and subscription.
Authentication
/v1/auth/registerCreate a new account with 3-day free trial.
Request Body
{
"email": "user@example.com",
"password": "securepassword123"
}Response
{
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"user_id": "uuid-here",
"email": "user@example.com"
}/v1/auth/loginLogin and get JWT token.
Request Body
{
"email": "user@example.com",
"password": "securepassword123"
}Response
{
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"user_id": "uuid-here",
"email": "user@example.com"
}/v1/auth/forgot-passwordRequest a password reset email.
Request Body
{
"email": "user@example.com"
}Response
{
"message": "If an account exists with this email, a password reset link has been sent."
}/v1/auth/reset-passwordReset password using the token from email.
Request Body
{
"token": "reset-token-from-email",
"new_password": "newSecurePassword123"
}Response
{
"message": "Password has been reset successfully. You can now log in with your new password."
}/v1/auth/meGet current user profile and subscription status.
Headers
Authorization: Bearer your_jwt_tokenResponse
{
"id": "uuid-here",
"email": "user@example.com",
"plan": "basic",
"subscription_status": "active",
"trial_expires_at": "2024-01-15T00:00:00Z",
"subscription_expires_at": "2024-02-15T00:00:00Z",
"payment_required": false,
"created_at": "2024-01-01T00:00:00Z"
}API Key Management
/v1/auth/api-keysList all API keys for the current user.
Response
{
"api_keys": [
{
"id": "key-uuid",
"name": "Trading Bot",
"key_prefix": "pe_abc123",
"status": "active",
"created_at": "2024-01-01T00:00:00Z",
"last_used_at": "2024-01-10T12:00:00Z"
}
]
}/v1/auth/api-keysCreate a new API key. The full key is only shown once.
Request Body
{
"name": "My Trading Bot"
}Response
{
"api_key": "pe_abc123xxxxxxxxxxxxxxxxxxxxxxxx",
"id": "key-uuid",
"name": "My Trading Bot",
"message": "Save this key - it won't be shown again"
}/v1/auth/api-keys/:idRevoke an API key.
Response
{
"message": "API key revoked successfully"
}Account Management
/v1/exchanges/hyperliquid/account/overviewGet account overview with trading statistics.
Response
{
"account_value": 10500.00,
"initial_balance": 10000.00,
"total_pnl": 500.00,
"total_pnl_percent": 5.0,
"withdrawable": 9800.00,
"margin_used": 700.00,
"positions_count": 2,
"open_orders_count": 3,
"positions": [...],
"stats": {
"total_trades": 45,
"winning_trades": 28,
"losing_trades": 17,
"win_rate": 62.2,
"total_volume": 125000.00,
"total_fees_paid": 62.50,
"best_trade": 234.50,
"worst_trade": -156.20,
"realized_pnl": 450.00,
"unrealized_pnl": 50.00
}
}/v1/exchanges/hyperliquid/account/resetAdd funds to your account when balance is low. Adds $10,000 (Basic) or $100,000 (Pro) to your current balance without affecting positions or orders.
Requirements
- Account balance must be below $100
- Active subscription required (trial or paid)
Response
{
"message": "Account topped up successfully",
"previous_balance": 45.50,
"added_amount": 10000.00,
"new_balance": 10045.50
}Funding & Liquidation
PaperExchange accurately simulates Hyperliquid's funding rate payments and liquidation mechanics.
/v1/exchanges/hyperliquid/account/fundingGet funding payment history. Funding is applied hourly based on real Hyperliquid rates.
Query Parameters
coin- Filter by coin (optional)limit- Max results (default: 100, max: 500)
Response
{
"funding_payments": [
{
"coin": "BTC",
"position_size": 0.5,
"funding_rate": 0.0001,
"oracle_price": 42500.00,
"payment_amount": -2.125,
"timestamp": "2024-01-15T12:00:00Z"
}
],
"summary": {
"total_paid": -15.50,
"total_received": 8.25,
"net": -7.25,
"count": 48
}
}/v1/exchanges/hyperliquid/account/funding/summaryGet funding summary grouped by coin.
Response
{
"by_coin": {
"BTC": { "total_funding": -12.50, "payment_count": 24 },
"ETH": { "total_funding": 5.25, "payment_count": 24 }
},
"total": -7.25
}/v1/exchanges/hyperliquid/account/liquidationsGet liquidation event history. Liquidations occur when account equity falls below maintenance margin.
Response
{
"liquidations": [
{
"coin": "ETH",
"position_size": 2.5,
"entry_price": 2400.00,
"liquidation_price": 2280.00,
"mark_price": 2275.00,
"account_value_before": 450.00,
"maintenance_margin": 480.00,
"realized_loss": -300.00,
"timestamp": "2024-01-15T14:30:00Z"
}
],
"summary": {
"total_liquidations": 1,
"total_loss": -300.00
}
}Subscription
/v1/billing/subscriptionGet current subscription status.
Response
{
"status": "active",
"plan": "pro",
"current_period_start": "2024-01-01T00:00:00Z",
"current_period_end": "2024-02-01T00:00:00Z",
"days_remaining": 22,
"features": {
"balance": 100000,
"api_keys": 10,
"rate_limit": 500,
"history_days": 90
}
}/v1/billing/subscribeCreate a checkout session for subscription payment.
Request Body
{
"plan": "pro" // "basic" or "pro"
}Response
{
"checkout_url": "https://checkout.atlos.io/...",
"session_id": "session-uuid",
"plan": "pro",
"amount": 30.00,
"original_amount": 50.00,
"discount": 20.00,
"currency": "USD"
}