Order Cancel

This API cancels open or pending orders, including AMO and regular orders, and assists in exiting COs, offering traders a streamlined solution for order management.

Endpoint

Base URL
https://connects.torusdigital.com/api/v1/order/cancel

Header Parameters

NameValue

Content-Type

application/json

Authorization

Bearer <token>

Request Parameter

ParameterValueMandatoryRemarks

txn_type

B/S

Y

The type of transaction, where "B" typically stands for Buy and "S" stands for SELL.

exchange

NSE

Y

The exchange where the transaction takes place, it can be NSE/BSE.

segment

E

Y

The market segment, where "E" might stand for "Equity".

product

I

Y

The product type is intraday.

security_id

14366

Y

The unique identifier for the security being traded.

quantity

2

Y

Non-zero integer value

price

0.00

Y

Float value, cannot be zero when ORDER_TYPE is LMT/SL

validity

DAY

Y

The validity of the order, indicating it is valid for the day.

order_type

MKT

Y

The type of order, where "MKT" stands for a market order.

disc_quantity

0

N

The disclosed quantity of the order.

trigger_price

0.00

N

The price at which a stop order is triggered. "0.00" indicates no stop price.

off_mkt_flag

false

Y

true for Aftermarket order, false for normal order

remarks

502929

N

Additional remarks or reference number for the transaction.

mkt_type

NL

Y

Default value is NL

good_till_days_date

2019-03-29 (yyyy-MM-dd)

N

Mandatory when validity is GTD

order_no

1234567890

Y

Order number

serial_no

1

Y

Serial number

group_id

1

Y

Group Id

ip

192.168.0.101

Y

IP address of client device

uu_id

12345678

Y

This random ID is to be generated and persisted on a device when a user installs or initializes the app (Mobile or EXE) for the first time

app_id

12345678

Y

App ID of client device

Request

cURL
curl --location 'https://connects.torusdigital.com/api/v1/order/cancel' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
    "source": "N",
    "data": {
        "txn_type": "B",
        "exchange": "NSE",
        "segment": "E",
        "product": "I",
        "security_id": "14366",
        "quantity": "3",
        "price": "0.00",
        "validity": "DAY",
        "order_type": "MKT",
        "disc_quantity": "0",
        "trigger_price": "0",
        "off_mkt_flag": "false",
        "remarks": "Trail",
        "mkt_type": "null",
        "settlor": "X",
        "group_id": "1",
        "order_no": "1141240610104",
        "serial_no": "2",
        "ip": "192.168.0.101",
        "uu_id": "12345678",
        "app_id": "12345678"
    }
}'

Response

{
  "data": [
    {
      "order_no": "1122031118517"
    }
  ],
  "status": "success",
  "message": "Order cancellation request submitted successfully. Your Order Ref No. 1122031118517"
}

Response Parameter

ParameterDescription

Status

“success”/”error”

Message

“Some Message”

Data

An object containing the details of the order.

order_no

Order specific identification number.

Last updated