Skip to main content
POST
Public endpoint. No JWT or Authorization header is required. It verifies the wallet’s signed challenge, consumes the challenge, and returns a wallet-bound bearer token. A challenge succeeds at most once. Include optional uid to request a verified account-scoped JWT for the account rate tier; leaving it out retains wallet-only login and the wallet-based rate tier. POST /auth/challenge is unchanged.
string
required
Lowercase 32-character challenge ID returned by POST /auth/challenge.
string
required
Canonical low-s, 65-byte EOA personal-sign signature. The recovery byte may be 0/1 or 27/28.
string
Optional trading account ID as a positive canonical uint40 decimal string, for example "10". Relay verifies the challenge wallet’s current trading permission for this exact account and resolves its root. Use the child ID when trading a subaccount; do not supply a client-chosen root ID. A denied grant returns AUTHENTICATION_FAILED; an unavailable account read returns retryable AUTHENTICATION_UNAVAILABLE.
string
required
Short-lived wallet-bound JWT. Treat it as a secret and never log it.
string
required
Always Bearer.
string
required
Token expiration as an ISO 8601 timestamp. Testnet tokens last one hour.
string
required
Address to which the JWT is bound.
The response fields are unchanged for scoped login. The signed JWT additionally contains kuru_account with string fields uid, root_uid, chain_id, and account_core. Do not read the quota or root ID from untrusted request input. A scoped token is bound to one trading account: the signed header.accountId and required WebSocket account_id must match its uid. Re-login with uid to migrate an existing token; changing a submission alone does not scope it. Token issuance does not register the account or grant on-chain permission.

Body

application/json
challengeId
string
required
signature
string
required
uid
string

Optional positive canonical uint40 decimal trading account ID as a string; use the child ID for a subaccount. Not a root-ID assertion.

Maximum string length: 13
Pattern: ^[1-9][0-9]*$
Example:

"10"

Response

Wallet-bound JWT. A scoped token includes signed kuru_account string claims (uid, root_uid, chain_id, account_core); the response envelope itself is unchanged.