Skip to main content
A key authenticates the call. The vault contract only moves funds with a signature from the funds’ owner, or from a vault agent the owner granted, sent in the request body. Market reads need no key and ignore one. Get deployment and the RFQ reads need no key either, but an invalid, expired or revoked key on them returns 401.

Keys

This section and the next are about API keys (ttk_). There is one kind. Each key acts for one account, yours or a maker’s, and holds only scopes that account can use.
  • The key alone selects the account, chain and vault. No header or parameter does.
  • A key for a maker naming another maker_id gets 404.
  • Keys start with ttk_v1_prd_, or ttk_v1_stg_ on Staging.

Maker routes

A maker key calls these, each with the scope in Scopes: A maker key reads /v1/me/positions, /v1/me/activity, /v1/me/operations and its capital only if it holds vault:read. Totalis grants nothing else. The maker’s position, exposure, performance and activity pages in the app read /v1/makers/{maker_id}/... routes that only the app’s session can call. A maker key gets 403 on them.

Create, rotate, revoke

The account’s wallet approves every API key. In the Totalis app, under Account, then API keys:
  1. Enter a name, the scopes and an expiry: 1, 7, 30 or 90 days, or Forever. Only your account’s scopes are offered.
  2. Your wallet approves with a Sign-In with Ethereum message.
  3. Copy the key. It is shown once.
Rotating takes the same approval and keeps the name and scopes. The old key can overlap for none, one hour or 24 hours. Revoking needs no signature and takes effect at once. If a create or rotate retry returns SECRET_UNAVAILABLE, the secret was issued and cannot be shown again: revoke that key and create another. An API key cannot create, rotate or revoke keys. Outside the app, the approval is three calls: a key approval challenge, the wallet’s personal_sign of its Sign-In with Ethereum message, then the create or rotate call with that proof. They need a wallet session or an app session from an allowed origin, never an API key. Through the API, expires_in_days is 1 to 90, or 0 for no expiry (30 when omitted), and overlap_seconds is 0 to 86400 (3600 when omitted).

Scopes

Any active maker can issue both maker scope sets from its wallet session: QUOTING_BOT_SCOPES and COLLATERAL_SCOPES in the SDK (Manage keys).

Wallet key

If your account signs in with its own wallet, you already hold that wallet’s private key. For an account created in the Totalis app, the wallet is embedded in the app. To sign from code, export its key once in a browser: Account, then Private key, then Export private key. A maker needs it for everything after signup. Check its address equals wallet in GET /v1/me, or for a maker, signer in Get maker capital. A maker key cannot call GET /v1/me.
The exported key also signs withdrawals. Anyone who has it can withdraw everything the account holds. Keep only the balance your bot needs.
A maker is one wallet too. Its bot signs confirmations with that wallet’s key, the same key that funds and withdraws the maker. Anyone who has it controls the maker, so keep only the collateral your bot needs. A maker cannot move to another wallet: see Your maker wallet and Move maker funds.

Who signs what

A vault agent signs only the rows that name it, and an agent’s Exit only pays the account’s own wallet or its HyperCore spot balance (Vault agents). Settling and claiming need no signature. Send signatures as lowercase hex with v of 27 or 28. EOA and ERC-1271 signatures are accepted from your wallet. A vault agent signs as an EOA.

Domain

Read Get deployment before you sign; re-read the fees before each quote.

Types

API names and signed names

Signed field names differ from the API’s. This is the only place they do.

USDC nonces

Signature windows are on Limits.