Approve PermitSingle budget

Set a timed allowance budget for an operator (e.g. OperatorHub). The account grants the operator a notional USD spending budget, enabling the backend to execute orders on the account's behalf without per-order signatures. Required for TPSL (Take Profit / Stop Loss) orders.

Prerequisites:

  1. GET /v1/system/config — get operator_hub address (the operator to approve)
  2. GET /v1/auth/eip712-domain — get EIP-712 domain for signing
  3. GET /v1/nonce-state/{account} — get nonce_anchor and current_bitmap_index

Account signs PermitSingle (EIP-712):

PermitSingle(address account, address operator, uint96 budget, uint32 allowanceExpiry, uint48 nonceAnchor, uint8 nonceBitmap)

Struct hash: keccak256(abi.encode(PERMIT_SINGLE, account, operator, budget, allowanceExpiry, nonceAnchor, nonceBitmap))

Uses the EIP-712 domain from GET /v1/auth/eip712-domain.

Constraints:

  • budget must be > 0 (notional USD in WAD, 18 decimals, uint96)
  • allowanceExpiry must be in the future (unix timestamp in seconds)
  • Cannot overwrite an active (non-expired) allowance — call lockdownAllowance(operator) on the Authorization contract first, or wait for expiry
  • All submitted fields must exactly match the signed EIP-712 values

Budget management:

  • Each executed order consumes size × price (notional) from the budget
  • Query remaining budget: call getAllowance(account, operator) on the Authorization contract
  • Emergency revoke: call lockdownAllowance(operator) directly on the Authorization contract (msg.sender = account)
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string

Account address in hex format (0x...)

string

Operator address to approve (0x...)

string

Budget amount in WAD (uint96, 18 decimals)

int64

Unix timestamp when the allowance expires

string

Bitmap nonce anchor (uint48) from GetNonceState

int64

Bitmap index within the nonce anchor epoch (0-207)

string

EIP712 signature from account (65 bytes hex)

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json