POST /info,
POST /read, POST /portfolio and the /ws WebSocket. To read your own account live, send a
read credential: a short-lived EIP-712 session signed by the account owner or one of its approved
API wallets.
POST /leaderboard is a public exception: cached rankings, volume, PnL, ROI, account values
and Genesis badges come from the immediate follower, without an added 20-second delay.
POST /class-progress is also public and returns only the account’s class-unlock percentage
from the immediate follower, with no added delay. Neither endpoint needs a connected wallet
or a read credential.
Routes
POST /exchange is unchanged and always reaches the live node.
Public Class Progress
SendPOST /class-progress with an account address:
/read requests with type: "classProgress", which
reach the delayed follower without PostgreSQL and return 503. Authenticated own-account
classProgress reads through /read remain supported.
Read Credential
The credential is an EIP-712NotionalReadSession message.
The signer must be
user itself or an API wallet currently approved for that account. The server
rejects a credential whose issuedAt is more than 60 seconds in its future, or whose expiresAt
has passed. Sign a new credential before the current one expires.
Header
Send the credential in the standardAuthorization header:
<token> is the unpadded base64url encoding of this JSON object:
user, and a lowercase
65-byte hex signature ending in 1b or 1c (what viem returns). Key order and whitespace do
not matter.
Signing Example
Authorization header and as the credential of a /ws/user
auth message. An API wallet can sign with a
local account, so no
wallet prompt is needed.
Info Types
With a read credential,POST /info serves:
- the credential’s own account data for
account,positions,openOrders,userFills,historicalOrders,userFundings,userNonFundingLedgerUpdates,userBorrowLendInterest,spotClearinghouseState,pendingWithdrawals,referrals,extraAgents,activeAssetData,protocolTransferQuote,transactionsByUser,twapListActive,twapListHistoryandtwapGetById.usermust equal the credential’suser; another account returns403; transactionByHashandprotocolTransferStatus, only when the credential’s account took part in the transaction or transfer. Otherwise the response is the same as “not found”;- public market metadata:
perpMeta,spotMetaandpredictionMeta; - the live types.
/info for them, which returns delayed data.
checkTerms and checkAccess also return 403 type_not_allowed on authenticated /info.
Use /info/onboarding for these types without a credential.
Live Types
POST /info/live serves these types live without a credential: config, borrowLendState,
protocolTransferRoutes and userRole. Any other type returns 403.
Onboarding Types
POST /info/onboarding serves checkTerms and checkAccess without a credential, about one
second behind the live state. After acceptTerms or setReferrer, poll briefly until the change
is visible. Any other type returns 403.
Errors
A credential that fails a check is refused. The request never falls back to delayed data.
Errors use the standard error format with code
UNAUTHORIZED,
and error reads Read authorization failed: <reason>. A credential signed by a newly approved
API wallet can get 401 from /read and /portfolio for about a second while the approval
propagates; retry briefly.