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 targetParties

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

Request Parameters

FieldTypeDescription
instrumentIdStringfied numberInstrument ID to mass cancel the orders
commentStringFree text comment
mpIdStringfied numberOptional
MP ID to mass cancel the orders
Note: not sending this parameter will mass cancel the orders for all MPs
NEW targetParties[]TargetParty objectsOptional

targetParties to target the mass cancel orders.

Note: For accounts: id=accountId, source=D, role=1001.
NEW TargetParty specification:
FieldTypeDescription
idstringTargetParty id
sourcecharTargetParty source
roleintTargetParty role

Mass Cancel- Error Codes

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

Request Body

{"instrumentId"=>"16620", "comment"=>"abc", "mpId"=>"2087506384", "targetParties"=>[{"id"=>"53", "source"=>"M", "role"=>1001}]}

HEADERS

KeyDatatypeRequiredDescription
``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"}