> 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/trading-api/assets-withdraw-settle-pnl/request-pnl-settlement.md).

# Request PnL Settlement

### Endpoint

`POST /v1/settle_pnl`

Mainnet: `https://api.orderly.org/v1/settle_pnl`

Testnet: `https://testnet-api.orderly.org/v1/settle_pnl`

Rate limit: 1 request per second.

Submit a PnL settlement request signed with EIP-712. Set `verifyingContract` to `0x6F7a338F2aA472838dEFD3283eB360d4Dff5D203`.

### Authentication

Send the signed-request headers with an `application/json` body.

* `orderly-timestamp` — required; signed-request timestamp in milliseconds.
* `orderly-account-id` — required; authenticated account ID.
* `orderly-key` — required; public API key.
* `orderly-signature` — required; signature generated for the API request.

### Request body

* `signature` (string, required) — EIP-712 signature over the message object.
* `userAddress` (string, required) — wallet address that signed the message.
* `verifyingContract` (string, required) — ledger contract address; use the value above.
* `message` (object, required), containing:
  * `brokerId` (string, required) — use `pangoperps`.
  * `chainId` (integer, required) — supported chain ID for the registering chain.
  * `settleNonce` (integer, required) — nonce returned by `GET /v1/settle_nonce`.
  * `timestamp` (integer, required) — current Unix timestamp in milliseconds.
  * `chainType` (string, optional) — signing-wallet chain type: `EVM` or `SOL`.

### Response

HTTP 200 — application/json. `success` is a required boolean. The required `data` object contains `settle_pnl_id` (integer). The root `timestamp` is server time in milliseconds (integer).

```
{
  "success": true,
  "data": { "settle_pnl_id": 1 },
  "timestamp": 1702989203989
}
```
