Skip to main content
PATCH
Replace 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 replace is asynchronous. The endpoint returns 202 Accepted with the order and its amend outstanding (pendingAction is replace). The order keeps working on its current terms until the venue confirms:
  • If the venue accepts, the order’s working terms change.
  • If the venue refuses, the order keeps its previous terms and the reason is on the order.
Follow the answer on the order stream, or read it back with Get Prediction Order.

Request

Send accountId and only the terms you want to change. A term you leave out keeps the order’s working value.
symbol, outcome, side and orderType cannot change. To change them, cancel the order and place a new one. Decimals are exact values sent as JSON strings, and unknown fields are rejected with 400 UNKNOWN_FIELD.

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

Send only the terms to change; a term left out keeps the working order's value. symbol, outcome, side and orderType cannot change, and quantity cannot go below what has executed. Unknown fields are rejected with 400.

accountId
string
required

The account the order is on.

Example:

"ACCOUNT-0001"

expireTime
string<date-time>

New expiry, for gtd orders.

price
string

New limit price as an exact decimal string.

Example:

"0.45"

quantity
string

New total quantity as an exact decimal string. Must be greater than zero.

Example:

"20"

stopPx
string

New stop price as an exact decimal string, for an order that has not triggered.

timeInForce
enum<string>
Available options:
day,
gtc,
ioc,
fok,
gtd

Response

Amend 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.