wallet.finalize_twap route is a permissionless contract action with no client signature; Relay still authenticates and scopes its caller.
Your application’s responsibilities
Use a dedicated secondary EOA as the trading signer and grant it only the AccountCore permissions it needs. Keep the owner key and trading key separate. A trading permission is not a spending cap or a market allowlist. Store trading keys and JWTs securely. Your application owns nonce allocation, payload signing, receipt tracking, order reconciliation, and signer retirement. See Delegated Trading with Relay.The service operator’s responsibilities
The operator holds the sponsor key and manages gas budgets, transaction lanes, RPC routing, and service admission. Hosted-service clients do not need the sponsor key or control its transaction nonce. Handle the documented Relay errors for admission, quotas and nonce/deadline validation.Authentication and permissions
A Relay JWT authenticates one secondary EOA to the service. It does not grant onchain trading permission, install delegation, or replace action signatures. Expiring it does not revoke those permissions. For the verified-account rate tier, request a token withuid at public POST /auth/token. Relay verifies that wallet’s current trading authorization for the exact account and signs the account/root binding into the JWT. The signed trading header.accountId and required WebSocket account_id must match the token’s uid. A scoped JWT is still only a service-admission credential; contracts enforce permission at execution, and token issuance does not register an account or grant on-chain rights. See Relay Rate Limits and Migration. Headerless onboarding and administrative methods keep the wallet-based quota, even with a scoped JWT; their signed owner/administrator is independent of the JWT wallet.
Retiring a signer requires onchain revocation and a separate decision about resting orders and liquidity. Follow Signer Lifecycle and Nonces.
REST and WebSocket
Use REST for a straightforward submission integration. WebSocket sessions support repeated actions and transaction-outcome subscriptions. The documented Relay WebSocket uses an Authorization header on the upgrade request; standard browser WebSocket constructors cannot supply that header. Browser applications should use the supported REST path, or an explicitly designed backend connection. ABROADCAST response is not execution or finality. Verify the receipt and resulting state, or use the documented transaction outcomes. Do not blindly retry an unknown result.