cURL
curl --request DELETE \
--url https://api.jup.ag/prediction/v1/positions/{positionPubkey} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"ownerPubkey": "<string>"
}
'{
"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>",
"contractsMicro": "<string>",
"contractsDecimal": "<string>",
"newContractsMicro": "<string>",
"newContractsDecimal": "<string>",
"payoutUsd": "<string>",
"slippageBps": 1,
"maxSlippageBps": 1
},
"requiredSigners": [
"<string>"
]
}Positions
Close Position
Request an unsigned transaction to sell all contracts in a position
DELETE
/
positions
/
{positionPubkey}
cURL
curl --request DELETE \
--url https://api.jup.ag/prediction/v1/positions/{positionPubkey} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"ownerPubkey": "<string>"
}
'{
"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>",
"contractsMicro": "<string>",
"contractsDecimal": "<string>",
"newContractsMicro": "<string>",
"newContractsDecimal": "<string>",
"payoutUsd": "<string>",
"slippageBps": 1,
"maxSlippageBps": 1
},
"requiredSigners": [
"<string>"
]
}Authorizations
Get API key via https://developers.jup.ag/portal
Path Parameters
Position account public key
Minimum string length:
32Body
application/json
Position owner public key
Minimum string length:
32Response
Unsigned transaction that sells all contracts for a position
Was this page helpful?
⌘I
