Skip to main content
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 '
{
  "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>"
  }
}

Authorizations

x-api-key
string
header
required

Get API key via https://portal.jup.ag

Path Parameters

positionPubkey
string
required

Position account public key

Minimum string length: 32

Body

application/json
minSellPriceUsd
required
ownerPubkey
string

Position owner public key

Minimum string length: 32
userPubkey
string

Position owner public key (deprecated alias; use ownerPubkey)

Minimum string length: 32

Response

Unsigned transaction that sells all contracts for a position

transaction
string | null
required

Base64 encoded transaction

txMeta
object
required

Transaction metadata

externalOrderId
string | null
required
order
object
required