Mass cancel
POST {{URL_ORIGIN}}/api/operations/mass-cancel
Mass Cancel API allows you to mass cancel orders for :
- Specific MP
- All MPs
NEW
Specific targetParty or multiple targetPartiesIf 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.
Request Parameters
Field | Type | Description |
---|---|---|
instrumentId | Stringfied number | Instrument ID to mass cancel the orders |
comment | String | Free text comment |
mpId | Stringfied number | Optional MP ID to mass cancel the orders Note: not sending this parameter will mass cancel the orders for all MPs |
NEW targetParties | []TargetParty objects | Optional targetParties to target the mass cancel orders. Note: For accounts: id=accountId, source=D, role=1001. |
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 |
Request Body
{"instrumentId"=>"16620", "comment"=>"abc", "mpId"=>"2087506384", "targetParties"=>[{"id"=>"53", "source"=>"M", "role"=>1001}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
`` | null |
RESPONSES
status: OK
{"id":"291","data":{"instrumentId":"123","mpId":"11","targetParties":[{"id":"53","source":"M","role":"1001"}]},"requestType":"MassCancel","name":"INS1","status":"Pending","makerComment":"Mass cancel","makerUserId":"auth0|6310aa4ba8cae50015ee3678","timestamp":"2024-02-29T09:37:20.237"}