Skip to main content
POST
/
positions
/
close-all
cURL
curl --request POST \
  --url https://lite-api.jup.ag/perps/v1/positions/close-all \
  --header 'Content-Type: application/json' \
  --data '{
  "walletAddress": "<string>"
}'
{
  "serializedTxs": [
    {
      "serializedTxBase64": "<string>",
      "positionRequestPubkey": "<string>"
    }
  ],
  "txMetadata": {
    "blockhash": "<string>",
    "lastValidBlockHeight": "<string>"
  }
}

Body

application/json
walletAddress
string
required

The wallet address / public key for the trader to close all open positions

Response

200 OK

An array of base64-serialized transactions and transaction metadata to close all positions.

serializedTxs
object[]
required

An array of base64-serialized transactions and the positionRequestPubkey to close all positions.

txMetadata
object
required

Contains blockhash metadata for the serialized transaction to submit and confirm the transactions.