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 ' { "minSellPriceUsd": "<string>", "ownerPubkey": "<string>", "userPubkey": "<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>" } }
Request an unsigned transaction to sell all contracts in a position
Get API key via https://portal.jup.ag
Position account public key
32
Position owner public key
Position owner public key (deprecated alias; use ownerPubkey)
Unsigned transaction that sells all contracts for a position
Base64 encoded transaction
Transaction metadata
Show child attributes
Was this page helpful?