Skip to content

Cancel an order that has not filled

POST
/v1/orders/{id}/cancel
curl -X POST "https://api.staging.idealx.com/v1/orders/ord_01937e63c1d2e3f4a5b6c7d8e9f0a1b2/cancel" \
-H "Authorization: Bearer $IDEALX_API_KEY"
id
required
string

OK

Media typeapplication/json
object
id
required
string
portfolioId
required
string
instrumentId
required
string
side
required
string
Allowed values: buy sell
type
required
string
Allowed values: market limit
quantity
required
string
limitPrice
required
string | null
state
required
string
filledQuantity
required
string
filledValue
required
object
amount
required
string
currency
required
string
setAside
required

Still set aside: cash for buys, units for sells

string
approvalsRequired
required
number
approvals
required
number
approvedByMe
required
boolean
rejectReason
required
string | null
reason
required

Why the firm placed it under its discretionary mandate

string | null
createdAt
required
string

Example

{
"side": "buy",
"type": "market",
"filledValue": {
"amount": "1250.00",
"currency": "AUD"
}
}

Wrong state

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
requestId
required
string
details
object
key
additional properties

Example

{
"error": {
"code": "validation_failed"
}
}