Download OpenAPI specification:Download
The TradeX API is a high-performance trading API designed for seamless order execution, position tracking, and risk management across multiple exchanges.
All API responses follow a structured format:
✅ Success Response Example
{
"status": 200,
"message": "Success",
"data": { ... }
}
❌ Error Response Example
{
"status": 400,
"message": "Bad Request: Invalid parameters",
"data": null
}
All API calls require a valid Bearer token:
Authorization: Bearer {token}
Tokens are obtained via the Login API and must be included in every request.
To ensure fair usage, API requests are subject to rate limits. If the rate limit is exceeded, the response will be:
{
"status": 429,
"message": "Too Many Requests: Rate limit exceeded",
"data": null
}
During App Key registration, users may provide an IP address/domain.
API requests from unregistered IPs/domains will fail authentication.
When requesting an API Key, users can restrict access to specific:
🔹 Example: If a user restricts their key to NseCm and CNC, they will not be able to place orders on MCX or Intraday.
This endpoint authenticates a user and provides a token for further API access.
The token must be included in subsequent requests as a Bearer Token in the Authorization
header.
Authentication Required:
No authentication required for this endpoint.
Example Request:
POST /Login HTTP/1.1
Content-Type: application/json
{
"user_id": "AB1234",
"app_key": "your_app_key",
"secret_key": "your_secret_key",
"source": "web"
}
Example Successful Response:
{
"status": 200,
"message": "Login successful",
"data": {
"user_id": "AB1234",
"exchanges_allowed": ["NseCm", "NseFO", "Bse", "MCX"],
"products_allowed": ["CNC", "Intraday"],
"token": "your_access_token"
}
}
Example Error Response (401 Unauthorized
):
{
"status": 401,
"message": "Unauthorized: Invalid credentials",
"data": null
}
Responses:
200 OK
– Login successful, returns user details.401 Unauthorized
– Invalid credentials.500 Internal Server Error
– Unexpected error occurred.version required | string |
The login request containing authentication credentials.
user_id required | string non-empty Unique identifier assigned to the user. |
app_key required | string non-empty Application key used for authentication. |
secret_key required | string non-empty Secret key associated with the application key. |
source required | string [ 0 .. 10 ] characters Source of the login request.
This should be consumer of the api. (e.g. smallcase, sensibull, tradetron)
Helps identify the origin of the authentication request. |
{- "user_id": "string",
- "app_key": "string",
- "secret_key": "string",
- "source": "string"
}
{- "status": 0,
- "message": "string",
- "data": {
- "user_id": "string",
- "exchanges_allowed": "string",
- "products_allowed": "string",
- "token": "string"
}
}
The client must provide both a valid authentication token and ClientID
in the request:
Example Request:
POST /Logout?ClientID=12345 HTTP/1.1
Authorization: Bearer {token}
version required | string |
ClientID | string The unique identifier of the user requesting logout. |
{- "status": 0,
- "message": "string",
- "data": "string"
}
This endpoint allows an authenticated client to fetch its detailed user profile, including
their registered contact information, trading permissions, and account-related details.
Authentication Required:
A valid Bearer token must be included in the Authorization
header.
Example Request:
POST /UserProfile?ClientID=12345 HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
Query Parameters:
ClientID
→ The unique identifier of the user whose profile is being retrieved.Responses:
200 OK
– User profile retrieved successfully.400 Bad Request
– Missing or invalid user ID.401 Unauthorized
– Authentication token is missing or invalid.500 Internal Server Error
– Unexpected failure while retrieving user profile.version required | string |
ClientID | string The unique identifier of the user. |
{- "status": 0,
- "message": "string",
- "data": {
- "client_id": "string",
- "name": "string",
- "mobile": "string",
- "email": "string",
- "trading_allowed": "string",
- "products_allowed": "string",
- "pan": "string",
- "dp_id": "string",
- "beneficiary_id": "string",
- "has_poa": true
}
}
Places a new order for the authenticated client.
This endpoint requires authentication using a Bearer token.
The client must include the token in the Authorization
header:
Example Request:
POST /NewOrder HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
Example Request Body:
{
"client": "AB1234",
"quantity": 100,
"price": 1500.50,
...
}
Responses:
200 OK
– Request for new order sent. 400 Bad Request
– Invalid order details. 401 Unauthorized
– Missing or invalid authentication token. 500 Internal Server Error
– Unexpected failure during order processing.version required | string |
The new order request containing order details.
exchange required | string non-empty Exchange identifier where the order is placed. |
code required | string non-empty Unique identifier of the security being traded.
|
side required | string non-empty Side of the trade. |
quantity required | integer <int32> [ 1 .. 2147483647 ] Total quantity of the security to be traded. |
price required | number <double> Order price for limit or stop-limit orders. |
client required | string non-empty Client identifier placing the order. |
book required | string non-empty Type of order book:
|
trigger_price required | number <double> Trigger price for stop-loss and stop-limit orders. |
disclosed_qty required | integer <int32> Quantity to be disclosed to the market (for iceberg orders). |
product required | string non-empty Product type for margin handling. |
validity required | string non-empty Order validity type. |
gtd | string or null Good-Till-Date (GTD) validity for long-duration orders. |
order_flag | integer <int32> Order flag settings (bitwise OR combinable):
|
sender_order_no required | integer <int32> Unique number assigned by the API consumer for tracking purposes. |
algol_id required | integer <int32> Algorithm identifier for algorithmic trading, provided by the broker. |
{- "exchange": "string",
- "code": "string",
- "side": "string",
- "quantity": 1,
- "price": 0,
- "client": "string",
- "book": "string",
- "trigger_price": 0,
- "disclosed_qty": 0,
- "product": "string",
- "validity": "string",
- "gtd": "string",
- "order_flag": 0,
- "sender_order_no": 0,
- "algol_id": 0
}
{- "status": 0,
- "message": "string",
- "data": {
- "user_order_no": "string",
- "sender_order_no": 0,
- "client": "string"
}
}
Modifies an existing order for the authenticated client.
This endpoint modifies an order for the authenticated client.
Requires authentication using a Bearer token.
Example Request:
POST /ModifyOrder HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
Example Request Body:
{
"client": "AB1234",
"exchange_order_no": 987654,
"quantity": 100,
"price": 1500.50,
...
}
Responses:
200 OK
– Request to modify order sent. 400 Bad Request
– Invalid modification request. 401 Unauthorized
– Missing or invalid authentication token. 500 Internal Server Error
– Unexpected failure during order modification.version required | string |
The modify order request containing order modification details.
exchange required | string non-empty The exchange where the order was placed. |
code required | string non-empty The unique security identifier (trading symbol code). |
exchange_order_no required | string non-empty The unique order number assigned by the exchange for tracking. |
side required | string non-empty ^(Buy|Sell)$ Specifies whether the order is a Buy or Sell order. |
quantity required | integer <int32> [ 1 .. 2147483647 ] The new quantity for the modified order. |
price required | number <double> >= 0 The new price for the modified order. |
client required | string non-empty The client identifier associated with the order. |
book required | string non-empty Type of order book:
|
trigger_price required | number <double> >= 0 The trigger price for stop-loss and stop-limit orders. |
disclosed_qty required | integer <int32> [ 0 .. 2147483647 ] Quantity to be disclosed to the market (for iceberg orders). |
product required | string non-empty Product type for margin handling. |
validity required | string non-empty Order validity type. |
gtd | string or null Good-Till-Date (GTD) validity for long-duration orders. |
order_flag required | integer <int32> Reserved for future use. |
sender_order_no required | integer <int32> Unique number assigned by the API consumer for tracking purposes. |
qty_remaining required | integer <int32> [ 0 .. 2147483647 ] The remaining quantity of the order that is yet to be executed. |
qty_traded required | integer <int32> [ 0 .. 2147483647 ] The quantity of the order that has been executed so far. |
{- "exchange": "string",
- "code": "string",
- "exchange_order_no": "string",
- "side": "string",
- "quantity": 1,
- "price": 0,
- "client": "string",
- "book": "string",
- "trigger_price": 0,
- "disclosed_qty": 2147483647,
- "product": "string",
- "validity": "string",
- "gtd": "string",
- "order_flag": 0,
- "sender_order_no": 0,
- "qty_remaining": 2147483647,
- "qty_traded": 2147483647
}
{- "status": 0,
- "message": "string",
- "data": {
- "exchange_order_no": "string",
- "user_order_no": 0,
- "sender_order_no": 0,
- "client": "string"
}
}
Cancels an existing order for the authenticated client.
This endpoint cancels an order for the authenticated client.
Requires authentication using a Bearer token.
Example Request:
POST /CancelOrder HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
Example Request Body:
{
"exchange": "Bse",
"code": "54897"
"exchange_order_no": "124886566"
...
}
Responses:
200 OK
– Order sent for cancellation. 400 Bad Request
– Invalid cancellation request. 401 Unauthorized
– Missing or invalid authentication token. 500 Internal Server Error
– Unexpected failure during order cancellation.version required | string |
The cancel order request containing order details.
exchange required | string non-empty The exchange where the order was placed. |
code required | string non-empty The unique security identifier (trading symbol code). |
exchange_order_no required | string non-empty The unique order number assigned by the exchange for tracking. |
user_order_no | integer <int32> Internal order number generated by the API when the order was first placed. |
sender_order_no | integer <int32> Unique identifier assigned by the API consumer for tracking purposes. |
client required | string non-empty The client identifier associated with the order to be canceled. |
{- "exchange": "string",
- "code": "string",
- "exchange_order_no": "string",
- "user_order_no": 0,
- "sender_order_no": 0,
- "client": "string"
}
{- "status": 0,
- "message": "string",
- "data": {
- "exchange_order_no": "string",
- "user_order_no": 0,
- "sender_order_no": 0,
- "client": "string"
}
}
This endpoint sends all open orders for cancellation for a specific exchange, security, and client.
Only orders matching both exchange
and code
for the given client
will be sent for cancellation.
Cancellation Criteria:
exchange
: The stock/commodity exchange where the orders were placed. code
: The security identifier (trading symbol code). client
: The client whose orders should be canceled.Example Request:
POST /CancelAllOrders HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
Example Request Body:
{
"exchange": "NseCm",
"code": 123456,
"client": "AB1234"
}
Response Scenarios:
202 Accepted
– All matching orders sent for cancellation successfully. 200 OK
– Partial success: Some orders canceled, others failed. 400 Bad Request
– Invalid request parameters or missing required fields. 401 Unauthorized
– Invalid or missing authentication token. 404 Not Found
– No matching orders found for the given exchange, security, and client. 500 Internal Server Error
– Unexpected failure during cancellation processing.version required | string |
The cancel all orders request containing exchange, security code, and client details.
exchange required | string non-empty The exchange where the orders were placed. Example: Allowed values:
Cancellation Rule:
|
code required | integer <int32> The unique security identifier (trading symbol code) for the instrument being traded. Example: Cancellation Rule:
|
client required | string non-empty The client identifier associated with the orders. Example: Cancellation Rule:
|
{- "exchange": "string",
- "code": 0,
- "client": "string"
}
{- "status": 0,
- "message": "string",
- "data": null
}
This endpoint allows a client to place a new GTT order.
Authentication Required:
The request must include a valid Bearer token in the Authorization
header.
Example Request:
POST /NewGttOrder HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
Example Request Body:
{
"client": "AB1234",
"exchange": "NseCm",
"code": 123456,
...
}
Responses:
200 OK
– GTT order placed successfully.400 Bad Request
– Invalid request parameters.401 Unauthorized
– Missing or invalid authentication token.500 Internal Server Error
– Unexpected failure while processing order.version required | string |
The GTT order request payload.
client required | string non-empty Client identifier placing the GTT order. |
exchange required | string non-empty Exchange where the order will be placed. |
code required | string non-empty Token representing the security being traded. |
side required | string non-empty Side of the trade. |
product required | string non-empty Product type for the order. |
qty required | integer <int32> [ 1 .. 2147483647 ] Quantity of the order. |
main_trigger_price | number <double> Main trigger price for activating the GTT order. |
main_order_price | string or null Main order price for execution after the trigger. |
main_state required | string non-empty State of the main trigger condition. |
price_condition required | string non-empty Condition for triggering the price. |
stop_state required | string non-empty State of the stop-loss trigger. |
stop_trigger_price | number <double> Stop-loss trigger price (if applicable). |
stop_order_price | string or null Stop-loss order price for execution after the trigger. |
trail_gap required | number <double> Trail gap for a trailing stop order. |
target_state required | string non-empty State of the target price trigger. |
target_trigger_price | number <double> Target price at which the order should execute. |
target_order_price | string or null Target order price for execution after the trigger. |
sender_order_no required | integer <int32> Unique number assigned by the API consumer for tracking purposes. Not required but recommended for order tracking. |
{- "client": "string",
- "exchange": "string",
- "code": "string",
- "side": "string",
- "product": "string",
- "qty": 1,
- "main_trigger_price": 0,
- "main_order_price": "string",
- "main_state": "string",
- "price_condition": "string",
- "stop_state": "string",
- "stop_trigger_price": 0,
- "stop_order_price": "string",
- "trail_gap": 0,
- "target_state": "string",
- "target_trigger_price": 0,
- "target_order_price": "string",
- "sender_order_no": 0
}
{- "status": 0,
- "message": "string",
- "data": {
- "client": "string",
- "modified_by": "string",
- "created_by": "string",
- "exchange": "string",
- "code": "string",
- "symbol": "string",
- "series": "string",
- "strike": "string",
- "option_type": "string",
- "side": "string",
- "product": "string",
- "qty": 0,
- "main_trigger_price": 0,
- "main_order_price": "string",
- "main_state": "string",
- "price_condition": "string",
- "stop_state": "string",
- "stop_trigger_price": 0,
- "stop_order_price": "string",
- "trail_gap": 0,
- "target_state": "string",
- "target_trigger_price": 0,
- "target_order_price": "string",
- "trail_distance": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "last_modified": "2019-08-24T14:15:22Z",
- "gtt_order_no": 0,
- "module": "string",
- "filled_qty": 0,
- "filled_value": 0,
- "exit_qty": 0,
- "exit_value": 0,
- "reason": "string",
- "flags": 0,
- "api_source": "string",
- "sender_order_no": 0
}
}
This endpoint allows a client to modify an existing GTT order by changing parameters such as trigger price, order price, or quantity.
Authentication Required:
The request must include a valid Bearer token in the Authorization
header.
Example Request:
POST /ModifyGttOrder HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
Example Request Body:
{
"gtt_order_id": 987654321,
"client": "A125",
"side": "Buy",
...
}
Responses:
200 OK
– GTT order modified successfully.400 Bad Request
– Invalid request parameters.401 Unauthorized
– Missing or invalid authentication token.500 Internal Server Error
– Unexpected failure while modifying the order.version required | string |
The GTT order modification request payload.
client required | string non-empty Client identifier associated with the GTT order. |
gtt_order_no required | integer <int32> Unique identifier of the GTT order to be modified. |
exchange required | string non-empty Exchange where the order is placed.
Allowed values: |
code required | string non-empty Unique identifier of the security being traded. |
side required | string non-empty Side of the trade.
Allowed values: |
product required | string non-empty Product type for the order.
Example: |
qty required | integer <int32> [ 1 .. 2147483647 ] Quantity of the order. Must be greater than zero. |
price_condition required | string non-empty Condition for triggering the price.
Allowed values: |
main_trigger_price required | number <double> Main trigger price for activating the GTT order. |
main_order_price | string or null Main order price for execution after the trigger.
May be a numeric value or one of the predefined values: |
main_state required | string non-empty State of the main trigger.
Allowed values: |
stop_state | string or null State of the stop-loss trigger.
Allowed values: |
stop_trigger_price | number <double> Stop-loss trigger price. |
stop_order_price | string or null Stop-loss order price after the trigger.
May be a numeric value or predefined values: |
trail_gap | number <double> Trail gap for a trailing stop-loss order. Defines the dynamic adjustment range for the stop-loss trigger. |
target_state | string or null State of the target trigger.
Allowed values: |
target_trigger_price | number <double> Target price at which the order should be executed. |
target_order_price | string or null Target order price after the trigger.
May be a numeric value or predefined values: |
sender_order_no | integer <int32> Unique number assigned by the API consumer for tracking purposes. Not required but recommended for order tracking. |
{- "client": "string",
- "gtt_order_no": 0,
- "exchange": "string",
- "code": "string",
- "side": "string",
- "product": "string",
- "qty": 1,
- "price_condition": "string",
- "main_trigger_price": 0,
- "main_order_price": "string",
- "main_state": "string",
- "stop_state": "string",
- "stop_trigger_price": 0,
- "stop_order_price": "string",
- "trail_gap": 0,
- "target_state": "string",
- "target_trigger_price": 0,
- "target_order_price": "string",
- "sender_order_no": 0
}
{- "status": 0,
- "message": "string",
- "data": {
- "client": "string",
- "modified_by": "string",
- "created_by": "string",
- "exchange": "string",
- "code": "string",
- "symbol": "string",
- "series": "string",
- "strike": "string",
- "option_type": "string",
- "side": "string",
- "product": "string",
- "qty": 0,
- "main_trigger_price": 0,
- "main_order_price": "string",
- "main_state": "string",
- "price_condition": "string",
- "stop_state": "string",
- "stop_trigger_price": 0,
- "stop_order_price": "string",
- "trail_gap": 0,
- "target_state": "string",
- "target_trigger_price": 0,
- "target_order_price": "string",
- "trail_distance": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "last_modified": "2019-08-24T14:15:22Z",
- "gtt_order_no": 0,
- "module": "string",
- "filled_qty": 0,
- "filled_value": 0,
- "exit_qty": 0,
- "exit_value": 0,
- "reason": "string",
- "flags": 0,
- "api_source": "string",
- "sender_order_no": 0
}
}
This endpoint allows a client to cancel a GTT order that has not yet been triggered.
Authentication Required:
Authorization
header.Example Request:
POST /CancelGttOrder?ClientID=AB1234&GttOrderNo=987654321 HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
Notes:
Responses:
200 OK
– GTT order canceled successfully. 400 Bad Request
– Invalid request parameters. 401 Unauthorized
– Missing or invalid authentication token. 404 Not Found
– The specified GTT order does not exist or is not cancelable. 500 Internal Server Error
– Unexpected failure while canceling the order.version required | string |
ClientID | string The client identifier for whom the GTT order is being canceled. |
GttOrderNo | integer <int32> The unique identifier of the GTT order to be canceled. |
{- "status": 0,
- "message": "string",
- "data": {
- "client": "string",
- "modified_by": "string",
- "created_by": "string",
- "exchange": "string",
- "code": "string",
- "symbol": "string",
- "series": "string",
- "strike": "string",
- "option_type": "string",
- "side": "string",
- "product": "string",
- "qty": 0,
- "main_trigger_price": 0,
- "main_order_price": "string",
- "main_state": "string",
- "price_condition": "string",
- "stop_state": "string",
- "stop_trigger_price": 0,
- "stop_order_price": "string",
- "trail_gap": 0,
- "target_state": "string",
- "target_trigger_price": 0,
- "target_order_price": "string",
- "trail_distance": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "last_modified": "2019-08-24T14:15:22Z",
- "gtt_order_no": 0,
- "module": "string",
- "filled_qty": 0,
- "filled_value": 0,
- "exit_qty": 0,
- "exit_value": 0,
- "reason": "string",
- "flags": 0,
- "api_source": "string",
- "sender_order_no": 0
}
}
This endpoint allows a client to submit multiple orders as a basket in a single request.
The basket ensures that all orders belong to the same client before processing.
Atomic Execution:
Authentication Required:
The request must include a valid Bearer token in the Authorization
header.
Example Request:
POST /ExecuteBasket HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
Example Request Body:
{
"client": "AB1234",
"orders": [
{
"exchange": "NseCm",
"code": "123456",
"side": "Buy",
...
},
{
"exchange": "Bse",
"code": "789012",
"side": "Sell",
...
}
]
}
Validation Rules:
client
must be valid and authorized.orders
list cannot be empty or null
orders
list cannot have more than 20 orders. client
.Example Response:
{
"status": 200,
"message": "Basket sent for execution",
"data": null
}
Responses:
200 OK
– Basket sent for execution.400 Bad Request
– Invalid request parameters (e.g., missing or empty orders).401 Unauthorized
– Missing or invalid authentication token.500 Internal Server Error
– Unexpected failure while submitting the basket.Notes:
400 Bad Request
is returned with a failure reason.version required | string |
The basket order request containing multiple orders.
client required | string non-empty The client identifier placing the basket order. |
required | Array of objects (NewOrderRequest) List of individual orders included in the basket. |
{- "client": "string",
- "orders": [
- {
- "exchange": "string",
- "code": "string",
- "side": "string",
- "quantity": 1,
- "price": 0,
- "client": "string",
- "book": "string",
- "trigger_price": 0,
- "disclosed_qty": 0,
- "product": "string",
- "validity": "string",
- "gtd": "string",
- "order_flag": 0,
- "sender_order_no": 0,
- "algol_id": 0
}
]
}
{- "status": 0,
- "message": "string",
- "data": null
}
This endpoint allows the client to fetch their current and past orders based on filters.
Authentication Required:
The request must include a valid Bearer token in the Authorization
header.
**Example Request **
POST /OrderBook?ClientID=AB1234&Filter=Pending HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
Query Parameters:
ClientID
→ The client identifier whose orders need to be retrieved. Filter
→ Filter criteria for the order book. Allowed values: "All"
→ Retrieve all orders. "Pending"
→ Orders that are yet to be executed. "Unconfirmed"
→ Orders awaiting exchange confirmation. "Cancelled"
→ Orders that were canceled. "Rejected"
→ Orders that were rejected. "Failed"
→ Orders that failed due to validation or RMS checks. "Executed"
→ Successfully executed orders.Example Successful Response (200 OK
):
{
"status": 200,
"message": "Order book retrieved successfully",
"data": [
{
"exchange": "NseCm",
"symbol": "RELIANCE",
"side": "Buy",
...
}
]
}
Example Error Response (400 Bad Request
- Invalid Query Parameter):
{
"status": 400,
"message": "Invalid filter value. Allowed values: All, Pending, Unconfirmed, Cancelled, Rejected, Failed, Executed.",
"data": null
}
Responses:
200 OK
– Order book retrieved successfully.400 Bad Request
– Invalid parameters.401 Unauthorized
– Missing or invalid authentication token.404 Not Found
– No orders found for the given client.500 Internal Server Error
– Unexpected failure while fetching data.version required | string |
ClientID | string The client identifier for which the order book is being retrieved. |
Filter | string The filter criteria for retrieving orders. Allowed values: |
{- "status": 0,
- "message": "string",
- "data": [
- {
- "exchange": "string",
- "code": "string",
- "symbol": "string",
- "series": "string",
- "instrument": "string",
- "strike_price": 0,
- "option_type": "string",
- "client": "string",
- "user": "string",
- "settlor": "string",
- "api_source": "string",
- "executing_id": "string",
- "generated_by": "string",
- "status": "string",
- "side": "string",
- "book": "string",
- "product": "string",
- "validity": "string",
- "price": 0,
- "trigger": 0,
- "average_fill_price": 0,
- "qty_remaining": 0,
- "qty_traded": 0,
- "disc_qty": 0,
- "flags": "string",
- "reason": "string",
- "gtd": "string",
- "client_entry_time": "2019-08-24T14:15:22Z",
- "entry_at": "2019-08-24T14:15:22Z",
- "last_modified": "2019-08-24T14:15:22Z",
- "exchange_order_no": "string",
- "user_order_no": 0,
- "sender_order_no": 0,
- "auction_number": 0,
- "order_category": "string",
- "algol_id": 0
}
]
}
This endpoint allows a client to fetch the latest status of an order placed on the exchange.
Authentication Required:
The request must include a valid Bearer token in the Authorization
header.
If exchange_order_no = 0 or null or empty
, then sender_order_no
will be used.
Example Request:
POST /OrderStatus HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
Example Request Body:
{
"client": "AB1234",
"exchange": "NseCm",
"exchange_order_no": "987654321",
...
}
Responses:
200 OK
– Order status retrieved successfully.400 Bad Request
– Invalid request details.401 Unauthorized
– Missing or invalid authentication token.404 Not Found
– No order status found.500 Internal Server Error
– Unexpected failure while fetching order status.version required | string |
The order request payload containing client and order details.
client required | string non-empty Client identifier for whom the order history is requested. |
exchange required | string non-empty Exchange where the order was placed. |
code required | string non-empty Unique identifier of the security being traded. |
exchange_order_no | string or null Unique order number assigned by the exchange. |
sender_order_no | integer <int32> Unique number assigned by the API consumer to track the order. |
{- "client": "string",
- "exchange": "string",
- "code": "string",
- "exchange_order_no": "string",
- "sender_order_no": 0
}
{- "status": 0,
- "message": "string",
- "data": [
- {
- "exchange": "string",
- "code": "string",
- "symbol": "string",
- "series": "string",
- "instrument": "string",
- "strike_price": 0,
- "option_type": "string",
- "client": "string",
- "user": "string",
- "settlor": "string",
- "api_source": "string",
- "executing_id": "string",
- "generated_by": "string",
- "status": "string",
- "side": "string",
- "book": "string",
- "product": "string",
- "validity": "string",
- "price": 0,
- "trigger": 0,
- "average_fill_price": 0,
- "qty_remaining": 0,
- "qty_traded": 0,
- "disc_qty": 0,
- "flags": "string",
- "reason": "string",
- "gtd": "string",
- "client_entry_time": "2019-08-24T14:15:22Z",
- "entry_at": "2019-08-24T14:15:22Z",
- "last_modified": "2019-08-24T14:15:22Z",
- "exchange_order_no": "string",
- "user_order_no": 0,
- "sender_order_no": 0,
- "auction_number": 0,
- "order_category": "string",
- "algol_id": 0
}
]
}
Fetches all GTT (Good Till Triggered) orders for a given client.
Authentication Required:
The request must include a valid Bearer token in the Authorization
header.
Example Request:
POST /GttOrdersBook?ClientID=AB1234 HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
Example Successful Response (200 OK
):
{
"status": 200,
"message": "GTT orders book retrieved successfully",
"data": [
{
"gtt_order_no": 987654,
"exchange": "NseCm",
"code": "RELIANCE",
...
}
]
}
Example Error Response (400 Bad Request
- Missing Client ID):
{
"status": 400,
"message": "Missing required parameter: ClientID.",
"data": null
}
Responses:
200 OK
– GTT orders book retrieved successfully.400 Bad Request
– Invalid or missing query parameters.401 Unauthorized
– Client not authorized.404 Not Found
– No GTT orders found.500 Internal Server Error
– Unexpected failure.version required | string |
ClientID | string The client identifier whose GTT orders need to be retrieved. |
{- "status": 0,
- "message": "string",
- "data": [
- {
- "client": "string",
- "modified_by": "string",
- "created_by": "string",
- "exchange": "string",
- "code": "string",
- "symbol": "string",
- "series": "string",
- "strike": "string",
- "option_type": "string",
- "side": "string",
- "product": "string",
- "qty": 0,
- "main_trigger_price": 0,
- "main_order_price": "string",
- "main_state": "string",
- "price_condition": "string",
- "stop_state": "string",
- "stop_trigger_price": 0,
- "stop_order_price": "string",
- "trail_gap": 0,
- "target_state": "string",
- "target_trigger_price": 0,
- "target_order_price": "string",
- "trail_distance": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "last_modified": "2019-08-24T14:15:22Z",
- "gtt_order_no": 0,
- "module": "string",
- "filled_qty": 0,
- "filled_value": 0,
- "exit_qty": 0,
- "exit_value": 0,
- "reason": "string",
- "flags": 0,
- "api_source": "string",
- "sender_order_no": 0
}
]
}
Fetches all executed trades for a given client.
Authentication Required:
The request must include a valid Bearer token in the Authorization
header.
Example Request:
POST /TradeBook?ClientID=AB1234 HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
Example Successful Response (200 OK
):
{
"status": 200,
"message": "Trade book retrieved successfully",
"data": [
{
"exchange": "NseCm",
"code": "RELIANCE",
"symbol": "RELIANCE",
...,
}
]
}
Example Error Response (400 Bad Request
- Missing Client ID):
{
"status": 400,
"message": "Missing required parameter: ClientID.",
"data": null
}
Responses:
200 OK
– Trade book retrieved successfully.400 Bad Request
– Invalid or missing query parameters.401 Unauthorized
– Client not authorized.404 Not Found
– No trades found.500 Internal Server Error
– Unexpected failure.version required | string |
ClientID | string The client identifier whose trade book needs to be retrieved. |
{- "status": 0,
- "message": "string",
- "data": [
- {
- "exchange": "string",
- "code": "string",
- "symbol": "string",
- "series": "string",
- "strike_price": 0,
- "option_type": "string",
- "instrument": "string",
- "client": "string",
- "user": "string",
- "generated_by": "string",
- "api_source": "string",
- "side": "string",
- "traded_qty": 0,
- "traded_price": 0,
- "traded_value": 0,
- "qty_remaining": 0,
- "qty_cumulative": 0,
- "trade_time": "2019-08-24T14:15:22Z",
- "product": "string",
- "order_category": "string",
- "order_book": "string",
- "order_validity": "string",
- "order_price": 0,
- "order_qty": 0,
- "order_trigger": 0,
- "average_fill_price": 0,
- "order_status": "string",
- "order_disc_qty": 0,
- "order_entry_at": "2019-08-24T14:15:22Z",
- "order_last_modified": "2019-08-24T14:15:22Z",
- "trade_no": "string",
- "exchange_order_no": "string",
- "sender_order_no": 0,
- "user_order_no": 0,
- "algol_id": 0
}
]
}
Fetches the complete history of orders placed by a given client.
Authentication Required: Bearer token
If exchange_order_no = 0 or null or empty
, then sender_order_no
will be used.
Example Request:
POST /OrderHistory HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
Example Request Body:
{
"client": "AB1234",
"exchange": "NseCm",
"code": "500325",
...
}
Example Response (200 - Success):
{
"status": 200,
"message": "Order history retrieved successfully",
"data": [
{
"exchange": "NseCm",
"symbol": "RELIANCE",
"side": "Buy",
...
}
]
}
Error Responses:
400 Bad Request
– Invalid parameters.401 Unauthorized
– Client not authorized.404 Not Found
– No order history found.500 Internal Server Error
– Unexpected failure.Example Error Response (400 - Bad Request):
{
"status": 400,
"message": "Invalid request parameters.",
"data": null
}
Example Error Response (404 - No Records Found):
{
"status": 404,
"message": "No order history found.",
"data": null
}
version required | string |
The request containing client and order details.
client required | string non-empty Client identifier for whom the order history is requested. |
exchange required | string non-empty Exchange where the order was placed. |
code required | string non-empty Unique identifier of the security being traded. |
exchange_order_no | string or null Unique order number assigned by the exchange. |
sender_order_no | integer <int32> Unique number assigned by the API consumer to track the order. |
{- "client": "string",
- "exchange": "string",
- "code": "string",
- "exchange_order_no": "string",
- "sender_order_no": 0
}
{- "status": 0,
- "message": "string",
- "data": [
- {
- "exchange": "string",
- "code": "string",
- "symbol": "string",
- "series": "string",
- "instrument": "string",
- "strike_price": 0,
- "option_type": "string",
- "client": "string",
- "user": "string",
- "settlor": "string",
- "api_source": "string",
- "executing_id": "string",
- "generated_by": "string",
- "status": "string",
- "side": "string",
- "book": "string",
- "product": "string",
- "validity": "string",
- "price": 0,
- "trigger": 0,
- "average_fill_price": 0,
- "qty_remaining": 0,
- "qty_traded": 0,
- "disc_qty": 0,
- "flags": "string",
- "reason": "string",
- "gtd": "string",
- "client_entry_time": "2019-08-24T14:15:22Z",
- "entry_at": "2019-08-24T14:15:22Z",
- "last_modified": "2019-08-24T14:15:22Z",
- "exchange_order_no": "string",
- "user_order_no": 0,
- "sender_order_no": 0,
- "auction_number": 0,
- "order_category": "string",
- "algol_id": 0
}
]
}
Fetches all holdings for a given client.
Authentication Required: Bearer token
Example Request:
POST /Holdings?ClientID=AB1234 HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
Query Parameters:
ClientID
→ The client identifier whose holdings need to be retrieved.Example Response (200 - Success):
{
"status": 200,
"message": "Holdings retrieved successfully",
"data": [
{
"client": "AB1234",
"isin": "INE002A01018",
"nse_name": "RELIANCE",
...
}
]
}
Error Responses:
400 Bad Request
– Invalid parameters.401 Unauthorized
– Client not authorized.404 Not Found
– No holdings found.500 Internal Server Error
– Unexpected failure.Example Error Response (400 - Bad Request):
{
"status": 400,
"message": "Invalid request parameters.",
"data": null
}
Example Error Response (404 - No Holdings Found):
{
"status": 404,
"message": "No holdings found.",
"data": null
}
version required | string |
ClientID | string The client identifier for retrieving holdings. |
{- "status": 0,
- "message": "string",
- "data": [
- {
- "client": "string",
- "isin": "string",
- "nse_name": "string",
- "bse_name": "string",
- "bse_code": "string",
- "nse_code": "string",
- "nse_ltp": 0,
- "bse_ltp": 0,
- "position": 0,
- "free_qty": 0,
- "collateral_qty": 0,
- "pledged_qty": 0,
- "btst_qty": 0,
- "blocked_qty": 0,
- "non_poa_qty": 0,
- "value": 0,
- "collateral_value": 0,
- "buy_price": 0,
- "close_price": 0
}
]
}
Fetches net positions for a given client, with an optional filter to specify the type of positions to retrieve.
Authentication Required: Bearer token
Example Request:
POST /NetPositions?ClientID=AB1234&Filter=All HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
Query Parameters:
ClientID
→ The client identifier whose net positions need to be retrieved.Filter
→ Filter to specify the type of positions to retrieve. "All"
, "Opening"
, "Todays"
.Example Response (200 - Success):
{
"status": 200,
"message": "Net positions retrieved successfully",
"data": [
{
"client": "AB1234",
"exchange": "NseCm",
"code": "500325",
...
}
]
}
Error Responses:
400 Bad Request
– Invalid parameters.401 Unauthorized
– Client not authorized.404 Not Found
– No net positions found.500 Internal Server Error
– Unexpected failure.Example Error Response (400 - Bad Request):
{
"status": 400,
"message": "Invalid filter. Allowed values: All, Opening, Todays.",
"data": null
}
Example Error Response (404 - No Net Positions Found):
{
"status": 404,
"message": "No net positions found.",
"data": null
}
version required | string |
ClientID | string The client identifier for retrieving net positions. |
Filter | string Default: "All" Filter for net positions. Allowed values: |
{- "status": 0,
- "message": "string",
- "data": [
- {
- "client": "string",
- "exchange": "string",
- "code": "string",
- "instrument": "string",
- "symbol": "string",
- "series": "string",
- "strike_price": 0,
- "option_type": "string",
- "product": "string",
- "lot_size": 0,
- "multiplier": 0,
- "buy_avg": 0,
- "buy_qty": 0,
- "buy_value": 0,
- "sell_avg": 0,
- "sell_qty": 0,
- "sell_value": 0,
- "net_price": 0,
- "net_qty": 0,
- "net_value": 0,
- "mtm": 0,
- "unrealized_mtm": 0,
- "realized_mtm": 0,
- "market_price": 0,
- "close_price": 0,
- "breakeven_point": 0,
- "intrinsic_value": 0,
- "extrinsic_value": 0
}
]
}
Updates the product type associated with a client's net position.
Authentication Required: Bearer token
Example Request:
POST /ModifyProduct HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
Example Request Body:
{
"client": "AB1234",
"exchange": "NseCm",
"code": 123456,
...
}
Responses:
200 OK
– Product modified successfully.400 Bad Request
– Invalid request parameters.401 Unauthorized
– Client not authorized.500 Internal Server Error
– Unexpected failure.version required | string |
The request containing modification details.
client required | string non-empty Client identifier for whom the product modification is requested. |
exchange required | string non-empty Exchange where the position exists. |
code required | string non-empty Unique identifier of the security being traded. |
old_product required | string non-empty Existing product type of the position. |
new_product required | string non-empty New product type to which the position is being modified. |
side required | string non-empty Trade side indicating whether the position was originally a Buy or Sell. |
qty required | integer <int32> [ 1 .. 2147483647 ] Quantity of the position to be modified. |
{- "client": "string",
- "exchange": "string",
- "code": "string",
- "old_product": "string",
- "new_product": "string",
- "side": "string",
- "qty": 1
}
{- "status": 0,
- "message": "string",
- "data": {
- "status": "string",
- "user_order_no": 0,
- "message": "string"
}
}
This endpoint provides details about the client’s available balance,
margin usage, pay-in/pay-out status, and other financial information.
Authentication Required:
The request must include a valid Bearer token in the Authorization
header.
Example Request:
POST /FundsReport?ClientID=AB1234 HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
Query Parameters:
ClientID
→ The unique identifier of the client whose funds report is requested.Example Response (200 - Success):
{
"status": 200,
"message": "Funds report retrieved successfully.",
"data": [
{
"client_id": "AB1234",
"limit_id": "Equity",
"cash": 250000.50,
...
}
]
}
Error Responses:
400 Bad Request
– Invalid parameters.401 Unauthorized
– Client not authorized.500 Internal Server Error
– Unexpected failure.Example Error Response (400 - Bad Request):
{
"status": 400,
"message": "Missing or invalid ClientID.",
"data": null
}
Example Error Response (404 - No Funds Report Found):
{
"status": 404,
"message": "No funds report found.",
"data": null
}
version required | string |
ClientID | string The unique client identifier for retrieving the funds report. |
{- "status": 0,
- "message": "string",
- "data": [
- {
- "client_id": "string",
- "limit_id": "string",
- "cash": "string",
- "adhoc": "string",
- "payin": "string",
- "collateral": "string",
- "cnc_sell_benefit": "string",
- "payout": "string",
- "costs": "string",
- "margin_used": "string",
- "margin_available": "string",
- "cash_available": "string"
}
]
}
This endpoint provides real-time connectivity and session status of different exchanges.
Authentication Required: Bearer token
Example Request:
POST /ExchangeStatus?ClientID=AB1234 HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
Query Parameters:
ClientID
→ The client identifier for whom the exchange status is requested.Example Response:
{
"status": 200,
"message": "Exchange status retrieved successfully",
"data": [
{
"exchange": "NseCm",
"isConnected": true,
"session": "Open"
},
{
"exchange": "MCX",
"isConnected": false,
"session": "Closed"
}
]
}
Responses:
200 OK
– Exchange status retrieved successfully.400 Bad Request
– Invalid request parameters.401 Unauthorized
– Client not authorized.404 Not Found
– No exchange status found.500 Internal Server Error
– Unexpected failure.Notes:
exchange
field represents the API identifier for exchanges.isConnected = true
means the exchange is live for trading.session
can be "Open"
, "Closed"
, or "Pre-Open"
.version required | string |
ClientID | string The unique client identifier requesting the exchange status. |
{- "status": 0,
- "message": "string",
- "data": [
- {
- "exchange": "string",
- "isConnected": true,
- "session": "string"
}
]
}
Receives real-time order packet.
Example Response Body:
{
"eventType": "order",
"data": {
"exchange": "NseCm",
"code": "3045",
"symbol": "SBIN",
"series": "EQ",
"instrument": "EQUITIES",
"strike_price": 0,
"option_type": "",
"client": "D5044",
"user": "D5044",
"settlor": "HDFC00000637",
"api_source": "",
"executing_id": "D5044",
"generated_by": "IBT",
"status": "Pending",
"side": "Sell",
"book": "RL",
"product": "Normal",
"validity": "Day",
"price": 0,
"trigger": 0,
"average_fill_price": 0,
"qty_remaining": 2,
"qty_traded": 0,
"disc_qty": 0,
"flags": "Day, Market",
"reason": "",
"gtd": "",
"client_entry_time": "2025-03-12T12:45:18",
"entry_at": "2025-03-12T12:45:22",
"last_modified": "2025-03-12T12:45:22",
"exchange_order_no": "1300000000050895",
"user_order_no": 12,
"sender_order_no": 0,
"auction_number": 0,
"order_category": "Normal",
"algol_id": 0
}
}
Receives real-time trade packet.
Example Response Body:
{
"eventType": "trade",
"data": {
"exchange": "NseCm",
"code": "3045",
"symbol": "SBIN",
"series": "EQ",
"strike_price": 0,
"option_type": "",
"instrument": "EQUITIES",
"client": "D5044",
"user": "D5044",
"generated_by": "IBT",
"api_source": "",
"side": "Sell",
"traded_qty": 2,
"traded_price": 727.15,
"traded_value": 1454.3,
"qty_remaining": 0,
"qty_cumulative": 2,
"trade_time": "4691-10-06T21:22:00",
"product": "Normal",
"order_category": "Normal",
"order_book": "RL",
"order_validity": "Day",
"order_price": 727.15,
"order_qty": 2,
"order_trigger": 0,
"average_fill_price": 727.15,
"order_status": "Executed",
"order_disc_qty": 0,
"order_entry_at": "2025-03-12T12:45:22",
"order_last_modified": "2025-03-12T12:45:22",
"trade_no": "600027868",
"exchange_order_no": "1300000000050895",
"sender_order_no": 0,
"user_order_no": 12,
"algol_id": 0
}
}