Skip to main content
POST
Cancel prediction order
This endpoint is in closed beta. It is available only to accounts enrolled in the beta, and only on staging (https://api.tradearies.dev). Request and response shapes may change before general availability.

Overview

A cancel is asynchronous. The endpoint returns 202 Accepted with the order and its cancel outstanding (pendingAction is cancel). The venue’s answer arrives afterwards:
  • If the venue cancels the order, its state becomes canceled.
  • If the venue refuses, for example because the order filled first, the order is unchanged and still working, and the reason is on the order.
Follow the answer on the order stream, or read it back with Get Prediction Order. The venue has no partial cancel. To reduce an order’s size instead, replace it with a smaller quantity.

Request

Requests act on an account: accountId must be the account the order is on. Any user acting on the account can cancel its orders, and you are recorded as the user who asked.

Example

Errors

Authorizations

Authorization
string
header
required

OAuth2 Bearer token: obtain an access token from the token endpoint and send it in the Authorization header.

Path Parameters

orderId
string<uuid>
required

orderId returned by Place Prediction Order or List Prediction Orders.

Body

application/json

Unknown fields are rejected with 400.

accountId
string
required

The account the order is on. Requests act on the account; you are recorded as who asked.

Example:

"ACCOUNT-0001"

Response

Cancel sent. The venue has not answered yet.

Standard success envelope used by all success responses. data is endpoint-specific.

success
boolean
required
Example:

true

data
object

An order as recorded by order entry. Submitted terms (quantity, price, …) never change; working terms (workingQuantity, workingPrice, …) are the venue's answer. Optional decimals and timestamps are omitted when absent, never zero.