Cancel a paper order
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
}{
"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
}
}Trading
Cancel a paper order
Cancels a resting paper order and returns its hold. Kalshi’s path and answer (the order and reducedBy). An order that already filled or closed answers unchanged with reducedBy 0, so a cancel is safe to send twice. No ticker, title or price in the answer while the venue-data switch is off.
DELETE
/
portfolio
/
orders
/
{orderId}
Cancel a paper order
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
}{
"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.
Path Parameters
The order's id (orderId in GET /portfolio).