Skip to main content

Scopes

Keys issued before this release keep exactly their scopes. A key without vault:migrate or vault:write gets 403 api_key_scope_missing on the upgrade.

Getting a key with the new scopes

What a key can do without your signature

A leaked key with vault:migrate can migrate your account irreversibly but cannot take funds. Give a bot only the scopes it uses. Keys of a closed, blocked or banned account are refused on REST and on the WebSocket.

WebSocket

/ws/user authenticates as before. The connected greeting adds vaultAddresses, every vault of the bound wallet:
vault_positions and vault_activity accept any address in vaultAddresses as an id:
  • Upgrading while connected: subscribe to the new vault on the same socket, no reconnect needed. vaultAddress stays the one from the handshake; use vault_activated to learn the active vault.
  • Close codes: a closed, blocked or banned account is refused with 4401 and reason account_closed, account_blocked or wallet_banned (account_unavailable for a multi-wallet key’s X-User-Wallet). Rotating a key closes its sockets with 4409 api_key_changed; an expired key’s sockets close when it expires.