Registration & OTP
Create an account with an email and a six-digit verification code.
Registration is two requests: the human reads a short-lived code from their inbox, and the caller receives a session token plus a Superior Trade API key.
Base URL:
https://api.superior.trade· these two endpoints are unauthenticated. Use the returnedapi_keyasx-api-keyfor Unified API requests.
POST/account/register
Sends a six-digit code to start registration or re-authentication.
curl -X POST https://api.superior.trade/account/register \
-H "content-type: application/json" \
-d '{"email":"operator@example.com"}'
wget -qO- \
--method=POST \
--header='content-type: application/json' \
--body-data='{"email":"operator@example.com"}' \
https://api.superior.trade/account/register$response = Invoke-RestMethod `
-Method POST `
-Uri "https://api.superior.trade/account/register" `
-Headers @{ "content-type" = "application/json" } `
-Body '{"email":"operator@example.com"}'
$response | ConvertTo-JsonResponse — 200
{ "status": "otp_sent", "expires_in": 600 }
The code expires after 10 minutes. Only the most recently sent code is valid; it is stored as a hash and allows five verification attempts. Each email address can request up to three codes in six hours.
POST/account/verify
Verifies the code and returns a session token plus an API key.
curl -X POST https://api.superior.trade/account/verify \
-H "content-type: application/json" \
-d '{"email":"operator@example.com","otp":"482913"}'
wget -qO- \
--method=POST \
--header='content-type: application/json' \
--body-data='{"email":"operator@example.com","otp":"482913"}' \
https://api.superior.trade/account/verify$response = Invoke-RestMethod `
-Method POST `
-Uri "https://api.superior.trade/account/verify" `
-Headers @{ "content-type" = "application/json" } `
-Body '{"email":"operator@example.com","otp":"482913"}'
$response | ConvertTo-JsonResponse — 200
{
"token": "…",
"user": { "id": "…", "email": "operator@example.com" },
"api_key": "st_live_4f2a9c81d7e3b0e6…"
}
token authenticates account-management requests. api_key authenticates Unified API requests and appears once in this response.
Verify from your terminal
Use the tabs to select the HTTP client you use to submit the operator's OTP.
curl -X POST https://api.superior.trade/account/verify \
-H "content-type: application/json" \
-d '{"email":"operator@example.com","otp":"482913"}'
wget -qO- \
--method=POST \
--header='content-type: application/json' \
--body-data='{"email":"operator@example.com","otp":"482913"}' \
https://api.superior.trade/account/verify$response = Invoke-RestMethod `
-Method POST `
-Uri "https://api.superior.trade/account/verify" `
-Headers @{ "content-type" = "application/json" } `
-Body '{"email":"operator@example.com","otp":"482913"}'
$response | ConvertTo-Jsoncurl https://api.superior.trade/account \ -H "x-api-key: st_live_4f2a9c81d7e3b0e6…"
wget -qO- \ --header='x-api-key: st_live_4f2a9c81d7e3b0e6…' \ https://api.superior.trade/account
$response = Invoke-RestMethod `
-Method GET `
-Uri "https://api.superior.trade/account" `
-Headers @{ "x-api-key" = "st_live_4f2a9c81d7e3b0e6…" }
$response | ConvertTo-Json