post
https://api.testnet.rise.trade/v1/auth/approve-single
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:
GET /v1/system/config— getoperator_hubaddress (theoperatorto approve)GET /v1/auth/eip712-domain— get EIP-712 domain for signingGET /v1/nonce-state/{account}— getnonce_anchorandcurrent_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:
budgetmust be > 0 (notional USD in WAD, 18 decimals, uint96)allowanceExpirymust 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
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…