Remove All Delegated Signers
Remove all delegated signers from a subaccount in a single request, revoking their ability to perform trading actions on behalf of the subaccount. This immediately terminates all trading permissions previously granted to any wallet addresses, providing a fast way to revoke all delegations at once.
Endpoint
POST https://papi.synthetix.io/v1/tradeRequest
Request Format
{
"params": {
"action": "removeAllDelegatedSigners",
"subAccountId": "1867542890123456789"
},
"nonce": 1735689600000,
"expiresAfter": 1735689900,
"signature": {
"v": 28,
"r": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"s": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890"
}
}Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
params | object | Yes | Action object containing removal details |
params.action | string | Yes | Must be "removeAllDelegatedSigners" |
params.subAccountId | string | Yes | The subaccount ID to remove all delegated signers from |
expiresAfter | integer | No | Optional request expiration timestamp (Unix seconds) |
| Parameter | Type | Required | Description |
|---|---|---|---|
nonce | uint64 | Yes* | Positive integer nonce (must be incrementing and unique per request) |
signature | object | Yes | EIP-712 signature object |
expiresAfter | uint64 | No | Unix milliseconds expiration timestamp (5x rate limit on stale cancels) |
:::info Common Parameters
These are top-level request parameters. The subAccountId parameter is specified within the params object (see each endpoint's parameter table).
:::
:::info SubAccountAction Endpoints
Endpoints using SubAccountAction signing (getPositions, getOpenOrders, getOrdersHistory, getTrades, getFundingPayments, getSubAccount, getSubAccounts, getDelegatedSigners, getBalanceUpdates) do not require the nonce parameter. Only signature and optional expiresAfter are needed.
:::
EIP-712 Signature Structure
The request is signed using EIP-712 with the following type definition:
const RemoveAllDelegatedSignersTypes = {
RemoveAllDelegatedSigners: [
{ name: "subAccountId", type: "uint256" },
{ name: "nonce", type: "uint256" },
{ name: "expiresAfter", type: "uint256" }
]
}Response
Success Response
{
"status": "ok",
"response": {
"subAccountId": "1867542890123456789",
"removedSigners": [
"0x742d35Cc6634C0532925a3b844Bc9e7595f89590",
"0x8B3a9A6F8D1e2C4E5B7A9D0F1C3E5A7B9D1F3E5A",
"0x9C4b8E7F0A2D3B6C5E8A1F3D5B7C9E1A3F5D7B9E"
]
},
"request_id": "5ccf215d37e3ae6d"
}Response Fields
| Field | Type | Description |
|---|---|---|
subAccountId | string | The subaccount ID that delegated signers were removed from |
removedSigners | string[] | Array of wallet addresses that were removed |
No Delegations Response
When there are no delegated signers to remove:
{
"status": "ok",
"response": {
"subAccountId": "1867542890123456789",
"removedSigners": []
},
"request_id": "5ccf215d37e3ae6d"
}Error Response
{
"status": "error",
"error": {
"message": "Only master account can remove delegated signers",
"code": "UNAUTHORIZED"
},
"request_id": "5ccf215d37e3ae6d"
}Common Error Cases
{
"status": "error",
"error": {
"message": "Subaccount not found",
"code": "NOT_FOUND"
},
"request_id": "5ccf215d37e3ae6d"
}Code Examples
Emergency Revocation of All Signers
{
"params": {
"action": "removeAllDelegatedSigners",
"subAccountId": "1867542890123456789"
},
"nonce": 1735689600000,
"expiresAfter": 1735689900,
"signature": {
"v": 28,
"r": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"s": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890"
}
}EIP-712 Signature
const domain = {
name: "Synthetix",
version: "1",
chainId: 1,
verifyingContract: "0x0000000000000000000000000000000000000000"
};
const types = {
RemoveAllDelegatedSigners: [
{ name: "subAccountId", type: "uint256" },
{ name: "nonce", type: "uint256" },
{ name: "expiresAfter", type: "uint256" }
]
};
const nonce = Date.now();
const expiresAfter = Math.floor(Date.now() / 1000) + 300; // 5 minutes from now (Unix seconds)
const message = {
subAccountId: BigInt("1867542890123456789"),
nonce: BigInt(nonce),
expiresAfter: BigInt(expiresAfter)
};
const signature = await signer._signTypedData(domain, types, message);Implementation Notes
- Immediate Effect: All delegations are revoked immediately upon successful execution
- Access Requirements: Only master account owners can remove delegated signers
- Atomic Operation: Either all delegations are removed or none are (transaction is atomic)
- Idempotent: Calling when no delegations exist returns a success response with an empty
removedSignersarray - Signature Required: All removal operations require valid EIP-712 signatures
- Recovery: Removed signers can be re-added individually through the
addDelegatedSignerendpoint
Use Cases
- Emergency Lockdown: Quickly revoke all delegated access in a security event
- Account Reset: Clear all delegations before setting up new access patterns
- Team Offboarding: Remove all team member access when restructuring
- Security Rotation: Revoke all existing delegations before re-adding with new permissions
Comparison with removeDelegatedSigner
| Feature | removeDelegatedSigner | removeAllDelegatedSigners |
|---|---|---|
| Scope | Single delegate address | All delegated signers |
| Parameters | Requires delegateAddress | No address needed |
| Use Case | Targeted revocation | Bulk emergency revocation |
| Response | Single address confirmed | List of all removed addresses |
Related Endpoints
- Remove Delegated Signer - Remove a single delegated signer
- Get Delegated Signers - List all delegated signers
- Add Delegated Signer - Add a new delegation
- Get Subaccounts - View all subaccounts with delegation info
Signing
All trading methods are signed using EIP-712. Each successful trading request will contain:
- A piece of structured data that includes the sender address
- A signature of the hash of that structured data, signed by the sender
For detailed information on EIP-712 signing, see EIP-712 Signing.
Nonce Management
The nonce system prevents replay attacks and ensures order uniqueness:
- Use any positive integer as nonce
- Each nonce must be greater than the previous one (incrementing)
Date.now()is a convenient option, not a requirement- If nonce conflicts occur, increment by 1 and retry
:::note SubAccountAction Exception
SubAccountAction endpoints (getPositions, getOpenOrders, getOrdersHistory, getTrades, getFundingPayments, getSubAccount, getSubAccounts, getDelegatedSigners, getBalanceUpdates) do not require a nonce. Only the signature and optional expiresAfter parameters are needed.
:::
Error Handling
| Error Code | Description | Retryable |
|---|---|---|
UNAUTHORIZED | EIP-712 signature validation failed | No |
VALIDATION_ERROR | Request validation failed | No |
MISSING_REQUIRED_FIELD | Required field is missing | No |
INVALID_FORMAT | Field format is invalid | No |
INVALID_VALUE | Invalid parameter value | No |
RATE_LIMIT_EXCEEDED | Too many requests in time window | Yes |
INSUFFICIENT_MARGIN | Not enough margin for trade | No |
ORDER_NOT_FOUND | Order does not exist | No |
OPERATION_TIMEOUT | Operation timed out | Yes |