API Documentation

Complete documentation for the trading API endpoints.

Get StartedView GlossaryTOTP

Authentication Key

OAuth2 authentication protocol is used for all API calls. An OAuth2 client library in any programming language can be used.

Base URL: <base_url>
OAuth2 CLIENT ID: User’s choice <oauthID>
OAuth2 CLIENT Secret: Tradelab will provide (please save it for future usage)
==========================
Grant type: Authorization Code
Authorization endpoint: /oauth2/auth
Access token endpoint: /oauth2/token
Redirect URL: User’s choice (or by default http://127.0.0.1)
Scope: orders holdings
Credentials: As Basic Auth Header (default)
<base_url>/oauth2/auth?scope=orders%20holdings&state=%7B%22param%22:%22value%22%7D&redirect_uri=http://127.0.0.1&response_type=code&client_id=<oauthID>

After this URL is opened in a web browser (once every trading day), login credentials and 2FA of the trading platform must be entered. After this step, the user will receive an access token.

The access token must be sent with every API request unless stated otherwise using:

Authorization: Bearer {access_token}

Replace {access_token} with the token obtained. If the token expires, a 401 HTTP status will be returned, and a new access token must be obtained.

1. Profile

Get user profile information.

Request
Method

GET

URL
/api/v1/user/profile?client_id=091000006
Response
Status

200

Sample Response
{
  "data": {
    "account_id": "091000006",
    "account_type": "",
    "backoffice_enabled": true,
    "bank_account_number": "34510100012596",
    "bank_branch_name": "ROOP NAGAR PUNJAB",
    "bank_name": "BANK OF BARODA",
    "branch": "BANK OF BARODA",
    "broker_id": "RCHNO",
    "city": "",
    "client_id": "091000006",
    "depository": "NSDL",
    "dob": "06/11/2001",
    "dp_id": "",
    "dp_number": "IN30114312691542",
    "email_id": "[email protected]",
    "exchange_nnf": {
      "BFO": 0,
      "BSE": 0,
      "MCX": 0,
      "NFO": 0,
      "NSE": 0
    },
    "exchanges_subscribed": ["BSE", "BFO", "MCX", "NSE", "NFO"],
    "ifsc_code": "",
    "name": "HARSIMRAN SINGH",
    "office_addr": "MOHALLA PHOOL CHAKKAR ROPAR",
    "pan_number": "PAIPS0624B",
    "permanent_addr": "S/O TEJINDER SINGH 2529",
    "phone_number": "8088422712",
    "products_enabled": ["CNC", "CO", "MIS", "NRML"],
    "role": { "id": 1, "name": "CLIENT" },
    "sex": "",
    "state": "",
    "status": "Activated",
    "twofa_enabled": true,
    "user_type": "Non-Institutional"
  },
  "message": "",
  "status": "success"
}
Example Request
import requests

url = "https://masterswift-beta.mastertrust.co.in/api/v1/user/profile?client_id=091000006"

payload={}
headers = {
  'Authorization': 'Bearer 7uW2h1SGPpfcGwXmxExF8oXnYFCBnC30gTc_c26ed30.I2NmFmuvDohqj9AJeCkbB66AUtjizHtNwCR0KgOg8M0'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

2. Place Normal Order

This API allows you to place a normal trading order.

Request
Method

POST

URL
/api/v1/orders
Sample Request Parameters
(Possible values in comment)
{
  "client_id": "091000006",
  "disclosed_quantity": 0,
  "exchange": "NSE",
  "instrument_token": "14537",
  "market_protection_percentage": 10,
  "order_side": "BUY",
  "order_type": "LIMIT",
  "price": 5.50,
  "product": "NRML",
  "quantity": 1,
  "trigger_price": 0,
  "validity": "DAY",
  "user_order_id": "5002681"
}
Response
Status

200

Sample Response
{
  "data": {
    "client_order_id": "250328000022151",
    "oms_order_id": "250328000022151",
    "user_order_id": 5002681
  },
  "message": "Order place successfully",
  "status": "success"
}
Example Request
import requests

url = "https://masterswift-beta.mastertrust.co.in/api/v1/orders"

payload = "{
    "client_id": "091000006",
    "disclosed_quantity": 0,
    "exchange": "NSE",
    "instrument_token": "14537",
    "market_protection_percentage": 10,
    "order_side": "BUY",
    "order_type": "LIMIT",
    "price": 5.50,
    "product": "NRML",
    "quantity": 1,
    "trigger_price": 0,
    "validity": "DAY",
    "user_order_id": "5002681"
}"
headers = {
  'Authorization': 'Bearer 7uW2h1SGPpfcGwXmxExF8oXnYFCBnC30gTc_c26ed30.I2NmFmuvDohqj9AJeCkbB66AUtjizHtNwCR0KgOg8M0'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

3. Modify Order

This API allows you to modify an existing normal trading order.

Request
Method

PUT

URL
/api/v1/orders
Sample Request Parameters
(Possible values in comment)
{
  "exchange": "NSE",
  "order_type": "LIMIT",
  "instrument_token": 14537,
  "quantity": 1,
  "disclosed_quantity": 0,
  "price": 5.6,
  "trigger_price": 0,
  "order_side": "BUY",
  "product": "NRML",
  "client_id": "091000006",
  "oms_order_id": "250328000020616",
  "validity": "DAY"
}
Response
Status

200

Sample Response
{
  "data": {
    "oms_order_id": [
      " 250328000020616"
    ]
  },
  "message": "Order modification request submitted",
  "status": "success"
}
Example Request
import requests

url = "https://masterswift-beta.mastertrust.co.in/api/v1/orders"

payload = "{
"exchange":"NSE", 
"order_type":"LIMIT",
"instrument_token":14537,
"quantity":1,
"disclosed_quantity":0,
"price":5.6,
"trigger_price":0,
"order_side":"BUY",
"product":"NRML",
"client_id":"091000006",
"oms_order_id":"250328000020616",
"validity":"DAY"
}"
headers = {
  'Authorization': 'Bearer 7uW2h1SGPpfcGwXmxExF8oXnYFCBnC30gTc_c26ed30.I2NmFmuvDohqj9AJeCkbB66AUtjizHtNwCR0KgOg8M0'
}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.text)

4. Cancel Normal Order

This API allows you to cancel an existing normal trading order.

Request
Method

DELETE

URL
/api/v1/orders/<omsOrderNum>?client_id=<clientID>
Example:
/api/v1/orders/250328000020616?client_id=091000006
Response
Status

200

Sample Response
{
  "data": {
    "oms_order_id": "250328000020616"
  },
  "message": "Order cancellation request submitted for OMS Order: 250328000020616",
  "status": "success"
}
Example Request
import requests

url = "https://masterswift-beta.mastertrust.co.in/api/v1/orders/250328000020616?client_id=091000006"

payload={}
headers = {
  'Authorization': 'Bearer 7uW2h1SGPpfcGwXmxExF8oXnYFCBnC30gTc_c26ed30.I2NmFmuvDohqj9AJeCkbB66AUtjizHtNwCR0KgOg8M0'
}

response = requests.request("DELETE", url, headers=headers, data=payload)

print(response.text)

5. Scripinfo

This API provides detailed information about a specific script.

Request
Method

GET

URL
/api/v1/contract/<exchange>?info=scrip&token=<instrumentToken>
example:
/api/v1/contract/NSE?info=scrip&token=14537
Response
Status

200

Sample Response
{
  "error": {
    "code": 0,
    "message": ""
  },
  "result": {
    "board_lot_quantity": 1,
    "change_in_oi": 0,
    "exchange": 1,
    "expiry": 0,
    "higher_circuit_limit": 6.99,
    "instrument_name": "EQ",
    "instrument_token": 14537,
    "isin": "INE836F01026",
    "lower_circuit_limit": 4.66,
    "multiplier": 1,
    "open_interest": 0,
    "option_type": "",
    "precision": 2,
    "series": "EQ",
    "strike": 0,
    "symbol": "DISHTV",
    "tick_size": 0.01,
    "trading_symbol": "DISHTV-EQ",
    "underlying_token": 14537,
    "raw_expiry": 0,
    "freeze": 0,
    "instrument_type": "0",
    "issue_rate": 0,
    "issue_start_date": "18-Apr-2007",
    "list_date": "18-Apr-2007",
    "max_order_size": 0,
    "price_numerator": 0,
    "price_denominator": 0,
    "comments": "INT DIV - RE 0.50 PER SH",
    "circuit_rating": "",
    "company_name": "DISH TV INDIA LTD.",
    "display_name": "DISHTV EQ",
    "raw_tick_size": 1,
    "is_index": false,
    "tradable": true,
    "max_single_qty": 0,
    "expiry_string": "",
    "local_update_time": "",
    "market_type": "",
    "price_units": "",
    "trading_units": "",
    "last_trading_date": "",
    "tender_period_end_date": "",
    "delivery_start_date": "",
    "price_quotation": 0,
    "general_denominator": "",
    "tender_period_start_date": "",
    "delivery_units": "",
    "delivery_end_date": "",
    "trading_unit_factor": 0,
    "delivery_unit_factor": 0,
    "book_closure_end_date": "1-Jan-1980",
    "book_closure_start_date": "1-Jan-1980",
    "no_delivery_date_end": "0",
    "no_delivery_date_start": "0",
    "re_admission_date": "0",
    "record_date": "1225929600",
    "warning": "1",
    "dpr": "4.6600 - 6.9900",
    "trade_to_trade": false,
    "surveillance_indicator": 0,
    "partition_id": 0,
    "product_id": 0,
    "product_category": "",
    "month_identifier": 0,
    "close_price": "",
    "special_preopen": 1,
    "alternate_exchange": "BSE",
    "alternate_token": 532839,
    "asm": "-1",
    "gsm": "-1",
    "execution": "NA",
    "symbol2": "",
    "raw_tender_period_start_date": "",
    "raw_tender_period_end_date": "",
    "yearly_high_price": "19.55",
    "yearly_low_price": "5.77",
    "issue_maturity_date": 0,
    "var": "",
    "exposure": "",
    "span": [
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0
    ],
    "tag": "",
    "last_trade_vol": "",
    "alternate_trading_symbol": "",
    "face_value": 1,
    "short_code": ""
  }
}
Example Request
import requests

