Skip to main content
POST
/
v1
/
settle_pnl
Request PnL settlement
curl --request POST \
  --url https://api.orderly.org/v1/settle_pnl \
  --header 'Content-Type: application/json' \
  --header 'orderly-account-id: <orderly-account-id>' \
  --header 'orderly-key: <orderly-key>' \
  --header 'orderly-signature: <orderly-signature>' \
  --header 'orderly-timestamp: <orderly-timestamp>' \
  --data '
{
  "signature": "<string>",
  "userAddress": "<string>",
  "verifyingContract": "<string>",
  "message": {
    "brokerId": "<string>",
    "chainId": 123,
    "settleNonce": 123,
    "timestamp": 123,
    "chainType": "<string>"
  }
}
'
{
  "success": true,
  "data": {
    "settle_pnl_id": 889
  },
  "timestamp": 1692246987774
}

Headers

orderly-timestamp
string
required

Timestamp of the signed request in milliseconds.

orderly-account-id
string
required

Account ID of the authenticated account.

orderly-key
string
required

Public orderly key used to sign the request.

orderly-signature
string
required

Signature of the request payload generated with the orderly key.

Body

application/json
signature
string
required

The signature generated by signing the message object via EIP-712

userAddress
string
required

The address of the wallet signing the message object via EIP-712

verifyingContract
string
required

Address of the Orderly ledger contract

message
object
required

Message object containing the message that is signed by the wallet owner

Response

200 - application/json

OK

success
boolean
required

Indicates whether the request was successful.

Example:

true

data
object
required
timestamp
integer

Server timestamp in milliseconds.

Example:

1702989203989