Jupiter — Prediction API — Prepare unsigned close position
Build an unsigned transaction that sells every contract of one position before the market resolves. Sign it and submit it to `POST /execute` together with the `execution.context` object. This is an unsigned preparation/quote operation; no transaction was signed, submitted or executed in verification. Latest request and response verified through OpenAny testnet.
- Selected price
- $0 / callPublished pricing
- Sellers / APIs
- 1 / 1
- Requests · 30d
- —Loading...
- Success rate · 30d
- —Loading...
Jupiter — Prediction API — Prepare unsigned close position
Prepare your request, then continue with your agent.
Selected price
$0 / call
- Provider
- Pricing
On this page
Playground
Run sends a real API request. Charges follow the published API contract.
Response structure
clientOrderIdstringexecutionobjectcontextobjecttypestring
endpointstring
externalOrderIdstringisGaslessbooleanorderobjectclientOrderIdstringcontractsstringcontractsDecimalstringcontractsMicrostringestimatedIntegratorFeeUsdstringestimatedProtocolFeeUsdstringestimatedTotalFeeUsdstringestimatedVenueFeeUsdstringexternalOrderIdstringisBuybooleanisYesbooleanmarketIdstringmarketIdHashstringmaxBuyPriceUsdnullmaxSlippageBpsintegerminSellPriceUsdstringnewAvgPriceUsdstringnewContractsstringnewContractsDecimalstringnewContractsMicrostringnewPayoutUsdstringnewSizeUsdstringorderAtaPubkeystringorderCostUsdstringorderPubkeystringpayoutUsdstringpositionPubkeystringslippageBpsintegeruserPubkeystring
requiredSignersstring[]transactionstringtxMetaobjectblockhashstringlastValidBlockHeightinteger
// Inferred from response examples. Fields are optional and other fields may be returned.
export type ApiResponse = {
clientOrderId?: string;
execution?: {
context?: {
type?: string;
};
endpoint?: string;
};
externalOrderId?: string;
isGasless?: boolean;
order?: {
clientOrderId?: string;
contracts?: string;
contractsDecimal?: string;
contractsMicro?: string;
estimatedIntegratorFeeUsd?: string;
estimatedProtocolFeeUsd?: string;
estimatedTotalFeeUsd?: string;
estimatedVenueFeeUsd?: string;
externalOrderId?: string;
isBuy?: boolean;
isYes?: boolean;
marketId?: string;
marketIdHash?: string;
maxBuyPriceUsd?: null;
maxSlippageBps?: number;
minSellPriceUsd?: string;
newAvgPriceUsd?: string;
newContracts?: string;
newContractsDecimal?: string;
newContractsMicro?: string;
newPayoutUsd?: string;
newSizeUsd?: string;
orderAtaPubkey?: string;
orderCostUsd?: string;
orderPubkey?: string;
payoutUsd?: string;
positionPubkey?: string;
slippageBps?: number;
userPubkey?: string;
};
requiredSigners?: Array<string>;
transaction?: string;
txMeta?: {
blockhash?: string;
lastValidBlockHeight?: number;
};
};Sellers
| Seller | Pricing | Requests · 30d | Performance | Access |
|---|---|---|---|---|
jupiterCurrent Jupiter — Prediction API — Prepare unsigned close position · DELETE · View API reference | $0 / call | — | —successP50— |
- Unit price
- $0
Statistics use persisted gateway logs from the last 30 days up to now, including today.
Success rate = successful requests / all requests;
P50 = median latency of successful requests.
Prices reflect the published API contract. Contract revision: 2. Price update time: not supplied.
Total $0
API
- Method
- DELETE
- Endpoint
https://api.openany.si/v1/agent-apis/jupiter/prediction/v1/positions/{positionPubkey}- Content type
- application/json
- Authentication
Authorization: Bearer $OPENANY_API_KEY
curl \
'https://api.openany.si/v1/agent-apis/jupiter/prediction/v1/positions/5RgcHYYMPccH6a6oJnxtf6tvuNS2qfBStXxNokyWKLpf' \
-X DELETE \
-H "Authorization: Bearer $OPENANY_API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{
"ownerPubkey": "EqKSEoXiwA65pGbyZvmY6EfhEn5i7MuKwmUF4fVNuTg6"
}'Input parameters
Fields in this listing; additional options and input encoding can vary by provider.
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
positionPubkey | URL path parameterspath | string | Yes | Position account public key minLength: 32 |
ownerPubkey | JSON request bodybody | string | No | Position owner public key minLength: 32 |
Required markers inside a nested object or variant apply when that object or variant is used.
Sample response
Sample response · Documented HTTP 200 Published documentation example. Verify the actual response after an approved call.
{
"clientOrderId": "28ed634b69f44be389c0aa24968292fc",
"execution": {
"context": {
"type": "create_order"
},
"endpoint": "/api/v1/execute"
},
"externalOrderId": "28ed634b69f44be389c0aa24968292fc",
"isGasless": false,
"order": {
"clientOrderId": "28ed634b69f44be389c0aa24968292fc",
"contracts": "102",
"contractsDecimal": "102.93",
"contractsMicro": "102930000",
"estimatedIntegratorFeeUsd": "0",
"estimatedProtocolFeeUsd": "0",
"estimatedTotalFeeUsd": "1570202",
"estimatedVenueFeeUsd": "1570202",
"externalOrderId": "28ed634b69f44be389c0aa24968292fc",
"isBuy": false,
"isYes": true,
"marketId": "POLY-6347272-1",
"marketIdHash": "6863d587602a48eb4fceb1a04f56bb30",
"maxBuyPriceUsd": null,
"maxSlippageBps": 2500,
"minSellPriceUsd": "210000",
"newAvgPriceUsd": "0",
"newContracts": "0",
"newContractsDecimal": "0",
"newContractsMicro": "0",
"newPayoutUsd": "0",
"newSizeUsd": "0",
"orderAtaPubkey": "85UArgkaEmDv7HowNfVdTKXmU6UWiFJYMKp9oHuUD8xb",
"orderCostUsd": "0",
"orderPubkey": "4SF6LH5Xbxz4fuMa15bdiopaK67oDLNc3iAz8mjitue6",
"payoutUsd": "102930000",
"positionPubkey": "5RgcHYYMPccH6a6oJnxtf6tvuNS2qfBStXxNokyWKLpf",
"slippageBps": 0,
"userPubkey": "EqKSEoXiwA65pGbyZvmY6EfhEn5i7MuKwmUF4fVNuTg6"
},
"requiredSigners": [
"EqKSEoXiwA65pGbyZvmY6EfhEn5i7MuKwmUF4fVNuTg6"
],
"transaction": "AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADsGBTmEwBF3PfVa1r55qlWEAd/BjsuQLgPb7lty4BiteOUbCGCgTRk7JtyH0t9K1cqqfmHpf53/8RX+NVMv3cAgAIBBgzNiKdPWQ7EAYyDWz0dc2U+0XRiuPEwadRV6V2uiGjXc4pI+E5Qg1NtOawuU241JvUbkDGLCMTmdMsZd8yesS2gMwqDyptEUnaa9S7ml06M+rSRpxBH0JuwHrRWKdpOEP9BwXjyMjMKtl10i+3BIBcoMUYP2ZaxIRrZ6ZcsXN3r2Gkm2lXWlzxwvm5QysDsyL+tqFVWqinyFGYulwflkfSkj3mhApD7fEYiX+irhD/BT9Eemx2S/uzC9yDc3uP5D5UmDyo5Ib7v0YpssyPyQPaDsYXYzpxmnPmExGNVoy9tIYtplLZeyZ5FTtHhbzoJzQRwyBDzGetJmMsut9XTCvUjjJclj04kifG7PRApFI4NgwtaE5na/xCEBI572Nvp+FkDBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAASWmnM222lIweUWwz+Ue/cr5jTUZr1A53p+4ikQNTACBt324ddloZPZy+FGzut5rBy0he1fWzeROoz1hX7/AKkgZWj6yGQMv7GTpCR0L0leksd+z0g7pcHUPJSQhp4wDwQJAAkDUMMAAAAAAAAJAAUC8EkCAAgGAAUACgwLAQEGDQAAAQ0DAgcFCgQLCAxtlu0RPTvAfDQgAAAAMjhlZDYzNGI2OWY0NGJlMzg5YzBhYTI0OTY4MjkyZmMgAAAANjg2M2Q1ODc2MDJhNDhlYjRmY2ViMWEwNGY1NmJiMzABAFCWIgYAAAAAUDQDAAAAAAAAAAAAAAAAAAAAAAFS/LtlOFIqbeHphq+FUwEIanitliMNofwBm1bdlcuougACBQE=",
"txMeta": {
"blockhash": "3BTjZtURbmSE5PNtDgw44TDSF276kT5Jim5UkpL5MRUJ",
"lastValidBlockHeight": 441204083
}
}Agent integration
Copy the resource contract without sharing an API key.
View API Markdown
# Jupiter — Prediction API — Prepare unsigned close position
Build an unsigned transaction that sells every contract of one position before the market resolves. Sign it and submit it to `POST /execute` together with the `execution.context` object. This is an unsigned preparation/quote operation; no transaction was signed, submitted or executed in verification. Latest request and response verified through OpenAny testnet.
## Available implementations
jupiter · Jupiter — Prediction API — Prepare unsigned close position: https://openany.si/markets/apis/capabilities/jupiter-prediction-api-prepare-unsigned-close-position?offering=81891742-900a-4bdc-adb4-2ef6a80ffee1 · $0 / call
## Selected API contract
Documentation: https://openany.si/apis/81891742-900a-4bdc-adb4-2ef6a80ffee1
Method: DELETE
Endpoint: https://api.openany.si/v1/agent-apis/jupiter/prediction/v1/positions/{positionPubkey}
Price: $0 / call
Provider: jupiter
Contract revision: 2
Price source: OpenAny public API contract and documented provider unit rates. Price update time: not supplied.
Use OPENANY_API_KEY from the environment. API Key calls use your shared balance.
## Prepared request
```bash
curl \
'https://api.openany.si/v1/agent-apis/jupiter/prediction/v1/positions/5RgcHYYMPccH6a6oJnxtf6tvuNS2qfBStXxNokyWKLpf' \
-X DELETE \
-H "Authorization: Bearer $OPENANY_API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{
"ownerPubkey": "EqKSEoXiwA65pGbyZvmY6EfhEn5i7MuKwmUF4fVNuTg6"
}'
```
## API contract
```json
{
"resource_type": "api",
"name": "Jupiter — Prediction API — Prepare unsigned close position",
"endpoint": "https://api.openany.si/v1/agent-apis/jupiter/prediction/v1/positions/{positionPubkey}",
"method": "DELETE",
"content_type": "application/json",
"execution_mode": "sync",
"authentication": {
"type": "bearer",
"environment_variable": "OPENANY_API_KEY"
},
"inputs": [
{
"description": "Position account public key",
"location": "path",
"min_length": 32,
"name": "positionPubkey",
"nullable": false,
"required": true,
"type": "string"
},
{
"description": "Close position — complete JSON body for the verified unsigned preparation profile.",
"json_schema": {
"description": "Close position — complete JSON body for the verified unsigned preparation profile.",
"examples": [
{
"ownerPubkey": "EqKSEoXiwA65pGbyZvmY6EfhEn5i7MuKwmUF4fVNuTg6"
}
],
"properties": {
"ownerPubkey": {
"description": "Position owner public key",
"example": "EqKSEoXiwA65pGbyZvmY6EfhEn5i7MuKwmUF4fVNuTg6",
"minLength": 32,
"type": "string"
}
},
"type": "object"
},
"location": "body",
"name": "body",
"nullable": false,
"pointer": "",
"required": true,
"type": "object"
}
],
"billing": {
"currency": "USD",
"mode": "fixed",
"priceMicroUsd": "0",
"rounding": null,
"unit": "call",
"unitQuantity": null
},
"examples": [
{
"http_status": 200,
"name": "Documentation example",
"request": {
"body": {
"ownerPubkey": "EqKSEoXiwA65pGbyZvmY6EfhEn5i7MuKwmUF4fVNuTg6"
},
"headers": {},
"path": {
"positionPubkey": "5RgcHYYMPccH6a6oJnxtf6tvuNS2qfBStXxNokyWKLpf"
},
"query": {}
},
"response_body": {
"clientOrderId": "28ed634b69f44be389c0aa24968292fc",
"execution": {
"context": {
"type": "create_order"
},
"endpoint": "/api/v1/execute"
},
"externalOrderId": "28ed634b69f44be389c0aa24968292fc",
"isGasless": false,
"order": {
"clientOrderId": "28ed634b69f44be389c0aa24968292fc",
"contracts": "102",
"contractsDecimal": "102.93",
"contractsMicro": "102930000",
"estimatedIntegratorFeeUsd": "0",
"estimatedProtocolFeeUsd": "0",
"estimatedTotalFeeUsd": "1570202",
"estimatedVenueFeeUsd": "1570202",
"externalOrderId": "28ed634b69f44be389c0aa24968292fc",
"isBuy": false,
"isYes": true,
"marketId": "POLY-6347272-1",
"marketIdHash": "6863d587602a48eb4fceb1a04f56bb30",
"maxBuyPriceUsd": null,
"maxSlippageBps": 2500,
"minSellPriceUsd": "210000",
"newAvgPriceUsd": "0",
"newContracts": "0",
"newContractsDecimal": "0",
"newContractsMicro": "0",
"newPayoutUsd": "0",
"newSizeUsd": "0",
"orderAtaPubkey": "85UArgkaEmDv7HowNfVdTKXmU6UWiFJYMKp9oHuUD8xb",
"orderCostUsd": "0",
"orderPubkey": "4SF6LH5Xbxz4fuMa15bdiopaK67oDLNc3iAz8mjitue6",
"payoutUsd": "102930000",
"positionPubkey": "5RgcHYYMPccH6a6oJnxtf6tvuNS2qfBStXxNokyWKLpf",
"slippageBps": 0,
"userPubkey": "EqKSEoXiwA65pGbyZvmY6EfhEn5i7MuKwmUF4fVNuTg6"
},
"requiredSigners": [
"EqKSEoXiwA65pGbyZvmY6EfhEn5i7MuKwmUF4fVNuTg6"
],
"transaction": "AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADsGBTmEwBF3PfVa1r55qlWEAd/BjsuQLgPb7lty4BiteOUbCGCgTRk7JtyH0t9K1cqqfmHpf53/8RX+NVMv3cAgAIBBgzNiKdPWQ7EAYyDWz0dc2U+0XRiuPEwadRV6V2uiGjXc4pI+E5Qg1NtOawuU241JvUbkDGLCMTmdMsZd8yesS2gMwqDyptEUnaa9S7ml06M+rSRpxBH0JuwHrRWKdpOEP9BwXjyMjMKtl10i+3BIBcoMUYP2ZaxIRrZ6ZcsXN3r2Gkm2lXWlzxwvm5QysDsyL+tqFVWqinyFGYulwflkfSkj3mhApD7fEYiX+irhD/BT9Eemx2S/uzC9yDc3uP5D5UmDyo5Ib7v0YpssyPyQPaDsYXYzpxmnPmExGNVoy9tIYtplLZeyZ5FTtHhbzoJzQRwyBDzGetJmMsut9XTCvUjjJclj04kifG7PRApFI4NgwtaE5na/xCEBI572Nvp+FkDBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAASWmnM222lIweUWwz+Ue/cr5jTUZr1A53p+4ikQNTACBt324ddloZPZy+FGzut5rBy0he1fWzeROoz1hX7/AKkgZWj6yGQMv7GTpCR0L0leksd+z0g7pcHUPJSQhp4wDwQJAAkDUMMAAAAAAAAJAAUC8EkCAAgGAAUACgwLAQEGDQAAAQ0DAgcFCgQLCAxtlu0RPTvAfDQgAAAAMjhlZDYzNGI2OWY0NGJlMzg5YzBhYTI0OTY4MjkyZmMgAAAANjg2M2Q1ODc2MDJhNDhlYjRmY2ViMWEwNGY1NmJiMzABAFCWIgYAAAAAUDQDAAAAAAAAAAAAAAAAAAAAAAFS/LtlOFIqbeHphq+FUwEIanitliMNofwBm1bdlcuougACBQE=",
"txMeta": {
"blockhash": "3BTjZtURbmSE5PNtDgw44TDSF276kT5Jim5UkpL5MRUJ",
"lastValidBlockHeight": 441204083
}
}
}
]
}
```Error handling
| Status | Next step |
|---|---|
400 | Check the offering and request fields. |
401 / 403 | Verify your credentials and access permissions. |
402 | Inspect the selected access mode and returned payment requirements. |
429 | Respect the returned rate limit and retry guidance. |
5xx | Inspect the error and usage record before retrying a paid operation. |
Examples
Documentation example
Published documentation example. Verify the actual response after an approved call.
Prepare your environment
Use a terminal with cURL installed.
Use an OpenAny API key with shared-balance access. Confirm availability and price before running; a call may charge your balance.
Set the key in your terminal using the hidden prompt below. Keep its value out of source files and logs.
Terminal · macOS / Linuxprintf 'OpenAny API key: ' read -r -s OPENANY_API_KEY export OPENANY_API_KEY printf '\n'Run the request
Paste the complete command below into your terminal.
Values to replace before running 2
Review these request fields before running. Keep the published provider and request method unchanged.
positionPubkey- Position account public key
body- Close position — complete JSON body for the verified unsigned preparation profile.
Terminal · cURLcurl \ 'https://api.openany.si/v1/agent-apis/jupiter/prediction/v1/positions/5RgcHYYMPccH6a6oJnxtf6tvuNS2qfBStXxNokyWKLpf' \ -X DELETE \ -H "Authorization: Bearer $OPENANY_API_KEY" \ -H 'Content-Type: application/json' \ --data-raw '{ "ownerPubkey": "EqKSEoXiwA65pGbyZvmY6EfhEn5i7MuKwmUF4fVNuTg6" }'Check the response
Sample response · Documented HTTP 200
Sample response{ "clientOrderId": "28ed634b69f44be389c0aa24968292fc", "execution": { "context": { "type": "create_order" }, "endpoint": "/api/v1/execute" }, "externalOrderId": "28ed634b69f44be389c0aa24968292fc", "isGasless": false, "order": { "clientOrderId": "28ed634b69f44be389c0aa24968292fc", "contracts": "102", "contractsDecimal": "102.93", "contractsMicro": "102930000", "estimatedIntegratorFeeUsd": "0", "estimatedProtocolFeeUsd": "0", "estimatedTotalFeeUsd": "1570202", "estimatedVenueFeeUsd": "1570202", "externalOrderId": "28ed634b69f44be389c0aa24968292fc", "isBuy": false, "isYes": true, "marketId": "POLY-6347272-1", "marketIdHash": "6863d587602a48eb4fceb1a04f56bb30", "maxBuyPriceUsd": null, "maxSlippageBps": 2500, "minSellPriceUsd": "210000", "newAvgPriceUsd": "0", "newContracts": "0", "newContractsDecimal": "0", "newContractsMicro": "0", "newPayoutUsd": "0", "newSizeUsd": "0", "orderAtaPubkey": "85UArgkaEmDv7HowNfVdTKXmU6UWiFJYMKp9oHuUD8xb", "orderCostUsd": "0", "orderPubkey": "4SF6LH5Xbxz4fuMa15bdiopaK67oDLNc3iAz8mjitue6", "payoutUsd": "102930000", "positionPubkey": "5RgcHYYMPccH6a6oJnxtf6tvuNS2qfBStXxNokyWKLpf", "slippageBps": 0, "userPubkey": "EqKSEoXiwA65pGbyZvmY6EfhEn5i7MuKwmUF4fVNuTg6" }, "requiredSigners": [ "EqKSEoXiwA65pGbyZvmY6EfhEn5i7MuKwmUF4fVNuTg6" ], "transaction": "AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADsGBTmEwBF3PfVa1r55qlWEAd/BjsuQLgPb7lty4BiteOUbCGCgTRk7JtyH0t9K1cqqfmHpf53/8RX+NVMv3cAgAIBBgzNiKdPWQ7EAYyDWz0dc2U+0XRiuPEwadRV6V2uiGjXc4pI+E5Qg1NtOawuU241JvUbkDGLCMTmdMsZd8yesS2gMwqDyptEUnaa9S7ml06M+rSRpxBH0JuwHrRWKdpOEP9BwXjyMjMKtl10i+3BIBcoMUYP2ZaxIRrZ6ZcsXN3r2Gkm2lXWlzxwvm5QysDsyL+tqFVWqinyFGYulwflkfSkj3mhApD7fEYiX+irhD/BT9Eemx2S/uzC9yDc3uP5D5UmDyo5Ib7v0YpssyPyQPaDsYXYzpxmnPmExGNVoy9tIYtplLZeyZ5FTtHhbzoJzQRwyBDzGetJmMsut9XTCvUjjJclj04kifG7PRApFI4NgwtaE5na/xCEBI572Nvp+FkDBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAASWmnM222lIweUWwz+Ue/cr5jTUZr1A53p+4ikQNTACBt324ddloZPZy+FGzut5rBy0he1fWzeROoz1hX7/AKkgZWj6yGQMv7GTpCR0L0leksd+z0g7pcHUPJSQhp4wDwQJAAkDUMMAAAAAAAAJAAUC8EkCAAgGAAUACgwLAQEGDQAAAQ0DAgcFCgQLCAxtlu0RPTvAfDQgAAAAMjhlZDYzNGI2OWY0NGJlMzg5YzBhYTI0OTY4MjkyZmMgAAAANjg2M2Q1ODc2MDJhNDhlYjRmY2ViMWEwNGY1NmJiMzABAFCWIgYAAAAAUDQDAAAAAAAAAAAAAAAAAAAAAAFS/LtlOFIqbeHphq+FUwEIanitliMNofwBm1bdlcuougACBQE=", "txMeta": { "blockhash": "3BTjZtURbmSE5PNtDgw44TDSF276kT5Jim5UkpL5MRUJ", "lastValidBlockHeight": 441204083 } }