curl --request DELETE \
--url https://arena-predictions.com/api/v1/portfolio/orders/{orderId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://arena-predictions.com/api/v1/portfolio/orders/{orderId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://arena-predictions.com/api/v1/portfolio/orders/{orderId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"order": {
"orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"action": "buy",
"instrumentId": "<string>",
"instrumentLabel": "<string>",
"instrumentSide": "yes",
"orderSide": "yes",
"contracts": 123,
"filledContracts": 123,
"remainingContracts": 123,
"limitCents": 123,
"holdDollars": 123,
"timeInForce": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"status": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"type": "limit",
"cancelReason": "<string>",
"tradeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"statedProbPct": 123,
"placedVia": "<string>",
"placedPrivate": true,
"marketTicker": "<string>",
"fillPriceCents": 123
},
"reducedBy": 1,
"mode": "paper",
"venueData": true,
"organization": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}Cancel a paper order
Cancels a resting paper order and returns its hold. Kalshi’s path and answer (the order and reducedBy). Query execution=kalshi cancels a live Kalshi order instead (scope trade:write:kalshi) and does not touch the paper book. Query execution=poly-intl cancels a Polymarket International order (scope trade:write:poly-intl). Polymarket US is not offered. Send X-Arena-Org to cancel a paper order on that organization’s paper sandbox; without the header the paper cancel is on the personal account. An unknown or forbidden organization cancels nothing. An order that already filled or closed answers unchanged with reducedBy 0, so a paper cancel is safe to send twice. No ticker, title or price in the paper answer while the venue-data switch is off.
curl --request DELETE \
--url https://arena-predictions.com/api/v1/portfolio/orders/{orderId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://arena-predictions.com/api/v1/portfolio/orders/{orderId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://arena-predictions.com/api/v1/portfolio/orders/{orderId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"order": {
"orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"action": "buy",
"instrumentId": "<string>",
"instrumentLabel": "<string>",
"instrumentSide": "yes",
"orderSide": "yes",
"contracts": 123,
"filledContracts": 123,
"remainingContracts": 123,
"limitCents": 123,
"holdDollars": 123,
"timeInForce": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"status": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"type": "limit",
"cancelReason": "<string>",
"tradeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"statedProbPct": 123,
"placedVia": "<string>",
"placedPrivate": true,
"marketTicker": "<string>",
"fillPriceCents": 123
},
"reducedBy": 1,
"mode": "paper",
"venueData": true,
"organization": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"retryAfterSeconds": 2
}
}Authorizations
Authorization: Bearer arena_sk_... (the x-arena-key header is accepted too). Keys are made in Settings (https://arena-predictions.com/settings#api-keys) or with arena keys create, shown once, stored hashed.
Headers
Organization id. When present, this call uses that organization's paper sandbox. When absent, the key owner's personal paper account. A value that is not an organization id is 400 invalid_request. An unknown organization is 404 organization_not_found and one this key cannot use is 403 organization_forbidden. The personal account is never the fallback. Paper only. This header does not select a Combine evaluation account.
63Path Parameters
The order's id (orderId in GET /portfolio).
Response
The order, and how many contracts came off the book.
Show child attributes
Show child attributes
Contracts taken off the book. 0 when the order had already filled or closed.
x >= 0"paper"Present when X-Arena-Org selected an organization sandbox. Absent on the personal account.
Show child attributes
Show child attributes