url = "https://masterswift-beta.mastertrust.co.in/api/v1/contract/NSE?info=scrip&token=14537"

payload={}
headers = {
  'Authorization': 'Bearer 7uW2h1SGPpfcGwXmxExF8oXnYFCBnC30gTc_c26ed30.I2NmFmuvDohqj9AJeCkbB66AUtjizHtNwCR0KgOg8M0'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

6. Search Script

This API allows you to search for scripts by keyword.

Request
Method

GET

URL
/api/v1/search?key=<keyword>
example:
/api/v1/search?key=TCS
Response
Status

200

Sample Response
{
  "error": {
    "code": 0,
    "message": ""
  },
  "result": [
    {
      "token": 11536,
      "exchange": "NSE",
      "company": "TATA CONSULTANCY SERV LT",
      "symbol": "TCS",
      "trading_symbol": "TCS-EQ",
      "display_name": "TCS EQ",
      "score": 0.210094,
      "isin": "INE467B01029",
      "close_price": "",
      "segment": "Equity",
      "alternate": {
        "token": 532540,
        "exchange": "BSE",
        "company": "TATA CONSULTANCY SERVICES LTD.",
        "symbol": "TCS",
        "trading_symbol": "TCS-A",
        "display_name": "TCS A",
        "isin": "INE467B01029"
      }
    },
    {
      "token": 532540,
      "exchange": "BSE",
      "company": "TATA CONSULTANCY SERVICES LTD.",
      "symbol": "TCS",
      "trading_symbol": "TCS-A",
      "display_name": "TCS A",
      "score": 0.190095,
      "isin": "INE467B01029",
      "close_price": "",
      "segment": "",
      "alternate": {
        "token": 11536,
        "exchange": "NSE",
        "company": "TATA CONSULTANCY SERV LT",
        "symbol": "TCS",
        "trading_symbol": "TCS-EQ",
        "display_name": "TCS EQ",
        "isin": "INE467B01029",
        "segment": "Equity"
      }
    },
    {
      "token": 73627,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APRFUT",
      "trading_symbol": "TCS25APRFUT",
      "display_name": "TCS25APRFUT",
      "score": 0.17969249576,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 57538,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25MAYFUT",
      "trading_symbol": "TCS25MAYFUT",
      "display_name": "TCS25MAYFUT",
      "score": 0.17969249471,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 57250,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25JUNFUT",
      "trading_symbol": "TCS25JUNFUT",
      "display_name": "TCS25JUNFUT",
      "score": 0.17969249374000001,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154804,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR5600PE",
      "trading_symbol": "TCS25APR5600PE",
      "display_name": "TCS APR 25 5600 PE",
      "score": 0.1596924957600056,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154803,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR5600CE",
      "trading_symbol": "TCS25APR5600CE",
      "display_name": "TCS APR 25 5600 CE",
      "score": 0.1596924957600056,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154801,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR5400CE",
      "trading_symbol": "TCS25APR5400CE",
      "display_name": "TCS APR 25 5400 CE",
      "score": 0.15969249576000538,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154802,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR5400PE",
      "trading_symbol": "TCS25APR5400PE",
      "display_name": "TCS APR 25 5400 PE",
      "score": 0.15969249576000538,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154800,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR5300PE",
      "trading_symbol": "TCS25APR5300PE",
      "display_name": "TCS APR 25 5300 PE",
      "score": 0.1596924957600053,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154799,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR5300CE",
      "trading_symbol": "TCS25APR5300CE",
      "display_name": "TCS APR 25 5300 CE",
      "score": 0.1596924957600053,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154798,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR5200PE",
      "trading_symbol": "TCS25APR5200PE",
      "display_name": "TCS APR 25 5200 PE",
      "score": 0.1596924957600052,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154797,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR5200CE",
      "trading_symbol": "TCS25APR5200CE",
      "display_name": "TCS APR 25 5200 CE",
      "score": 0.1596924957600052,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154795,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR5100CE",
      "trading_symbol": "TCS25APR5100CE",
      "display_name": "TCS APR 25 5100 CE",
      "score": 0.1596924957600051,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154796,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR5100PE",
      "trading_symbol": "TCS25APR5100PE",
      "display_name": "TCS APR 25 5100 PE",
      "score": 0.1596924957600051,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154794,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR5000PE",
      "trading_symbol": "TCS25APR5000PE",
      "display_name": "TCS APR 25 5000 PE",
      "score": 0.159692495760005,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154793,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR5000CE",
      "trading_symbol": "TCS25APR5000CE",
      "display_name": "TCS APR 25 5000 CE",
      "score": 0.159692495760005,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154792,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR4900PE",
      "trading_symbol": "TCS25APR4900PE",
      "display_name": "TCS APR 25 4900 PE",
      "score": 0.15969249576000488,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154791,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR4900CE",
      "trading_symbol": "TCS25APR4900CE",
      "display_name": "TCS APR 25 4900 CE",
      "score": 0.15969249576000488,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154790,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR4800PE",
      "trading_symbol": "TCS25APR4800PE",
      "display_name": "TCS APR 25 4800 PE",
      "score": 0.1596924957600048,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154789,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR4800CE",
      "trading_symbol": "TCS25APR4800CE",
      "display_name": "TCS APR 25 4800 CE",
      "score": 0.1596924957600048,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154788,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR4700PE",
      "trading_symbol": "TCS25APR4700PE",
      "display_name": "TCS APR 25 4700 PE",
      "score": 0.1596924957600047,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154787,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR4700CE",
      "trading_symbol": "TCS25APR4700CE",
      "display_name": "TCS APR 25 4700 CE",
      "score": 0.1596924957600047,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154786,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR4600PE",
      "trading_symbol": "TCS25APR4600PE",
      "display_name": "TCS APR 25 4600 PE",
      "score": 0.1596924957600046,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154785,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR4600CE",
      "trading_symbol": "TCS25APR4600CE",
      "display_name": "TCS APR 25 4600 CE",
      "score": 0.1596924957600046,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154783,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR4500CE",
      "trading_symbol": "TCS25APR4500CE",
      "display_name": "TCS APR 25 4500 CE",
      "score": 0.1596924957600045,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154784,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR4500PE",
      "trading_symbol": "TCS25APR4500PE",
      "display_name": "TCS APR 25 4500 PE",
      "score": 0.1596924957600045,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154782,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR4400PE",
      "trading_symbol": "TCS25APR4400PE",
      "display_name": "TCS APR 25 4400 PE",
      "score": 0.1596924957600044,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154781,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR4400CE",
      "trading_symbol": "TCS25APR4400CE",
      "display_name": "TCS APR 25 4400 CE",
      "score": 0.1596924957600044,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154780,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR4300PE",
      "trading_symbol": "TCS25APR4300PE",
      "display_name": "TCS APR 25 4300 PE",
      "score": 0.1596924957600043,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154779,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR4300CE",
      "trading_symbol": "TCS25APR4300CE",
      "display_name": "TCS APR 25 4300 CE",
      "score": 0.1596924957600043,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154778,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR4200PE",
      "trading_symbol": "TCS25APR4200PE",
      "display_name": "TCS APR 25 4200 PE",
      "score": 0.15969249576000422,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154777,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR4200CE",
      "trading_symbol": "TCS25APR4200CE",
      "display_name": "TCS APR 25 4200 CE",
      "score": 0.15969249576000422,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154776,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR4100PE",
      "trading_symbol": "TCS25APR4100PE",
      "display_name": "TCS APR 25 4100 PE",
      "score": 0.1596924957600041,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154775,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR4100CE",
      "trading_symbol": "TCS25APR4100CE",
      "display_name": "TCS APR 25 4100 CE",
      "score": 0.1596924957600041,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154774,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR4000PE",
      "trading_symbol": "TCS25APR4000PE",
      "display_name": "TCS APR 25 4000 PE",
      "score": 0.159692495760004,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154773,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR4000CE",
      "trading_symbol": "TCS25APR4000CE",
      "display_name": "TCS APR 25 4000 CE",
      "score": 0.159692495760004,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154772,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR3900PE",
      "trading_symbol": "TCS25APR3900PE",
      "display_name": "TCS APR 25 3900 PE",
      "score": 0.1596924957600039,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154771,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR3900CE",
      "trading_symbol": "TCS25APR3900CE",
      "display_name": "TCS APR 25 3900 CE",
      "score": 0.1596924957600039,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154770,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR3800PE",
      "trading_symbol": "TCS25APR3800PE",
      "display_name": "TCS APR 25 3800 PE",
      "score": 0.1596924957600038,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154769,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR3800CE",
      "trading_symbol": "TCS25APR3800CE",
      "display_name": "TCS APR 25 3800 CE",
      "score": 0.1596924957600038,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154768,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR3700PE",
      "trading_symbol": "TCS25APR3700PE",
      "display_name": "TCS APR 25 3700 PE",
      "score": 0.15969249576000372,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154767,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR3700CE",
      "trading_symbol": "TCS25APR3700CE",
      "display_name": "TCS APR 25 3700 CE",
      "score": 0.15969249576000372,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154766,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR3600PE",
      "trading_symbol": "TCS25APR3600PE",
      "display_name": "TCS APR 25 3600 PE",
      "score": 0.1596924957600036,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154765,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR3600CE",
      "trading_symbol": "TCS25APR3600CE",
      "display_name": "TCS APR 25 3600 CE",
      "score": 0.1596924957600036,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154764,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR3500PE",
      "trading_symbol": "TCS25APR3500PE",
      "display_name": "TCS APR 25 3500 PE",
      "score": 0.1596924957600035,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154763,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR3500CE",
      "trading_symbol": "TCS25APR3500CE",
      "display_name": "TCS APR 25 3500 CE",
      "score": 0.1596924957600035,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154762,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR3400PE",
      "trading_symbol": "TCS25APR3400PE",
      "display_name": "TCS APR 25 3400 PE",
      "score": 0.1596924957600034,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154761,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR3400CE",
      "trading_symbol": "TCS25APR3400CE",
      "display_name": "TCS APR 25 3400 CE",
      "score": 0.1596924957600034,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    },
    {
      "token": 154760,
      "exchange": "NFO",
      "company": "TCS",
      "symbol": "TCS25APR3300PE",
      "trading_symbol": "TCS25APR3300PE",
      "display_name": "TCS APR 25 3300 PE",
      "score": 0.1596924957600033,
      "close_price": "",
      "segment": "NFO",
      "alternate": {}
    }
  ]
}
Example Request
import requests

url = "https://masterswift-beta.mastertrust.co.in/api/v1/search?key=TCS"

payload={}
headers = {
  'Authorization': 'Bearer 7uW2h1SGPpfcGwXmxExF8oXnYFCBnC30gTc_c26ed30.I2NmFmuvDohqj9AJeCkbB66AUtjizHtNwCR0KgOg8M0'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

7. Orderbook Pending

This API allows you to retrieve the order book for a client.

Request
Method

GET

URL (Pending)
/api/v1/orders?type=pending&client_id=091000006
Response
Status

200

Sample Response
(Possible values in comment)
{
  "data": {
    "orders": [
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "1100000020022029",
        "series": "",
        "square_off?": false,
        "exchange": "NSE",
        "mode": "NEW",
        "device": null,
        "lot_size": 1,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000022151",
        "order_type": "LIMIT",
        "trading_symbol": "DISHTV-EQ",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "open",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "5.50",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 1743137188,
        "user_order_id": "5002681",
        "rejection_reason": "--",
        "instrument_token": "14537",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743137188
      }
    ]
  },
  "message": "",
  "status": "success"
}
Example Request
import requests

url = "https://masterswift-beta.mastertrust.co.in/api/v1/orders?type=pending&client_id=091000006"

payload={}
headers = {
  'Authorization': 'Bearer 7uW2h1SGPpfcGwXmxExF8oXnYFCBnC30gTc_c26ed30.I2NmFmuvDohqj9AJeCkbB66AUtjizHtNwCR0KgOg8M0'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

8. Orderbook Completed

This API allows you to retrieve the order book for a client.

Request
Method

GET

URL (Completed)
/api/v1/orders?type=completed&client_id=091000006
Response
Status

200

Sample Response
(Possible values in comment)
{
  "data": {
    "orders": [
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "1100000017829964",
        "series": "",
        "square_off?": false,
        "exchange": "NSE",
        "mode": "NEW",
        "device": null,
        "lot_size": 1,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000020616",
        "order_type": "LIMIT",
        "trading_symbol": "DISHTV-EQ",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "cancelled",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "5.60",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 1743136998,
        "user_order_id": "5002681",
        "rejection_reason": "--",
        "instrument_token": "14537",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743136651
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "NSE",
        "mode": "NEW",
        "device": null,
        "lot_size": 600,
        "login_id": "091000006",
        "order_side": "SELL",
        "oms_order_id": "250328000000260",
        "order_type": "LIMIT",
        "trading_symbol": "ACTIVEINFR-ST",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 600,
        "product": "CNC",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "99.85",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": null,
        "rejection_reason": "RMS:Rule: Check T1 holdings including TT/BE/Z/T/TS ,No Holdings Present  for entity account-091000006 across exchange for  segment CASH across product ",
        "instrument_token": "30467",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 600,
        "client_id": "091000006",
        "order_entry_time": 1743131694
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "NSE",
        "mode": "NEW",
        "device": null,
        "lot_size": 600,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000258",
        "order_type": "LIMIT",
        "trading_symbol": "ACTIVEINFR-ST",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 600,
        "product": "CNC",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "100.10",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": null,
        "rejection_reason": "RMS:Blocked for BMTM_SINGLE_LEVELnse_cmCNCRemarks:FRESH DELIVERY BUYING CAN BE DONE THROUGH NRML PRODUCT*  block type: ALL",
        "instrument_token": "30467",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 600,
        "client_id": "091000006",
        "order_entry_time": 1743131690
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "NSE",
        "mode": "NEW",
        "device": null,
        "lot_size": 600,
        "login_id": "091000006",
        "order_side": "SELL",
        "oms_order_id": "250328000000254",
        "order_type": "LIMIT",
        "trading_symbol": "RAPIDFLEET-ST",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 600,
        "product": "CNC",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "99.90",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": null,
        "rejection_reason": "RMS:Rule: Check T1 holdings including TT/BE/Z/T/TS ,No Holdings Present  for entity account-091000006 across exchange for  segment CASH across product ",
        "instrument_token": "30463",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 600,
        "client_id": "091000006",
        "order_entry_time": 1743131685
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "NSE",
        "mode": "NEW",
        "device": null,
        "lot_size": 600,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000253",
        "order_type": "LIMIT",
        "trading_symbol": "RAPIDFLEET-ST",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 600,
        "product": "CNC",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "100.10",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": null,
        "rejection_reason": "RMS:Blocked for BMTM_SINGLE_LEVELnse_cmCNCRemarks:FRESH DELIVERY BUYING CAN BE DONE THROUGH NRML PRODUCT*  block type: ALL",
        "instrument_token": "30463",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 600,
        "client_id": "091000006",
        "order_entry_time": 1743131681
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "MCX",
        "mode": "NEW",
        "device": null,
        "lot_size": 100,
        "login_id": "091000006",
        "order_side": "SELL",
        "oms_order_id": "250328000000247",
        "order_type": "LIMIT",
        "trading_symbol": "CRUDEOIL25APRFUT",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "5991.00",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": null,
        "rejection_reason": "RMS:Margin Exceeds,Required:205832.94, Available:75.99 for entity account-091000006 across exchange across segment across product ",
        "instrument_token": "441305",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743131653
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "MCX",
        "mode": "NEW",
        "device": null,
        "lot_size": 100,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000245",
        "order_type": "LIMIT",
        "trading_symbol": "CRUDEOIL25APRFUT",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "6000.00",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": null,
        "rejection_reason": "RMS:Margin Exceeds,Required:205833.75, Available:75.99 for entity account-091000006 across exchange across segment across product ",
        "instrument_token": "441305",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743131650
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "NSE",
        "mode": "NEW",
        "device": null,
        "lot_size": 1,
        "login_id": "091000006",
        "order_side": "SELL",
        "oms_order_id": "250328000000241",
        "order_type": "LIMIT",
        "trading_symbol": "ACC-EQ",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "CNC",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "1963.80",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": null,
        "rejection_reason": "RMS:Rule: Check T1 holdings including TT/BE/Z/T/TS ,No Holdings Present  for entity account-091000006 across exchange for  segment CASH across product ",
        "instrument_token": "22",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743131632
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "NSE",
        "mode": "NEW",
        "device": null,
        "lot_size": 1,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000239",
        "order_type": "LIMIT",
        "trading_symbol": "ACC-EQ",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "CNC",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "1964.25",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": null,
        "rejection_reason": "RMS:Blocked for BMTM_SINGLE_LEVELnse_cmCNCRemarks:FRESH DELIVERY BUYING CAN BE DONE THROUGH NRML PRODUCT*  block type: ALL",
        "instrument_token": "22",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743131629
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "NFO",
        "mode": "NEW",
        "device": null,
        "lot_size": 75,
        "login_id": "091000006",
        "order_side": "SELL",
        "oms_order_id": "250328000000238",
        "order_type": "LIMIT",
        "trading_symbol": "NIFTY25APRFUT",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 75,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "23699.75",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": null,
        "rejection_reason": "RMS:Margin Exceeds,Required:200544.22, Available:75.99 for entity account-091000006 across exchange across segment across product ",
        "instrument_token": "54452",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 75,
        "client_id": "091000006",
        "order_entry_time": 1743131614
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "NFO",
        "mode": "NEW",
        "device": null,
        "lot_size": 75,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000237",
        "order_type": "LIMIT",
        "trading_symbol": "NIFTY25APRFUT",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 75,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "23700.25",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": null,
        "rejection_reason": "RMS:Margin Exceeds,Required:201965.23, Available:75.99 for entity account-091000006 across exchange across segment across product ",
        "instrument_token": "54452",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 75,
        "client_id": "091000006",
        "order_entry_time": 1743131610
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "BFO",
        "mode": "NEW",
        "device": null,
        "lot_size": 20,
        "login_id": "091000006",
        "order_side": "SELL",
        "oms_order_id": "250328000000236",
        "order_type": "LIMIT",
        "trading_symbol": "SENSEX25401FUT",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 20,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "77899.75",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": "10003",
        "rejection_reason": "RMS:Margin Exceeds,Required:175144.34, Available:75.99 for entity account-091000006 across exchange across segment across product ",
        "instrument_token": "863673",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 20,
        "client_id": "091000006",
        "order_entry_time": 1743131604
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "BFO",
        "mode": "NEW",
        "device": null,
        "lot_size": 20,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000235",
        "order_type": "LIMIT",
        "trading_symbol": "SENSEX25401FUT",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 20,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "77900.25",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": "10003",
        "rejection_reason": "RMS:Margin Exceeds,Required:176385.34, Available:75.99 for entity account-091000006 across exchange across segment across product ",
        "instrument_token": "863673",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 20,
        "client_id": "091000006",
        "order_entry_time": 1743131601
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "BSE",
        "mode": "NEW",
        "device": null,
        "lot_size": 1,
        "login_id": "091000006",
        "order_side": "SELL",
        "oms_order_id": "250328000000234",
        "order_type": "LIMIT",
        "trading_symbol": "SBIN-A",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "CNC",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "769.80",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": null,
        "rejection_reason": "RMS:Rule: Check T1 holdings including TT/BE/Z/T/TS ,No Holdings Present  for entity account-091000006 across exchange for  segment CASH across product ",
        "instrument_token": "500112",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743131595
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "BSE",
        "mode": "NEW",
        "device": null,
        "lot_size": 1,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000233",
        "order_type": "LIMIT",
        "trading_symbol": "SBIN-A",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "CNC",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "770.30",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": null,
        "rejection_reason": "RMS:Blocked for BMTM_SINGLE_LEVELbse_cmCNCRemarks:FRESH DELIVERY BUYING CAN BE DONE THROUGH NRML PRODUCT*  block type: ALL",
        "instrument_token": "500112",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743131591
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "BFO",
        "mode": "NEW",
        "device": null,
        "lot_size": 4000,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000058",
        "order_type": "MARKET",
        "trading_symbol": "SAIL25APRFUT",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 4000,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "0.00",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": "10003",
        "rejection_reason": "RMS:Margin Exceeds,Required:120826.66, Available:75.99 for entity account-091000006 across exchange across segment across product ",
        "instrument_token": "847780",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 4000,
        "client_id": "091000006",
        "order_entry_time": 1743130175
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "MCX",
        "mode": "NEW",
        "device": null,
        "lot_size": 1,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000057",
        "order_type": "MARKET",
        "trading_symbol": "ALUMINI25MARFUT",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "0.00",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": null,
        "rejection_reason": "RMS:Blocked for ALUMINIFUTCOMBNOVALmcx_fo Expiry Date: 2025-03-31Remarks:TO RESTRICTED RISK  block type: NON-SQROFF",
        "instrument_token": "442159",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743130174
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "MCX",
        "mode": "NEW",
        "device": null,
        "lot_size": 1,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000056",
        "order_type": "MARKET",
        "trading_symbol": "ALUMINI25MARFUT",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "0.00",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": null,
        "rejection_reason": "RMS:Blocked for ALUMINIFUTCOMBNOVALmcx_fo Expiry Date: 2025-03-31Remarks:TO RESTRICTED RISK  block type: NON-SQROFF",
        "instrument_token": "442159",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743130172
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "MCX",
        "mode": "NEW",
        "device": null,
        "lot_size": 5,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000055",
        "order_type": "MARKET",
        "trading_symbol": "ALUMINIUM25MARFUT",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "0.00",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": null,
        "rejection_reason": "RMS:Blocked for ALUMINIUMFUTCOMBNOVALmcx_fo Expiry Date: 2025-03-31Remarks:TO RESTRICTED RISK  block type: NON-SQROFF",
        "instrument_token": "442160",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743130171
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "BSE",
        "mode": "NEW",
        "device": null,
        "lot_size": 1,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000054",
        "order_type": "MARKET",
        "trading_symbol": "WIPRO-A",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "0.00",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": null,
        "rejection_reason": "EXCHANGE: TRANSACTION NOT ALLOWED IN CURRENT INSTRUMENT STATE [RESTRICTED]",
        "instrument_token": "507685",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743130169
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "BSE",
        "mode": "NEW",
        "device": null,
        "lot_size": 1,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000053",
        "order_type": "MARKET",
        "trading_symbol": "PNB-A",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "0.00",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": null,
        "rejection_reason": "EXCHANGE: TRANSACTION NOT ALLOWED IN CURRENT INSTRUMENT STATE [RESTRICTED]",
        "instrument_token": "532461",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743130168
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "BFO",
        "mode": "NEW",
        "device": null,
        "lot_size": 20,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000052",
        "order_type": "MARKET",
        "trading_symbol": "SENSEX25401FUT",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 20,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "0.00",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": "10003",
        "rejection_reason": "RMS:Margin Exceeds,Required:176385.41, Available:75.99 for entity account-091000006 across exchange across segment across product ",
        "instrument_token": "863673",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 20,
        "client_id": "091000006",
        "order_entry_time": 1743130167
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "BFO",
        "mode": "NEW",
        "device": null,
        "lot_size": 20,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000051",
        "order_type": "MARKET",
        "trading_symbol": "SENSEX2540179000CE",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 20,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "0.00",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": "10003",
        "rejection_reason": "RMS:Margin Exceeds,Required:1405.14, Available:75.99 for entity account-091000006 across exchange across segment across product ",
        "instrument_token": "863857",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 20,
        "client_id": "091000006",
        "order_entry_time": 1743130165
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "1200000000000269",
        "series": "",
        "square_off?": false,
        "exchange": "NSE",
        "mode": "NEW",
        "device": null,
        "lot_size": 1,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000050",
        "order_type": "MARKET",
        "trading_symbol": "MIDSMALL-EQ",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "0.00",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": null,
        "rejection_reason": "16387 : Security is not allowed to trade in this market  ",
        "instrument_token": "23855",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743130161
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "1100000000000290",
        "series": "",
        "square_off?": false,
        "exchange": "NSE",
        "mode": "NEW",
        "device": null,
        "lot_size": 1,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000049",
        "order_type": "MARKET",
        "trading_symbol": "IDFCFIRSTB-EQ",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "0.00",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": null,
        "rejection_reason": "16387 : Security is not allowed to trade in this market  ",
        "instrument_token": "11184",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743130160
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "NSE",
        "mode": "NEW",
        "device": null,
        "lot_size": 1,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000048",
        "order_type": "MARKET",
        "trading_symbol": "GABRIEL-EQ",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "0.00",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": null,
        "rejection_reason": "RMS:Margin Exceeds,Required:165.55, Available:75.99 for entity account-091000006 across exchange across segment across product ",
        "instrument_token": "1085",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743130159
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "1200000000000268",
        "series": "",
        "square_off?": false,
        "exchange": "NSE",
        "mode": "NEW",
        "device": null,
        "lot_size": 1,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000047",
        "order_type": "MARKET",
        "trading_symbol": "PNB-EQ",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "0.00",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": null,
        "rejection_reason": "16387 : Security is not allowed to trade in this market  ",
        "instrument_token": "10666",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743130158
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "1200000000000267",
        "series": "",
        "square_off?": false,
        "exchange": "NSE",
        "mode": "NEW",
        "device": null,
        "lot_size": 1,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000046",
        "order_type": "MARKET",
        "trading_symbol": "OLAELEC-EQ",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "0.00",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": null,
        "rejection_reason": "16387 : Security is not allowed to trade in this market  ",
        "instrument_token": "24777",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743130156
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "BSE",
        "mode": "NEW",
        "device": null,
        "lot_size": 1,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000045",
        "order_type": "MARKET",
        "trading_symbol": "IDEA-A",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "0.00",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": null,
        "rejection_reason": "EXCHANGE: TRANSACTION NOT ALLOWED IN CURRENT INSTRUMENT STATE [RESTRICTED]",
        "instrument_token": "532822",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743130155
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "1300000000000616",
        "series": "",
        "square_off?": false,
        "exchange": "NSE",
        "mode": "NEW",
        "device": null,
        "lot_size": 1,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000044",
        "order_type": "MARKET",
        "trading_symbol": "ZOMATO-EQ",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "0.00",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": null,
        "rejection_reason": "16387 : Security is not allowed to trade in this market  ",
        "instrument_token": "5097",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743130153
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "1300000000000614",
        "series": "",
        "square_off?": false,
        "exchange": "NSE",
        "mode": "NEW",
        "device": null,
        "lot_size": 1,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000043",
        "order_type": "MARKET",
        "trading_symbol": "ZOMATO-EQ",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "0.00",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": null,
        "rejection_reason": "16387 : Security is not allowed to trade in this market  ",
        "instrument_token": "5097",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743130151
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "NFO",
        "mode": "NEW",
        "device": null,
        "lot_size": 75,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000028",
        "order_type": "MARKET",
        "trading_symbol": "NIFTY2540322500PE",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 75,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "0.00",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": "10002",
        "rejection_reason": "RMS:Margin Exceeds,Required:457.55, Available:75.99 for entity account-091000006 across exchange across segment across product ",
        "instrument_token": "54618",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 75,
        "client_id": "091000006",
        "order_entry_time": 1743129786
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "NSE",
        "mode": "NEW",
        "device": null,
        "lot_size": 1,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000027",
        "order_type": "MARKET",
        "trading_symbol": "MASTERTR-EQ",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "0.00",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": "10002",
        "rejection_reason": "RMS:Margin Exceeds,Required:123.39, Available:75.99 for entity account-091000006 across exchange across segment across product ",
        "instrument_token": "27047",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743129779
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "MCX",
        "mode": "NEW",
        "device": null,
        "lot_size": 1,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000026",
        "order_type": "LIMIT",
        "trading_symbol": "GOLD25APR80000PE",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "0.50",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": "10002",
        "rejection_reason": "EXCHANGE: TRANSACTION NOT ALLOWED IN CURRENT STATE 'START_OF_DAY' FOR PRODUCT ID [1114] (OFGOLD)",
        "instrument_token": "442812",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743129719
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "1100000000000233",
        "series": "",
        "square_off?": false,
        "exchange": "NSE",
        "mode": "NEW",
        "device": null,
        "lot_size": 1,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000025",
        "order_type": "LIMIT",
        "trading_symbol": "DISHTV-EQ",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "5.83",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": "10002",
        "rejection_reason": "16387 : Security is not allowed to trade in this market  ",
        "instrument_token": "14537",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743129708
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "NSE",
        "mode": "NEW",
        "device": null,
        "lot_size": 1,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000024",
        "order_type": "LIMIT",
        "trading_symbol": "CYIENT-EQ",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "1280.75",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": "10002",
        "rejection_reason": "RMS:Margin Exceeds,Required:360.13, Available:75.99 for entity account-091000006 across exchange across segment across product ",
        "instrument_token": "5748",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743129705
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "NSE",
        "mode": "NEW",
        "device": null,
        "lot_size": 1,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000023",
        "order_type": "LIMIT",
        "trading_symbol": "BSE-EQ",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "4684.35",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": "10002",
        "rejection_reason": "RMS:Margin Exceeds,Required:1493.79, Available:75.99 for entity account-091000006 across exchange across segment across product ",
        "instrument_token": "19585",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743129702
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "NA",
        "series": "",
        "square_off?": false,
        "exchange": "NSE",
        "mode": "NEW",
        "device": null,
        "lot_size": 1,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000022",
        "order_type": "LIMIT",
        "trading_symbol": "BHARTIARTL-EQ",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "1724.70",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": "10002",
        "rejection_reason": "RMS:Margin Exceeds,Required:433.23, Available:75.99 for entity account-091000006 across exchange across segment across product ",
        "instrument_token": "10604",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743129699
      },
      {
        "disclosed_quantity": 0,
        "average_price": "0.00",
        "exchange_order_id": "1000000000002338",
        "series": "",
        "square_off?": false,
        "exchange": "NSE",
        "mode": "NEW",
        "device": null,
        "lot_size": 1,
        "login_id": "091000006",
        "order_side": "BUY",
        "oms_order_id": "250328000000021",
        "order_type": "LIMIT",
        "trading_symbol": "BEL-EQ",
        "stop_loss_value": null,
        "market_protection_percentage": 0,
        "quantity": 1,
        "product": "NRML",
        "trailing_stop_loss": null,
        "last_activity_reference": 0,
        "order_tag": "",
        "validity": "DAY",
        "segment": "",
        "average_trade_price": "0.00",
        "square_off_value": null,
        "pro_cli": "CLIENT",
        "order_status": "rejected",
        "order_status_info": "",
        "nnf_id": 0,
        "amo": false,
        "trigger_price": "0.00",
        "leg_order_indicator": "",
        "price": "300.65",
        "is_trailing": false,
        "trade_price": 0,
        "rejection_code": 0,
        "filled_quantity": 0,
        "target_price_type": "absolute",
        "exchange_time": 0,
        "user_order_id": "10002",
        "rejection_reason": "16387 : Security is not allowed to trade in this market  ",
        "instrument_token": "383",
        "deposit": 0,
        "contract_description": {},
        "remaining_quantity": 1,
        "client_id": "091000006",
        "order_entry_time": 1743129696
      }
    ]
  },
  "message": "",
  "status": "success"
}
Example Request
import requests

url = "https://masterswift-beta.mastertrust.co.in/api/v1/orders?type=completed&client_id=091000006"

payload={}
headers = {
  'Authorization': 'Bearer 7uW2h1SGPpfcGwXmxExF8oXnYFCBnC30gTc_c26ed30.I2NmFmuvDohqj9AJeCkbB66AUtjizHtNwCR0KgOg8M0'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

9. TradeBook

This API allows you to retrieve the trade book for a client.

Request
Method

GET

URL
/api/v1/trades?client_id=091000006
Response
Status

200

Sample Response
{
  "data": {
    "trades": [
      {
        "book_type": "",
        "broker_id": "",
        "client_id": "091000006",
        "disclosed_vol": 0,
        "disclosed_vol_remaining": 0,
        "exchange": "NSE",
        "exchange_order_id": "1100000020022029",
        "exchange_time": 1743137188,
        "fill_number": "202485785",
        "filled_quantity": 1,
        "good_till_date": "",
        "instrument_token": 14537,
        "login_id": null,
        "oms_order_id": "250328000022151",
        "order_entry_time": 1743137537,
        "order_price": 5.88,
        "order_side": "BUY",
        "order_type": "MKT",
        "original_vol": 0,
        "pan": "PAIPS0624B",
        "pro_cli": "--",
        "product": "NRML",
        "remaining_quantity": null,
        "trade_number": "202485785",
        "trade_price": 5.88,
        "trade_quantity": 1,
        "trade_time": 1743137537,
        "trading_symbol": "DISHTV-EQ",
        "trigger_price": 0,
        "v_login_id": null,
        "vol_filled_today": "Filledqty"
      }
    ]
  },
  "message": "",
  "status": "success"
}
Example Request
import requests

url = "https://masterswift-beta.mastertrust.co.in/api/v1/trades?client_id=091000006"

payload={}
headers = {
  'Authorization': 'Bearer 7uW2h1SGPpfcGwXmxExF8oXnYFCBnC30gTc_c26ed30.I2NmFmuvDohqj9AJeCkbB66AUtjizHtNwCR0KgOg8M0'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

10. OrderHistory

This API allows you to retrieve the history of a specific order.

Request
Method

GET

URL
/api/v1/order/<omsOrderNum>/history?client_id=<clientID>
example:
/api/v1/order/250328000022151/history?client_id=091000006
Response
Status

200

Sample Response
{
  "data": [
    {
      "avg_price": 5.88,
      "client_id": "091000006",
      "client_order_id": "5002681",
      "created_at": null,
      "disclosed_quantity": "0",
      "exchange": "NSE",
      "exchange_order_id": "1100000020022029",
      "exchange_time": "28-Mar-2025 10:22:17",
      "fill_quantity": 1,
      "last_modified": null,
      "login_id": "091000006",
      "modified_at": null,
      "order_id": "250328000022151",
      "order_mode": null,
      "order_side": "BUY",
      "order_type": "MARKET",
      "price": 0,
      "product": "NRML",
      "quantity": 1,
      "reject_reason": "--",
      "remaining_quantity": null,
      "segment": "Capital",
      "status": "complete",
      "symbol": "DISHTV",
      "token": 14537,
      "trigger_price": 0,
      "underlying_token": 14537,
      "validity": "DAY"
    },
    {
      "avg_price": 0,
      "client_id": "091000006",
      "client_order_id": "5002681",
      "created_at": null,
      "disclosed_quantity": "0",
      "exchange": "NSE",
      "exchange_order_id": "1100000020022029",
      "exchange_time": "28-Mar-2025 10:22:17",
      "fill_quantity": 0,
      "last_modified": null,
      "login_id": "091000006",
      "modified_at": null,
      "order_id": "250328000022151",
      "order_mode": null,
      "order_side": "BUY",
      "order_type": "MARKET",
      "price": 0,
      "product": "NRML",
      "quantity": 1,
      "reject_reason": "--",
      "remaining_quantity": null,
      "segment": "Capital",
      "status": "open",
      "symbol": "DISHTV",
      "token": 14537,
      "trigger_price": 0,
      "underlying_token": 14537,
      "validity": "DAY"
    },
    {
      "avg_price": 0,
      "client_id": "091000006",
      "client_order_id": "5002681",
      "created_at": null,
      "disclosed_quantity": "0",
      "exchange": "NSE",
      "exchange_order_id": "1100000020022029",
      "exchange_time": "28-Mar-2025 10:22:17",
      "fill_quantity": 0,
      "last_modified": null,
      "login_id": "091000006",
      "modified_at": null,
      "order_id": "250328000022151",
      "order_mode": null,
      "order_side": "BUY",
      "order_type": "LIMIT",
      "price": 5.5,
      "product": "NRML",
      "quantity": 1,
      "reject_reason": "--",
      "remaining_quantity": null,
      "segment": "Capital",
      "status": "modified",
      "symbol": "DISHTV",
      "token": 14537,
      "trigger_price": 0,
      "underlying_token": 14537,
      "validity": "DAY"
    },
    {
      "avg_price": 0,
      "client_id": "091000006",
      "client_order_id": "5002681",
      "created_at": null,
      "disclosed_quantity": "0",
      "exchange": "NSE",
      "exchange_order_id": "1100000020022029",
      "exchange_time": "28-Mar-2025 10:16:28",
      "fill_quantity": 0,
      "last_modified": null,
      "login_id": "091000006",
      "modified_at": null,
      "order_id": "250328000022151",
      "order_mode": null,
      "order_side": "BUY",
      "order_type": "LIMIT",
      "price": 5.5,
      "product": "NRML",
      "quantity": 1,
      "reject_reason": "--",
      "remaining_quantity": null,
      "segment": "Capital",
      "status": "modify pending",
      "symbol": "DISHTV",
      "token": 14537,
      "trigger_price": 0,
      "underlying_token": 14537,
      "validity": "DAY"
    },
    {
      "avg_price": 0,
      "client_id": "091000006",
      "client_order_id": "5002681",
      "created_at": null,
      "disclosed_quantity": "0",
      "exchange": "NSE",
      "exchange_order_id": "1100000020022029",
      "exchange_time": "28-Mar-2025 10:16:28",
      "fill_quantity": 0,
      "last_modified": null,
      "login_id": "091000006",
      "modified_at": null,
      "order_id": "250328000022151",
      "order_mode": null,
      "order_side": "BUY",
      "order_type": "LIMIT",
      "price": 5.5,
      "product": "NRML",
      "quantity": 1,
      "reject_reason": "--",
      "remaining_quantity": null,
      "segment": "Capital",
      "status": "modify validation pending",
      "symbol": "DISHTV",
      "token": 14537,
      "trigger_price": 0,
      "underlying_token": 14537,
      "validity": "DAY"
    },
    {
      "avg_price": 0,
      "client_id": "091000006",
      "client_order_id": "5002681",
      "created_at": null,
      "disclosed_quantity": "0",
      "exchange": "NSE",
      "exchange_order_id": "1100000020022029",
      "exchange_time": "28-Mar-2025 10:16:28",
      "fill_quantity": 0,
      "last_modified": null,
      "login_id": "091000006",
      "modified_at": null,
      "order_id": "250328000022151",
      "order_mode": null,
      "order_side": "BUY",
      "order_type": "LIMIT",
      "price": 5.5,
      "product": "NRML",
      "quantity": 1,
      "reject_reason": "--",
      "remaining_quantity": null,
      "segment": "Capital",
      "status": "open",
      "symbol": "DISHTV",
      "token": 14537,
      "trigger_price": 0,
      "underlying_token": 14537,
      "validity": "DAY"
    },
    {
      "avg_price": 0,
      "client_id": "091000006",
      "client_order_id": "5002681",
      "created_at": null,
      "disclosed_quantity": "0",
      "exchange": "NSE",
      "exchange_order_id": null,
      "exchange_time": "--",
      "fill_quantity": 0,
      "last_modified": null,
      "login_id": "091000006",
      "modified_at": null,
      "order_id": "250328000022151",
      "order_mode": null,
      "order_side": "BUY",
      "order_type": "LIMIT",
      "price": 5.5,
      "product": "NRML",
      "quantity": 1,
      "reject_reason": "--",
      "remaining_quantity": null,
      "segment": "Capital",
      "status": "open pending",
      "symbol": "DISHTV",
      "token": 14537,
      "trigger_price": 0,
      "underlying_token": 14537,
      "validity": "DAY"
    },
    {
      "avg_price": 0,
      "client_id": "091000006",
      "client_order_id": "5002681",
      "created_at": null,
      "disclosed_quantity": "0",
      "exchange": "NSE",
      "exchange_order_id": null,
      "exchange_time": "--",
      "fill_quantity": 0,
      "last_modified": null,
      "login_id": "091000006",
      "modified_at": null,
      "order_id": "250328000022151",
      "order_mode": null,
      "order_side": "BUY",
      "order_type": "LIMIT",
      "price": 5.5,
      "product": "NRML",
      "quantity": 1,
      "reject_reason": "--",
      "remaining_quantity": null,
      "segment": "Capital",
      "status": "validation pending",
      "symbol": "DISHTV",
      "token": 14537,
      "trigger_price": 0,
      "underlying_token": 14537,
      "validity": "DAY"
    },
    {
      "avg_price": 0,
      "client_id": "091000006",
      "client_order_id": "5002681",
      "created_at": null,
      "disclosed_quantity": "0",
      "exchange": "NSE",
      "exchange_order_id": null,
      "exchange_time": "--",
      "fill_quantity": 0,
      "last_modified": null,
      "login_id": "091000006",
      "modified_at": null,
      "order_id": "250328000022151",
      "order_mode": null,
      "order_side": "BUY",
      "order_type": "LIMIT",
      "price": 5.5,
      "product": "NRML",
      "quantity": 1,
      "reject_reason": "--",
      "remaining_quantity": null,
      "segment": "Capital",
      "status": "put order req received",
      "symbol": "DISHTV",
      "token": 14537,
      "trigger_price": 0,
      "underlying_token": 14537,
      "validity": "DAY"
    }
  ],
  "message": "",
  "status": "success"
}
Example Request
import requests

url = "https://masterswift-beta.mastertrust.co.in/api/v1/order/250328000022151/history?client_id=091000006"

payload={}
headers = {
  'Authorization': 'Bearer 7uW2h1SGPpfcGwXmxExF8oXnYFCBnC30gTc_c26ed30.I2NmFmuvDohqj9AJeCkbB66AUtjizHtNwCR0KgOg8M0'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

11. Positionbook Daywise

This API allows you to retrieve the position book for a client.

Request
Method

GET

URL (Live)
/api/v1/positions?type=live&client_id=091000006
Response
Status

200

Sample Response
{
  "data": [
    {
      "average_buy_price": 5.88,
      "average_sell_price": 0,
      "buy_amount": 5.88,
      "buy_quantity": 1,
      "cf_buy_amount": 0,
      "cf_buy_quantity": 0,
      "cf_sell_amount": 0,
      "cf_sell_quantity": 0,
      "client_id": "091000006",
      "exchange": "NSE",
      "instrument_token": 14537,
      "ltp": 5.88,
      "multiplier": 1,
      "net_amount": -5.88,
      "net_quantity": 1,
      "previous_close": 5.83,
      "prod_type": "NRML",
      "product": "NRML",
      "realized_mtm": 0,
      "segment": null,
      "sell_amount": 0,
      "sell_quantity": 0,
      "symbol": "DISHTV",
      "token": 14537,
      "trading_symbol": "DISHTV-EQ"
    },
    {
      "average_buy_price": 47.38,
      "average_sell_price": 47.36,
      "buy_amount": 94.76,
      "buy_quantity": 2,
      "cf_buy_amount": 0,
      "cf_buy_quantity": 0,
      "cf_sell_amount": 0,
      "cf_sell_quantity": 0,
      "client_id": "091000006",
      "exchange": "NSE",
      "instrument_token": 11377,
      "ltp": 47.35,
      "multiplier": 1,
      "net_amount": -0.04,
      "net_quantity": 0,
      "previous_close": 46.81,
      "prod_type": "NRML",
      "product": "NRML",
      "realized_mtm": -0.04,
      "segment": null,
      "sell_amount": 94.72,
      "sell_quantity": 2,
      "symbol": "MAHABANK",
      "token": 11377,
      "trading_symbol": "MAHABANK-EQ"
    }
  ],
  "message": "",
  "status": "success"
}
Example Request
import requests

url = "https://masterswift-beta.mastertrust.co.in/api/v1/positions?type=live&client_id=091000006"

payload={}
headers = {
  'Authorization': 'Bearer 7uW2h1SGPpfcGwXmxExF8oXnYFCBnC30gTc_c26ed30.I2NmFmuvDohqj9AJeCkbB66AUtjizHtNwCR0KgOg8M0'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

12. Positionbook Netwise

This API allows you to retrieve the position book for a client.

Request
Method

GET

URL (All)
/api/v1/positions?type=historical&client_id=091000006
Response
Status

200

Sample Response
{
  "data": [
    {
      "v_login_id": "091000006",
      "actual_cf_sell_amount": 0,
      "sell_quantity": 0,
      "exchange": "NSE",
      "trading_symbol": "DISHTV-EQ",
      "net_amount_mtm": -5.88,
      "net_quantity": 1,
      "previous_close": 5.83,
      "cf_sell_quantity": 0,
      "buy_quantity": 1,
      "close_price": 5.83,
      "cf_buy_quantity": 0,
      "actual_average_sell_price": 0,
      "client_id": "091000006",
      "actual_average_buy_price": 0,
      "instrument_token": 14537,
      "token": 14537,
      "cf_sell_amount": 0,
      "ltp": 5.88,
      "average_sell_price": 0,
      "prod_type": "NRML",
      "segment": null,
      "realized_mtm": 0,
      "cf_buy_amount": 0,
      "sell_amount": 0,
      "symbol": "DISHTV",
      "product": "NRML",
      "average_buy_price": 5.88,
      "actual_cf_buy_amount": 0,
      "buy_amount": 5.88,
      "pro_cli": "CLIENT",
      "multiplier": 1,
      "average_price": 5.83
    },
    {
      "v_login_id": "091000006",
      "actual_cf_sell_amount": 0,
      "sell_quantity": 2,
      "exchange": "NSE",
      "trading_symbol": "MAHABANK-EQ",
      "net_amount_mtm": -0.04,
      "net_quantity": 0,
      "previous_close": 46.81,
      "cf_sell_quantity": 0,
      "buy_quantity": 2,
      "close_price": 46.81,
      "cf_buy_quantity": 0,
      "actual_average_sell_price": 0,
      "client_id": "091000006",
      "actual_average_buy_price": 0,
      "instrument_token": 11377,
      "token": 11377,
      "cf_sell_amount": 0,
      "ltp": 47.38,
      "average_sell_price": 47.36,
      "prod_type": "NRML",
      "segment": null,
      "realized_mtm": -0.04,
      "cf_buy_amount": 0,
      "sell_amount": 94.72,
      "symbol": "MAHABANK",
      "product": "NRML",
      "average_buy_price": 47.38,
      "actual_cf_buy_amount": 0,
      "buy_amount": 94.76,
      "pro_cli": "CLIENT",
      "multiplier": 1,
      "average_price": 46.81
    }
  ],
  "message": "",
  "status": "success"
}
Example Request
import requests

url = "https://masterswift-beta.mastertrust.co.in/api/v1/positions?type=historical&client_id=091000006"

payload={}
headers = {
  'Authorization': 'Bearer 7uW2h1SGPpfcGwXmxExF8oXnYFCBnC30gTc_c26ed30.I2NmFmuvDohqj9AJeCkbB66AUtjizHtNwCR0KgOg8M0'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

13. Demat Holdings

This API allows you to retrieve the demat holdings for a client.

Request
Method

GET

URL
/api/v1/holdings?client_id=091000006
Response
Status

200

Sample Response
{
  "data": {
    "holdings": [
      {
        "actual_buy_avg": 6.42,
        "branch_code": "",
        "buy_avg": 5.83,
        "buy_avg_mtm": 8.58,
        "client_id": "091000006",
        "collateral_quantity": "2",
        "exchange": "NSE",
        "instrument_details": {
          "exchange": 1,
          "instrument_name": "EQ",
          "instrument_token": 14537,
          "trading_symbol": "DISHTV-EQ"
        },
        "isin": "INE836F01026",
        "ltp": 5.9,
        "previous_close": 5.83,
        "product": "CNC",
        "quantity": 2,
        "symbol": "DISHTV-EQ",
        "t0_price": 0,
        "t0_quantity": 0,
        "t1_price": 0,
        "t1_quantity": 0,
        "t2_price": 0,
        "t2_quantity": 0,
        "token": 14537,
        "trading_symbol": "DISHTV-EQ",
        "used_quantity": 0
      },
      {
        "actual_buy_avg": 52.25,
        "branch_code": "",
        "buy_avg": 44.23,
        "buy_avg_mtm": 52.92,
        "client_id": "091000006",
        "collateral_quantity": "1",
        "exchange": "NSE",
        "instrument_details": {
          "exchange": 1,
          "instrument_name": "EQ",
          "instrument_token": 1491,
          "trading_symbol": "IFCI-EQ"
        },
        "isin": "INE039A01010",
        "ltp": 44.7,
        "previous_close": 44.23,
        "product": "CNC",
        "quantity": 1,
        "symbol": "IFCI-EQ",
        "t0_price": 0,
        "t0_quantity": 0,
        "t1_price": 0,
        "t1_quantity": 0,
        "t2_price": 0,
        "t2_quantity": 0,
        "token": 1491,
        "trading_symbol": "IFCI-EQ",
        "used_quantity": 0
      },
      {
        "actual_buy_avg": 63,
        "branch_code": "",
        "buy_avg": 46.04,
        "buy_avg_mtm": 53.21,
        "client_id": "091000006",
        "collateral_quantity": "1",
        "exchange": "NSE",
        "instrument_details": {
          "exchange": 1,
          "instrument_name": "EQ",
          "instrument_token": 15313,
          "trading_symbol": "IRB-EQ"
        },
        "isin": "INE821I01022",
        "ltp": 46.35,
        "previous_close": 46.04,
        "product": "CNC",
        "quantity": 1,
        "symbol": "IRB-EQ",
        "t0_price": 0,
        "t0_quantity": 0,
        "t1_price": 0,
        "t1_quantity": 0,
        "t2_price": 0,
        "t2_quantity": 0,
        "token": 15313,
        "trading_symbol": "IRB-EQ",
        "used_quantity": 0
      },
      {
        "actual_buy_avg": 50.66,
        "branch_code": "",
        "buy_avg": 46.81,
        "buy_avg_mtm": 49.92,
        "client_id": "091000006",
        "collateral_quantity": "1",
        "exchange": "NSE",
        "instrument_details": {
          "exchange": 1,
          "instrument_name": "EQ",
          "instrument_token": 11377,
          "trading_symbol": "MAHABANK-EQ"
        },
        "isin": "INE457A01014",
        "ltp": 47.4,
        "previous_close": 46.81,
        "product": "CNC",
        "quantity": 1,
        "symbol": "MAHABANK-EQ",
        "t0_price": 0,
        "t0_quantity": 0,
        "t1_price": 0,
        "t1_quantity": 0,
        "t2_price": 0,
        "t2_quantity": 0,
        "token": 11377,
        "trading_symbol": "MAHABANK-EQ",
        "used_quantity": 0
      },
      {
        "actual_buy_avg": 0.76,
        "branch_code": "",
        "buy_avg": 0.69,
        "buy_avg_mtm": 0.69,
        "client_id": "091000006",
        "collateral_quantity": "0",
        "exchange": "BSE",
        "instrument_details": {
          "exchange": 6,
          "instrument_name": "E",
          "instrument_token": 505343,
          "trading_symbol": "MONOT-Z"
        },
        "isin": "INE811D01024",
        "ltp": 0.7,
        "previous_close": 0.69,
        "product": "CNC",
        "quantity": 1,
        "symbol": "MONOT",
        "t0_price": 0,
        "t0_quantity": 0,
        "t1_price": 0,
        "t1_quantity": 0,
        "t2_price": 0,
        "t2_quantity": 0,
        "token": 505343,
        "trading_symbol": "MONOT",
        "used_quantity": 0
      },
      {
        "actual_buy_avg": 69.21,
        "branch_code": "",
        "buy_avg": 57.01,
        "buy_avg_mtm": 53.61,
        "client_id": "091000006",
        "collateral_quantity": "3",
        "exchange": "NSE",
        "instrument_details": {
          "exchange": 1,
          "instrument_name": "EQ",
          "instrument_token": 12018,
          "trading_symbol": "SUZLON-EQ"
        },
        "isin": "INE040H01021",
        "ltp": 57.9,
        "previous_close": 57.01,
        "product": "CNC",
        "quantity": 3,
        "symbol": "SUZLON-EQ",
        "t0_price": 0,
        "t0_quantity": 0,
        "t1_price": 0,
        "t1_quantity": 0,
        "t2_price": 0,
        "t2_quantity": 0,
        "token": 12018,
        "trading_symbol": "SUZLON-EQ",
        "used_quantity": 0
      }
    ]
  },
  "message": "",
  "status": "success"
}
Example Request
import requests

url = "https://masterswift-beta.mastertrust.co.in/api/v1/holdings?client_id=091000006"

payload={}
headers = {
  'Authorization': 'Bearer 7uW2h1SGPpfcGwXmxExF8oXnYFCBnC30gTc_c26ed30.I2NmFmuvDohqj9AJeCkbB66AUtjizHtNwCR0KgOg8M0'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

14. Cash Positions

This API allows you to retrieve the cash positions for a client.

Request
Method

GET

URL
/api/v1/funds/view?client_id=091000006&type=all
Response
Status

200

Sample Response
{
  "data": {
    "client_id": "091000006",
    "headers": [
      "Description",
      "MTM_SINGLE_LEVEL-ALL"
    ],
    "values": [
      ["Available", "74.06"],
      ["Adhoc Margin", "0.000000"],
      ["Margin Used", "1.93"],
      ["Pay In", "0"],
      ["Pay Out", "0.00"],
      ["Cash Margin", "75.99"],
      ["Collateral", "0.00"],
      ["Var Margin", "0.00"],
      ["Span Margin", "0.00"],
      ["Premium Present", "0"],
      ["Exposure Margin", "0.00"]
    ]
  },
  "message": "",
  "status": "success"
}
Example Request
import requests

url = "https://masterswift-beta.mastertrust.co.in/api/v1/funds/view?client_id=091000006&type=all"

payload={}
headers = {
  'Authorization': 'Bearer 7uW2h1SGPpfcGwXmxExF8oXnYFCBnC30gTc_c26ed30.I2NmFmuvDohqj9AJeCkbB66AUtjizHtNwCR0KgOg8M0'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

15. Place CO Order

This API allows you to place a cover order. Note: May not be supported / enabled in all environments by default, please check with your Broker.

Request
Method

POST

URL
/api/v1/orders
Sample Request Parameters
(Possible values in comment)
{
  "client_id": "091000006",
  "disclosed_quantity": 0,
  "exchange": "NSE",
  "instrument_token": "14537",
  "market_protection_percentage": 10,
  "order_side": "BUY",
  "order_type": "LIMIT",
  "price": 5.50,
  "product": "CO",
  "quantity": 1,
  "trigger_price": 5.4,
  "validity": "DAY",
  "user_order_id": "5002681",
  "device": "WEB"
}
Response
Status

200

Sample Response
{
  "data": {
    "client_order_id": "250328000026369",
    "oms_order_id": "250328000026369",
    "user_order_id": 5002681
  },
  "message": "Order place successfully",
  "status": "success"
}
Example Request
import requests

url = "https://masterswift-beta.mastertrust.co.in/api/v1/orders"

payload = "{
    "client_id": "091000006",
    "disclosed_quantity": 0,
    "exchange": "NSE",
    "instrument_token": "14537",
    "market_protection_percentage": 10,
    "order_side": "BUY",
    "order_type": "LIMIT",
    "price": 5.50,
    "product": "CO",
    "quantity": 1,
    "trigger_price": 5.4,
    "validity": "DAY",
    "user_order_id": "5002681",
    "device": "WEB"
}"
headers = {}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

16. Place BO Order

This API allows you to place a bracket order. Note: May not be supported / enabled in all environments by default, please check with your Broker.

Request
Method

POST

URL
/api/v1/orders/bracket
Sample Request Parameters
(Possible values in comment)
{
  "exchange": "NSE",
  "instrument_token": 14537,
  "client_id": "091000006",
  "order_type": "LIMIT",
  "price": "5.5",
  "quantity": 1,
  "disclosed_quantity": 0,
  "validity": "DAY",
  "product": "BO",
  "order_side": "BUY",
  "device": "WEB",
  "user_order_id": 10002,
  "trigger_price": 0,
  "stop_loss_value": "5",
  "square_off_value": "6",
  "trailing_stop_loss": 0,
  "is_trailing": false
}
Response
Status

200

Sample Response
{
  "data": {
    "client_order_id": "250328000028314"
  },
  "message": "Order place successfully",
  "status": "success"
}
Example Request
import requests

url = "https://masterswift-beta.mastertrust.co.in/api/v1/orders/bracket"

payload = "{
"exchange":"NSE",
"instrument_token":14537,
"client_id":"091000006",
 "order_type":"LIMIT",
 "price":"5.5",
 "quantity":1,
 "disclosed_quantity":0,
 "validity":"DAY",
 "product":"BO",
 "order_side":"BUY",
 "device":"WEB",
 "user_order_id":10002,
 "trigger_price":0,
 "stop_loss_value":"5",
 "square_off_value":"6",
 "trailing_stop_loss":0,
 "is_trailing":false
 }
"
headers = {
  'Authorization': 'Bearer 7uW2h1SGPpfcGwXmxExF8oXnYFCBnC30gTc_c26ed30.I2NmFmuvDohqj9AJeCkbB66AUtjizHtNwCR0KgOg8M0'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

17. Exit Bracket Order

This API allows you to exit a bracket order. Note: May not be supported / enabled in all environments by default, please check with your Broker.

Request
Method

DELETE

URL
/api/v1/orders/bracket
Sample Request Parameters
(Possible values in comment)
{
  "oms_order_id": "250328000028870",      
  "leg_order_indicator": "250328000028870",
  "status": "open",    
  "client_id": "091000006"
}
Response
Status

200

Sample Response
{
  "data": {},
  "message": "Ok",
  "status": "success"
}
Example Request
import requests

url = "https://masterswift-beta.mastertrust.co.in/api/v1/orders/bracket?="

payload = "{  "oms_order_id": "250328000028870",      
  "leg_order_indicator": "250328000028870",
  "status": "open",    
  "client_id":"091000006" 
  }"
headers = {
  'Authorization': 'Bearer 7uW2h1SGPpfcGwXmxExF8oXnYFCBnC30gTc_c26ed30.I2NmFmuvDohqj9AJeCkbB66AUtjizHtNwCR0KgOg8M0'
}

response = requests.request("DELETE", url, headers=headers, data=payload)

print(response.text)

18. Exit Cover Order

This API allows you to exit a cover order. Note: May not be supported / enabled in all environments by default, please check with your Broker.

Request
Method

DELETE

URL
/api/v1/orders/cover
Sample Request Parameters
(Possible values in comment)
{
  "oms_order_id": "250328000026369",
  "leg_order_indicator": "250328000026369",
  "client_id": "091000006"
}
Response
Status

200

Sample Response
{
  "data": {
    "oms_order_id": "250328000026369"
  },
  "message": "Exit Cover Order request submitted for OMS Order: 250328000026369",
  "status": "success"
}
Example Request
import requests

url = "https://masterswift-beta.mastertrust.co.in/api/v1/orders/cover"

payload = "{  "oms_order_id": "250328000026369",      
  "leg_order_indicator": "250328000026369",  
  "client_id":"091000006" 
  }"
headers = {
  'Authorization': 'Bearer 7uW2h1SGPpfcGwXmxExF8oXnYFCBnC30gTc_c26ed30.I2NmFmuvDohqj9AJeCkbB66AUtjizHtNwCR0KgOg8M0'
}

response = requests.request("DELETE", url, headers=headers, data=payload)

print(response.text)

19. Trading Info

Get Trading information.

Request
Method

GET

URL
/api/v1/user/trading_info
Response
Status

200

Sample Response
{
  "data": {
    "client_id": "091000006",
    "email_id": "[email protected]",
    "exchanges_subscribed": [
      "BSE",
      "BFO",
      "MCX",
      "NSE",
      "NFO"
    ],
    "name": "HARSIMRAN SINGH",
    "products_enabled": [
      "CNC",
      "CO",
      "MIS",
      "NRML"
    ],
    "status": "Activated"
  },
  "message": "",
  "status": "success"
}
Example Request
import requests

url = "https://masterswift-beta.mastertrust.co.in/api/v1/user/trading_info"

payload={}
headers = {
  'Authorization': 'Bearer 7uW2h1SGPpfcGwXmxExF8oXnYFCBnC30gTc_c26ed30.I2NmFmuvDohqj9AJeCkbB66AUtjizHtNwCR0KgOg8M0'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

20. Glossary

Conventions
  • All responses are in JSON format.
  • All request parameters are mandatory unless explicitly marked as [optional]
Status Codes

All status codes are standard HTTP status codes. The below ones are used in this API.

  • 2XX - Success of some kind
  • 4XX - Error occurred in client's part
  • 5XX - Error occurred in server's part
Status CodeDescription
200OK
400Bad request
401Authentication failure
403Forbidden
404Resource not found
405Method Not Allowed
500Internal Server Error
503Service Unavailable

TOTP

What is TOTP?

TOTP is an abbreviated form of Time-based One-Time Password, a secure authentication method where a unique, temporary password is generated using time as a factor. TOTP uses an authenticator app on the user's device to generate a new code on set intervals.

For 2FA, use TOTP for extra layer of security.

How to generate TOTP?

Please follow the steps as mentioned below

  • Visit www.mastertrust.co.in > Click on Sign In to Master Web platform > Enter your credentials and OTP
  • Step 1: Sign in to Master Web platform
  • Step 2: Sign in to trade platform
  • A TOTP activation page will appear where you need to follow steps as mentioned there to activate TOTP
  • Step 3