> For the complete documentation index, see [llms.txt](https://docs.pangolin.exchange/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pangolin.exchange/pangoperps/user-api/delegate-signer.md).

# Delegate Signer

Authorize and use a delegate signer for supported account actions.

## Delegate Signer

These operations register an authorized delegate, add a key for that delegate, and allow it to submit settlement or withdrawal requests. The wallet authorization fields remain required even when the REST request itself is authenticated.

### Delegate Signer

**POST /v1/delegate\_signer**\
Mainnet: POST <https://api.orderly.org/v1/delegate\\_signer\\>
Testnet: POST <https://testnet-api.orderly.org/v1/delegate\\_signer\\>
Rate limit: 1 request per second.

Submit `application/json`. Required `message` object fields: `delegateContract` (string), `brokerId` (string; use `pangoperps`), `chainId` (integer, supported registration chain), `timestamp` (integer, UNIX milliseconds), `registrationNonce` (integer from the delegate signer registration flow), and `txHash` (string, authorization transaction hash). Also include `signature` (string, wallet signature of the message) and `userAddress` (string, signing wallet address).

HTTP 200 returns `success`, `timestamp`, and `data.user_id` (integer), `data.account_id` (string), and `data.valid_signer` (string).

```
{"message":{"delegateContract":"0xaddress","brokerId":"pangoperps","chainId":421613,"timestamp":1704879369551,"registrationNonce":161111791392,"txHash":"0xtxhash"},"signature":"0x8668447f28534dc1b76566e41f5fcdeb6b131355b9cf428f3fae5c134e9a0fc55642a2771860484651e61043e8ac67a1a6e54031a4c66de44acd77c9d9b281e81b","userAddress":"0xDd3287043493E0a08d2B348397554096728B459c"}
```

### Add Delegate Signer API Key

**POST /v1/delegate\_orderly\_key**\
Mainnet: POST <https://api.orderly.org/v1/delegate\\_orderly\\_key\\>
Testnet: POST <https://testnet-api.orderly.org/v1/delegate\\_orderly\\_key\\>
Rate limit: 1 request per second.

Submit `application/json`. The required `message` object contains `delegateContract` (string, authorized delegate contract), `brokerId` (string, use `pangoperps`), `chainId` (integer, supported registration chain), `orderlyKey` (string, key to add), `scope` (string), `timestamp` (number, UNIX milliseconds), and `expiration` (number, UNIX milliseconds; maximum 365 days from creation). Scopes are independent: `trading` does not include `read`; use `read,trading` for both permissions. Include required `signature` (string, signed message) and `userAddress` (string, signing wallet address).

HTTP 200 returns `success`, required `data.orderly_key` (string, key added), `data.id` (integer, key record ID), and server `timestamp` (integer, milliseconds).

### Delegate Signer Settle PnL

**POST /v1/delegate\_settle\_pnl**\
Mainnet: POST <https://api.orderly.org/v1/delegate\\_settle\\_pnl\\>
Testnet: POST <https://testnet-api.orderly.org/v1/delegate\\_settle\\_pnl\\>
Rate limit: 1 request per second.

Required signed headers: `orderly-timestamp`, `orderly-account-id`, `orderly-key`, and `orderly-signature`. Submit `application/json` with `signature` (string, wallet signature of the message), `userAddress` (string, signing wallet), `verifyingContract` (string, signature-verification contract), and required `message` object. Its required fields are `delegateContract` (string), `brokerId` (string; use `pangoperps`), `chainId` (integer, settlement chain), `settleNonce` (integer from Get Settle PnL Nonce), and `timestamp` (integer, UNIX milliseconds).

HTTP 200 returns `success`, required `data.settle_pnl_id` (integer), and server `timestamp`.

### Delegate Signer Withdrawal Request

**POST /v1/delegate\_withdraw\_request**\
Mainnet: POST <https://api.orderly.org/v1/delegate\\_withdraw\\_request\\>
Testnet: POST <https://testnet-api.orderly.org/v1/delegate\\_withdraw\\_request\\>
Rate limit: 1 request per second.

Required signed headers: `orderly-timestamp`, `orderly-account-id`, `orderly-key`, and `orderly-signature`. Submit `application/json` with `signature` (string, EIP-712 signature), `userAddress` (string, signing wallet), `verifyingContract` (string, signature-verification contract), and required `message` object. Message fields: `delegateContract` (string), `brokerId` (string; use `pangoperps`), `chainId` (integer, settlement chain), `receiver` (string, destination address), `token` (string, token symbol such as `USDC`), `amount` (string), `withdrawNonce` (string from Get Withdrawal Nonce), and `timestamp` (string, current UNIX milliseconds).

HTTP 200 returns `success`, required `data.withdraw_id` (integer), and server `timestamp`.
