Logo
Admin API API Documentation

Mass Cancel

POST {{URL_ORIGIN}}/api/operations/mass-cancel

Mass Cancel API allows you to mass cancel pending activity per request critirias:

Request Parameters

Field Type Description
instrumentId Stringfied number Instrument ID to mass cancel the orders
Removed v1.30.0
comment
String Free text comment
mpId Stringfied number Optional
MP ID to mass cancel the target entities
Not sending this parameter will mass cancel for all MPs
targetParties []TargetParty objects Optional

targetParties to target the mass cancel orders.
If multiple targetParty objects are in a request, the system cancels orders with all targetParties.
For example:
Order1 has party1
Order2 has party1 and party2
Order3 has party1, party2 and party3
Order4 has no parties
A mass cancel request with targetParties(party1 and party2) will cancel order 2 and 3.

Note: For accounts: id=accountId, source=D, role=1001.
(NEW 1.30.0) targetEntities [] Enum Optional

The system cancels the type of active entities mentioned in the request.

Array of below values:
Order - cancels all orders
RFQ - cancels all RFQs and all active quotes belong to them
Quote - cancels all Quotes
(NEW v1.31.0) AllegedTrade - cancels all Alleged Trades

If not exist, system considers as targetEntities = [‘Order’]
(NEW 1.31.0) targetScope Enum The field specifies the scope the mass cancel request applies to

Allowed values:
Instrument - cancel scope is a single instrument
All - cancel scope is all instruments

If not sent “Instrument” is considered.
(NEW 1.32.0)
cancelReason
Enum Optional
Cancellation reason. (populated in the cancellation events)

Allowed values:
MassCancelOnBehalf (default if nothing is sent)
MassCancelRequest
CorporateAction
NEW TargetParty specification:
Field Type Description
id string TargetParty id
source char TargetParty source
role int TargetParty role

Mass Cancel- Error Codes

Code Message
2001 Wrong action
2001 Wrong instrumentIds
2401 Wrong instrumentId: [instrumentId]
403 Permission denied

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 
null




RESPONSES

status OK

{ "numberOfOrders": "9", "numberOfRfqs": 7 }



Curl
curl -X POST 'URL_ORIGIN/api/operations/mass-cancel' -H ': ' -d '{"targetScope":"Instrument","instrumentId":"239","targetEntities":["Order","RFQ"],"mpId":"15","targetParties":[{"id":"53","source":"M","role":1001}]}'

ENDPOINTS