Errors
Error codes and troubleshooting for Agent Access API endpoints
HTTP Status Codes
| Code | Error | Cause |
|---|---|---|
| 400 | Bad Request | Invalid venue, missing required fields, malformed JSON |
| 401 | Unauthorized | Bad or missing API key |
| 404 | Not Found | Venue not configured, credential not found |
| 409 | Conflict | Credential already exists, duplicate prepare request |
| 501 | Not Implemented | Feature not available (e.g., Privy not configured) |
| 503 | Service Unavailable | TEE sealing service not configured, upstream DEX unavailable |
Registration Errors
400 — Invalid Nonce
The nonce must be within 60 seconds of the server time.
- Ensure your system clock is synchronized
- Generate a fresh nonce for each registration attempt
400 — Signature Mismatch
The signature does not match the expected message.
- Message format must be exactly:
"Register HyperETH: {nonce}" - Verify you signed with the correct private key
- Ensure the signature is 0x-prefixed hex
400 — Address Mismatch
The address recovered from the signature doesn't match wallet_address.
- Ensure
wallet_addressmatches the address of the signing key
Authentication Errors
401 — Invalid API Key
- API key doesn't exist or has been deactivated
- Ensure you're using the full API key including the
api_prefix - Ensure the
x-api-keyheader is included in the request
Venue Configuration Errors
400 — Invalid Venue
Venue name not recognized. Supported venues:
hyperliquid, hyena, aster, paradex, grvt, lighter, kuru, nado
400 — Missing Credentials
Required fields are missing for the venue. Required fields per venue:
| Venue | Required Fields |
|---|---|
| Lighter | api_key_private_key, api_key_index, account_index, l1_address |
| Kuru | private_key |
| Nado | private_key, subaccount |
400 — Wrong Endpoint for Model
Using the wrong setup endpoint for a venue's model:
- Model 1 venues require
/setup— not/credentialsor/prepare - Model 2 venues require
/prepare+/confirm— not/credentialsor/setup - Model 3 venues require
/credentials— not/setupor/prepare
404 — No Credential Found
Attempting to confirm a prepare that hasn't been created, or confirming a different venue than was prepared.
409 — Credential Already Exists
Venue is already configured. Delete the existing credential first:
curl -X DELETE "https://api.hypereth.io/v2/account/venues/{venue}" \
-H "x-api-key: $API_KEY"501 — Privy Not Configured
Model 1 venues (Hyperliquid, HyENA) require Privy to be configured on the server. Contact your server administrator.
503 — TEE Not Configured
The TEE sealing service is required for credential encryption. The server administrator must configure the TEE_SEALING_KEY.
Trading Errors
400 — Venue Not Configured
Attempting to trade on a venue that isn't set up. Check configured venues:
curl -s "https://api.hypereth.io/v2/account/venues" \
-H "x-api-key: $API_KEY" | jq .503 — DEX Unavailable
The upstream DEX is down or unreachable. Retry after a short delay.
Error Handling Example
import requests
import time
def make_request_with_retry(func, max_retries=3):
"""Retry on transient errors with exponential backoff."""
for attempt in range(max_retries):
try:
resp = func()
if resp.status_code in [503, 504]:
if attempt < max_retries - 1:
time.sleep(2 ** attempt)
continue
return resp
except requests.exceptions.RequestException:
if attempt < max_retries - 1:
time.sleep(2 ** attempt)
continue
raise
# Usage
resp = make_request_with_retry(
lambda: requests.get(url, headers=headers)
)