cURL
curl --request DELETE \
--url https://api.jup.ag/prediction/v1/positions \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"ownerPubkey": "<string>"
}
'{
"data": [
{
"transaction": "<string>",
"txMeta": {
"blockhash": "<string>",
"lastValidBlockHeight": 1
},
"externalOrderId": "<string>",
"order": {
"orderPubkey": "<string>",
"orderAtaPubkey": "<string>",
"userPubkey": "<string>",
"marketId": "<string>",
"marketIdHash": "<string>",
"positionPubkey": "<string>",
"isBuy": true,
"isYes": true,
"contracts": "<string>",
"newContracts": "<string>",
"maxBuyPriceUsd": "<string>",
"minSellPriceUsd": "<string>",
"externalOrderId": "<string>",
"orderCostUsd": "<string>",
"newAvgPriceUsd": "<string>",
"newSizeUsd": "<string>",
"newPayoutUsd": "<string>",
"estimatedProtocolFeeUsd": "<string>",
"estimatedVenueFeeUsd": "<string>",
"estimatedTotalFeeUsd": "<string>"
}
}
]
}Positions
Close All Positions
Request unsigned transactions to close all open positions
DELETE
/
positions
cURL
curl --request DELETE \
--url https://api.jup.ag/prediction/v1/positions \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"ownerPubkey": "<string>"
}
'{
"data": [
{
"transaction": "<string>",
"txMeta": {
"blockhash": "<string>",
"lastValidBlockHeight": 1
},
"externalOrderId": "<string>",
"order": {
"orderPubkey": "<string>",
"orderAtaPubkey": "<string>",
"userPubkey": "<string>",
"marketId": "<string>",
"marketIdHash": "<string>",
"positionPubkey": "<string>",
"isBuy": true,
"isYes": true,
"contracts": "<string>",
"newContracts": "<string>",
"maxBuyPriceUsd": "<string>",
"minSellPriceUsd": "<string>",
"externalOrderId": "<string>",
"orderCostUsd": "<string>",
"newAvgPriceUsd": "<string>",
"newSizeUsd": "<string>",
"newPayoutUsd": "<string>",
"estimatedProtocolFeeUsd": "<string>",
"estimatedVenueFeeUsd": "<string>",
"estimatedTotalFeeUsd": "<string>"
}
}
]
}Documentation Index
Fetch the complete documentation index at: https://dev.jup.ag/docs/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Get API key via https://developers.jup.ag/portal
Body
application/json
Position owner public key
Minimum string length:
32Response
Unsigned transactions that sell all contracts across every open position for the user
- Option 1
- Option 2
Show child attributes
Show child attributes
Was this page helpful?
⌘I
