Overview
Introduction
XTS API is a high-performance trading API designed to deliver seamless integration
with advanced trading platforms. It enables developers, brokers, and third-party vendors to build
reliable, low-latency trading and investment solutions with ease.
The API offers REST-like endpoints for executing and modifying orders in real time, managing
portfolios, accessing live market data, and implementing complex trading strategies. All communication
is secured and handled via JSON-formatted requests and responses, with standard HTTP codes used to
indicate success or failure states.
Users receive a unique API key and secret during application registration, along with the option to
register a redirect URL for secure authentication flows. The API is optimized for high throughput,
scalable performance, and supports large concurrent user bases, ensuring stability even in volatile
market conditions.
Disclaimer: The API access and data are strictly for registered
clients and vendors. Users should safeguard their trading credentials and never embed sensitive secrets
directly in client applications.
Note :
API key has to be created by client itself not anyone else. Please do not share trading id /
Password with anyone.
API Environment URLs
Libraries and SDKs
Below is a list of pre-built client libraries and SDKs for Symphony API written in various programming languages that can be used to interact with the APIs without having to make raw HTTP calls
Symphony Python Library
Symphony Java Library
Obtain Your API Credentials
to Get Access to XTS Trimmed Interactive API Services
To access Trimmed Interactive API services, you need a public key. Follow these steps:
-
Register on the Broker’s API Dashboard
- - Visit your broker’s API dashboard page.
- - Register yourself as an API user.
-
Verify Your Email
- - After registration, you’ll receive a verification link via email.
- - Click the link to validate your email ID.
- - You will be redirected to the login page.
-
Subscribe to the API Service
- - Log in to the API dashboard: This is sample url https://developers.symphonyfintech.in/dashboard
- - Select Trimmed Interactive API subscription and provide the required details.
- - Wait for an approval email from the broker’s support team.
-
Receive Your API Keys
- - Once approved, you’ll get an email containing your appKey and secretKey.
- - Keep these keys safe for future use.
-
Important Notes
- - Only One session is allowed per appKey–secretKey combination.
- - Do not share your keys with others.
- - If you suspect your keys are compromised, log in to the API dashboard and regenerate new keys then update them in your source code or configuration.
How To Access XTS Trimmed Interactive API Services
RegisterAuthentication Token Requirement
For all API requests the login API, an authentication token must be included in the request header.
-
The token is generated only after a successful user login .
-
It remains valid for 24 hours from the time of generation. .
-
After the validity period, the token will expire and must be refreshed by logging in again.
Headers: Content-Type: application/json authorization: eyJ1c2VySUQiOiJSVVBFU0giLCJpYXQiOjE1NTIxMjIwOTEsImV4cCI6MTU1MjIwODQ5MX0
Request & Response Structure
All GET and DELETE request parameters go as query parameters, and POST and PUT parameters as
form-encoded. The user has to input an authorization in the header for every request. All request
parameters as application/json parameters.
Responses from the API will be in JSON
Successful request:
HTTP/1.1 200 OK Content-Type: application/json
{
"type": "success",
"code": "status code",
"description": "description message",
"result":
}
All responses from the API server are JSON with the content-type application/json unless explicitly stated otherwise. A successful 200 OK response always has a JSON response body with a status key with the value success. The result key contains the full response payload.
Failed request:
HTTP/1.1 400 Server error Content-Type: application/json
{
"type": "error",
"code": "error code",
"description": "error message",
}
Error Handling
Common HTTP error codes
| Code | Error Description |
|---|---|
| 400 | Missing or bad request parameters or values |
| 404 | Request resource was not found |
| 429 | Too many requests to the API (rate limiting) |
| 500 | Something unexpected went wrong |
Rate Limit
Here is the rate limit for Interactive API calls
Why Throttling is Important
Throttling ensures that API requests are distributed evenly over time to:
-
Prevent server overload and downtime during peak hours
-
Maintain fair access to resources for all clients
-
Protect the stability and performance of the trading system during volatile market conditions
-
Avoid accidental denial-of-service caused by excessive automated requests
Rate Limits Table
| API Name | Endpoint | Method | Limit (API Request/Sec) |
|---|---|---|---|
| Unified Order API Throttle Limit | Unified Order API Throttle Limit |
Note
|
10 |
| Balance | /user/balance | GET | 1 |
| Profile | /user/profile | GET | 1 |
| Brokerage Calculator | /user/calculatebrokerage | POST | 10 |
| Cancel All | /orders/cancelall | POST | 1 |
| Orderbook / Order History | /orders | GET | 1 |
| Tradebook | /orders/trades | GET | 1 |
| Spread Orderbook | /orders/spread | GET | 1 |
| Place GTT Order | /orders/gttorder | POST | 1 |
| Modify GTT Order | /orders/gttorder | PUT | 1 |
| Cancel GTT Order | /orders/gttorder | DELETE | 1 |
| GTT Orderbook | /orders/gttorderbook | GET | 1 |
| Holding | /portfolio/holdings | GET | 1 |
| Position | /portfolio/positions | GET | 1 |
| Position Convert | /portfolio/positions/convert | PUT | 10 |
| Regular Order Margin | /orders/margindetails | POST | 10 |
| Regular Order Modify Margin | /orders/modifyordermargindetails | POST | 10 |
| Cover Order Margin | /orders/comargindetails | POST | 10 |
| Cover Order Modify Margin | /orders/comodifymargindetails | POST | 10 |
| Bracket Order Margin | /orders/bomargindetails | POST | 10 |
| Exchange Status | /status/exchange | GET | 1 |
| Exchange Message | /messages/exchange | GET | 1 |
Note : Unified Order Throttle Limit:
This is a combined rate limit applied across all order-related APIs listed below.
The standard limit is 10 requests per second, shared cumulatively among these APIs
(Place Order,Modify Order,Cancel Order,Place BO (Bracket Order),Modify BO,Cancel BO,Place CO (Cover Order),Exit Cover,Place Spread Order,Modify Spread Order,Cancel Spread Order).
Enums with Numeric Constants
Each Enum now includes its corresponding numeric constant for easier mapping in client applications.
1. ExchangeSegments
| Enum Name | Numeric Code | Description |
|---|---|---|
| NSECM | 1 |
The equity cash segment of NSE where stocks of listed companies are traded for delivery or intraday. |
| NSEFO | 2 |
Derivatives segment of NSE where equity futures, index futures, and options contracts are traded. |
| NSECD | 3 |
Currency trading segment at NSE for exchange-traded currency futures and options (USD/INR, EUR/INR, etc.) |
| BSECM | 11 |
Cash/equity segment of BSE, the oldest stock exchange in Asia, where stocks are bought and sold. |
| BSEFO | 12 |
Derivatives segment of BSE offering equity derivatives, index derivatives, and stock futures/options. |
| BSECD | 13 |
Currency derivatives platform of BSE that allows trading in exchange-listed currency futures and options. |
| MCXFO | 51 |
Derivatives trading segment of MCX for commodities such as gold, silver, crude oil, natural gas, and agricultural products. |
| NCDEX | 21 |
A leading exchange focused on agricultural commodity futures like soybean, chana, guar, and other agri-products. |
2. ProductType
| Enum Name | Numeric Code | Description |
|---|---|---|
| MIS | 1 |
Intraday trading product type where positions must be squared off before market close. Provides higher leverage compared to delivery. |
| NRML | 2 |
Standard product type used for carrying forward positions overnight in derivatives or cash without compulsory intraday square-off. |
| CNC | 4 |
Delivery-based product type for equity trades. Shares are delivered to the Demat account, with no leverage. |
| CO | 8 |
Intraday order type where a market or limit order is placed along with a mandatory stop-loss order. Provides higher leverage while controlling risk. |
| BO | 16 |
Advanced order type where a main order is placed with both a target (profit booking) and stop-loss. Once one is executed, the other is automatically cancelled. Can also include a trailing stop-loss. |
| MTF | 32 |
Allows investors to buy stocks by partly paying upfront and borrowing the balance from the broker. Shares can be carried forward as long as margin requirements are met. |
3. OrderType
| Enum Name | Numeric Code | Description |
|---|---|---|
| Market | 1 |
An order to buy or sell immediately at the best available price in the market. |
| Limit | 2 |
An order to buy or sell at a specified price (or better). |
| StopMarket | 4 |
An order that becomes a market order once a specified trigger price is reached. Used mainly to limit losses |
| StopLimit | 8 |
An order that becomes a limit order once the trigger price is reached. It executes only at the specified limit price or better. |
| OCO | 32 |
A conditional order where two linked orders are placed — if one gets executed, the other is automatically cancelled. |
| MTF | 32 |
Allows investors to buy stocks by partly paying upfront and borrowing the balance from the broker. Shares can be carried forward as long as margin requirements are met. |
4. OrderSide
| Enum Name | Numeric Code | Description |
|---|---|---|
| BUY | 49 |
Indicates a purchase transaction. Used when entering a long position (expecting the price to rise). |
| SELL | 50 |
Indicates a sale transaction. Used when exiting a long position or initiating a short position (expecting the price to fall). |
5. TimeInForce
| Enum Name | Numeric Code | Description |
|---|---|---|
| DAY | 1 |
Order remains valid only for the trading day. If not executed by market close, it is cancelled automatically. |
| GTC | 2 |
(Good Till Cancelled) Order remains active until it is explicitly cancelled by the trader. May carry over across multiple trading sessions. |
| IOC | 4 |
Order must be executed immediately (full or partial). Any unfilled portion is cancelled instantly. |
| GTD | 8 |
(Good Till Date) Order remains valid until a specified date. If not executed by then, it is cancelled automatically. |
| EOS | 16 |
Order remains valid until the end of the trading session (intraday cutoff). |
| COL | 32 |
Order is executed only at the market close price. |
| GTDYS | 128 |
Order remains active for a defined number of trading days. |
6. Order Status
| Enum Name | Numeric Code | Description |
|---|---|---|
| Open or New | 48 |
The order has been placed successfully and is waiting for execution. |
| PartiallyFilled | 49 |
Only part of the order quantity has been executed. The remaining is still pending in the market. |
| Filled | 50 |
The entire order quantity has been executed successfully. |
| Cancelled | 52 |
The order has been withdrawn by the trader before it was executed. |
| Replaced | 53 |
The original order has been modified (e.g., price or quantity) and is now treated as a new order with updated details. |
| PendingCancel | 54 |
A cancel request has been sent but the order has not yet been cancelled. |
| Rejected | 56 |
The order was not accepted due to validation errors, insufficient margin, trading rules, or exchange rejection. |
| PendingNew | 65 |
The order has been submitted but is still waiting for acknowledgement from the exchange. |
| PendingReplace | 69 |
A modification request has been sent for the order but confirmation from the exchange is pending. |
7. OrderSource
| Enum Name | Numeric Code | Description |
|---|---|---|
| TWS | 1 |
Orders placed directly from the broker’s desktop trading terminal. |
| TWSAPI | 2 |
Orders submitted via the Trader Workstation’s API integration, typically through algorithmic or automated trading systems. |
| WEB | 21 |
Orders entered manually by the trader through the broker’s web-based trading platform. |
| WEBAPI | 22 |
Orders placed programmatically via web API integrations — used by custom applications or third-party tools. |
| MOBILEANDROID | 41 |
Orders placed through the broker’s Android mobile trading application. |
| MOBILEIOS | 81 |
Orders placed through the broker’s iOS mobile trading application. |
| EnterpriseWeb | 154 |
Orders originating from an enterprise-grade web trading application. |
| EnterpriseMobile | 155 |
Orders generated from enterprise-level mobile apps built for institutional traders. |
| EnterpriseTWS | 156 |
Orders placed via an advanced or customized version of the Trader Workstation used in enterprise setups. |
8. Position Square Off Mode
| Enum Name | Numeric Code | Description |
|---|---|---|
| DayWise | 1 |
Tracks intraday positions separately for each trading day. |
| NetWise | 2 |
Consolidates positions across multiple days into a net position. |
9. Position Square Off Quantity Type
| Enum Name | Numeric Code | Description |
|---|---|---|
| Percentage | 0 |
Exit is defined as a percentage of the total position. |
| ExactQty | 1 |
Exit is defined as a fixed quantity of the position. |
10. MarketType
| Enum Name | Numeric Code | Description |
|---|---|---|
| Normal | 1 |
Standard market segment where regular equity and derivative trades are placed. Most buy/sell orders are routed here. |
| Oddlot | 2 |
Used when the order quantity is less than the standard market lot size. Allows trading of small or non-standard quantities of shares. |
| Retaildebt | 3 |
Segment dedicated to retail trading in debt instruments like corporate bonds, government securities, or debentures. |
| Auction | 4 |
Segment where auctions are conducted, usually for settlement shortages or special situations (e.g., buy-in auctions when sellers fail to deliver). |
| CallAuction1 | 5 |
Call auction mechanism session 1 — typically for illiquid securities. Orders are pooled and executed together at a uniform price. |
| CallAuction2 | 6 |
Call auction mechanism session 2 — another session for specific securities or time slots where orders are batched and executed at a single price. |
11. OrderLegStatus
| Enum Name | Numeric Code | Description |
|---|---|---|
| SingleOrderLeg | 1 |
Represents a simple standalone order with no linked legs. |
| SpreadFirstLeg | 2 |
The primary leg of a spread order strategy. |
| SpreadSecondLeg | 3 |
The counter leg of a spread order that offsets the first leg. |
| MultilegFirstLeg | 4 |
The first leg in a multi-leg strategy (often options) |
| MultilegSecondLeg | 5 |
The second leg in a multi-leg strategy. |
| MultilegThirdLeg | 6 |
The third leg in advanced multi-leg strategies. |
12. Bo_Leg_Details
| Enum Name | Numeric Code | Description |
|---|---|---|
| EntryLeg | 1 |
The main order leg where the trader enters the position (buy or sell). |
| ProfitTargetExitLeg | 2 |
An automatic exit leg placed along with the entry order to book profit once the target price is reached. |
| StoplossExitLeg | 3 |
A protective exit leg that closes the position if the price moves unfavorably beyond a defined limit. |
13. DayOrNet
| Enum Name | Numeric Code | Description |
|---|---|---|
| DAY | 1 |
Positions are valid only for the trading day. |
| NET | 2 |
Includes delivery trades (CNC) or carry-forward derivative positions (NRML). |
14. InstrumentType
| Enum Name | Numeric Code | Description |
|---|---|---|
| Futures | 1 |
Standardized derivative contracts to buy or sell an asset (stock, index, commodity, or currency) at a predetermined price on a future date. |
| Options | 2 |
Derivative contracts that give the buyer the right, but not the obligation, to buy (Call) or sell (Put) the underlying asset at a fixed price within a specified time. |
| Spread | 4 |
A strategy involving simultaneous buying and selling of related instruments. |
| Equity | 8 |
Shares of listed companies traded in the cash market segment. |
| Spot | 16 |
Trades for immediate delivery and settlement at the current market price, typically used in currencies and commodities. |
| PreferenceShares | 32 |
A class of shares that provides fixed dividends and has priority over equity shares in dividend distribution and liquidation, but usually with limited voting rights. |
| Debentures | 64 |
Long-term debt instruments issued by companies or governments to raise funds. Typically carry fixed interest payments. |
| Warrants | 128 |
Financial instruments that give the holder the right to buy equity shares at a specific price before a set expiry date. |
| Miscellaneous | 256 |
Category for instruments that do not fall into standard classifications (used for special or rare products). |
| MutualFund | 512 |
Units of pooled investment schemes managed by Asset Management Companies (AMCs). |
15. TradingSession
| Enum Name | Numeric Code | Description |
|---|---|---|
| PreOpenStart | 0 |
The beginning of the pre-open session where orders can be placed but are not matched immediately. |
| PreOpenEnd | 1 |
The end of the pre-open session when accumulated orders are matched, and the opening price is determined. |
| NormalStart | 2 |
The start of the regular trading session where continuous matching of buy and sell orders happens. |
| NormalEnd | 4 |
The close of the regular trading session; after this point, no further trades are executed in the normal market. |
| PreClosingStart | 8 |
The start of the pre-closing session, where the system collects data to calculate the closing price (closing auction). |
| PreClosingEnd | 16 |
The end of the pre-closing session when the official closing price is determined and published. |
16. ValuationType
| Enum Name | Numeric Code | Description |
|---|---|---|
| NONE | 0 |
Default flag when no special settlement type is applied. The order follows the normal market settlement rules. |
| CL | 1 |
Orders specifically placed to be executed at the market’s closing price during the closing session. |
| LT | 2 |
Segment used for block deals, bulk trades, or special limited trading windows defined by the exchange. |
17. HoldingType
| Enum Name | Numeric Code | Description |
|---|---|---|
| T1_Holdings | 1 |
Securities bought but not yet fully settled (i.e., on T+1 day). |
| Holdings | 3 |
Fully settled securities that are credited to the client’s Demat account. |
| MTFHoldings | 3 |
Securities purchased under Margin Trading Facility where part of the funds are borrowed from the broker. |
18. StatisticsLevel
| Enum Name | Numeric Code | Description |
|---|---|---|
| ParentLevel | 0 |
Represents the top-level entity in a hierarchy. |
| ChildLevel | 1 |
Represents a sub-entity under a parent. |
19. Socket Event
| Enum Name | Description |
|---|---|
| joined |
Sent when a client successfully connects and joins the WebSocket channel. Confirms that the real-time stream is active. |
| error |
Indicates a failure or issue (e.g., invalid request, authentication failure, or system error). Requires client-side handling. |
| warning |
Non-critical issue or advisory message (e.g., rate-limit approaching, deprecated API usage). |
| success |
Confirms that a client request was processed successfully (e.g., order placement acknowledged). |
| order |
Event carrying real-time updates about an order lifecycle — placed, modified, filled, cancelled, or rejected. |
| trade |
Sent when an order results in an actual trade execution (full or partial). Contains trade ID, price, and quantity details. |
| logout |
Notification that the session or WebSocket connection has been terminated — either manually or due to token expiry. |
| position |
Real-time updates about portfolio positions, including intraday (DayWise) or carry-forward (NetWise) quantities. |
| tradeConversion |
Event triggered when an order/trade is converted from one product type to another (e.g., Intraday MIS → Delivery CNC). |
| gttOrder |
Event update for GTT orders (orders that activate only when a trigger price is met). |
| gttOrderRejection |
Notification when a GTT order fails to activate due to invalid conditions, margin shortfall, or exchange rejection. |
20. Order Session Type
| Enum Name | Numeric Code | Description |
|---|---|---|
| AMO | 1 |
Standard market order placed during regular market hours. |
| OT | 2 |
After Market Order – Orders placed after market hours to be processed when the market opens |
| INSTI | 4 |
Institutional – Orders placed through institutional trading sessions. |
| GTT | 5 |
Good Till Triggered – Order remains pending until the trigger condition is met. |
Data Types & Business Rules
All data types now use business-oriented names, specify allowed sizes, and clearly state any validation rules.
| Field Name | Data type | Size | Description |
|---|---|---|---|
| ClientID | String | 15 |
Client ID Mandatory in case of Dealer |
| UserID | String | 15 |
UserID of investor client |
| ExchangeSegment | String | 15 |
Exchange Segment
|
| ExchangeInstrumentID | Integer | 10 |
Exchange Scrip code or Symbol Token is unique identifier |
| ProductType | String | 4 |
ProductType
|
| OrderType | String | 10 |
OrderType
|
| OrderSide | String | 4 |
OrderSide
|
| TimeInForce | String | 5 |
TimeInForce
|
| Quantity | Integer | 10 |
Quantity to transact. In terms of Lots. |
| Price | Double | (15,4) |
Price in Rupees. Up to 4 decimal places. |
| OrderUniqueIdentifier | String | 20 |
Echo back to identify order |
| AppOrderID | Integer | 10 |
Unique Order ID as received in Order Entry Response |
| AccessPassword | String | 20 |
Access Password of a server |
| Version | String | 20 |
API Version number of the server |
| UniqueKey | String | 50 |
The UniqueKey is generated by the server during the HostLookUp process. |
| ConnectionString | String | 200 |
IP address of the server to which the client needs to connect. |
| Remarks | String | 50 |
Any remarks added by the server in the HostLookUp API. |
| ExchangeOrderID | String | 20 |
It is unique OrderID generated by exchange. |
| OrderReferenceID | String | 20 |
It is unique OrderReferenceID to identify more than 1 leg orders. |
| IsSpread | Boolean | 5 |
Indicates Spread order or normal order. |
| OrderCategoryType | String | 10 |
It represents order market type i.e MarketType
|
| GeneratedBy | String | 15 | It represents from which operation has been performed |
| MessageCode | String | 10 |
API MessageCode |
| MessageVersion | String | 10 |
API Message Version |
| TokenID | String | 10 |
API TokenID |
| ApplicationType | String | 15 |
API ApplicationType |
| SequenceNumber | String | 15 |
API SequenceNumber |
| Timestamps | String | 20 | |
| OrderStatus | String | 20 | |
| RejectReason | String | 500 |
It is reason if order rejected or canceled. |
| OrderExpiryDate | String | 20 |
It is the expiry date of order when validity is set to GTD (Good Till Date). |
| EntryAppOrderID | Integer | 10 |
The unique order ID for the main/entry order. |
| ExitAppOrderID | Integer | 10 |
The unique order ID for the linked exit order (Stop-Loss or Target). |
| OrderLegStatus | String | 20 |
OrderLegStatus
|
| BoLegDetails | String | 20 |
Bo_Leg_Details
|
| SecretKey | String | 20 |
SecretKey to validate user. |
| AppKey | String | 20 |
The API App key. |
| Token | String | 500 |
The authentication token used with every subsequent request. |
| SquarOff | Integer | 10 |
Represents the profit-taking offset value. |
| TrailingStoploss | Integer | 10 |
Incremental value (in points or price units) that moves your stop-loss in the profitable direction. |
| StopLossPrice | Double | (15,4) |
Price in Rupees. Up to 4 decimal places. |
| ApiOrderSource | String | 20 |
API Order Source name to tag a particular source. |
| IsInvestorClient | Boolean | 5 |
Represents an investor client; otherwise, represents a dealer. |
| IsOneTouchUser | Boolean | 5 |
Indicates whether One Touch is enabled for this user. |
| ExecutionID | String | 10 |
Execution ID is a unique identifier assigned to each trade execution. |
| ExecutionReportIndex | Integer | 2 |
Execution Report Index is a sequential identifier that indicates the order of execution reports for a particular order. |
| ISIN | String | 10 |
The standard ISIN representing stocks listed on multiple exchanges. |
| RMSHoldingId | Integer | 10 |
Unique holding ID. |
| HoldingType | Integer | 15 |
Type of Holdings
|
| ValuationType | Integer | 5 |
ValuationType
|
| Haircut | Integer | 10 |
Haircut refers to the percentage reduction applied to the market value of a security when calculating its collateral value. |
| CreatedBy | String | 20 |
User or system identifier that created the holding record. |
| CreatedOn | String | 20 |
Date and time when the holding record was first created. |
| LastUpdatedBy | String | 20 |
User or system identifier that last modified or updated the holding record. |
| IsCollateralHolding | Boolean | 5 |
Indicates whether the holding is being used as collateral for margin or leverage. |
| IsBuyAvgPriceProvided | Boolean | 5 |
Indicates whether the buy average price for the holding has been provided or not. |
| IsNeedToDelete | Boolean | 5 |
Indicates whether the holding record needs to be deleted or marked for removal from the system. |
| LastUpdatedOn | String | 20 |
The date and time when the holding record was last modified or updated. |
| Marketlot | Integer | 5 |
Is the minimum number of shares or units of a security that can be traded on an exchange. |
| Multiplier | Integer | 5 |
Multiplying factor for currency F&O. |
| Amount | Double | (15,4) |
Total buy value of position in rupees. |
| UnrealizedMTM | Double | (15,4) |
It's unrealized profit or loss which has not been booked by client. |
| RealizedMTM | Double | (15,4) |
It's realized profit or loss which has been booked by client. |
| MTM | Double | (15,4) |
Mark to market returns (computed based on the last close and the last traded price). |
| SumOfQuantityAndPrice | Double | (15,4) |
Total buy or sell value of position in rupees. |
| StatisticsLevel | String | 15 |
StatisticsLevel
|
| IsInterOpPosition | Boolean | 5 |
Interoperability is enabled or disabled. |
| BEP | Double | (15,4) |
It's break even point of position. |
| IsDayWise | Boolean | 5 |
IsDayWise position conversion. |
| BroadcastMessage | String | 500 |
Message sent by exchange. |
| LimitHeader | String | 100 |
Header message used in limits. |
| CashAvailable | Double | (15,4) |
Total cash available for trading. |
| Collateral | Double | (15,4) |
Value of pledged securities/collateral. |
| MarginUtilized | Double | (15,4) |
Margin currently blocked/used for trades. |
| NetMarginAvailable | Double | (15,4) |
Remaining margin after utilization (cashAvailable + collateral - marginUtilized). |
| CashMarginAvailable | Double | (15,4) |
Actual cash margin balance available. |
| AdhocMargin | Double | (15,4) |
Temporary/adhoc margin assigned by broker/RMS. |
| NotionalCash | Double | (15,4) |
Virtual/notional cash margin (non-cash benefit). |
| PayInAmount | Double | (15,4) |
Funds incoming from client (pending pay-in). |
| PayOutAmount | Double | (15,4) |
Funds payable back to client (pending pay-out). |
| CNCSellBenefit | Double | (15,4) |
Margins benefit from CNC (Cash & Carry) sell transactions. |
| DirectCollateral | Double | (15,4) |
Margin directly from pledged collateral. |
| HoldingCollateral | Double | (15,4) |
Margins benefit from stock holdings. |
| ClientBranchAdhoc | Double | (15,4) |
Branch-level adhoc margin applied. |
| SellOptionsPremium | Double | (15,4) |
Premium received from option selling credited as margin. |
| TotalBranchAdhoc | Double | (15,4) |
Total adhoc margin provided at branch level. |
| AdhocFOMargin | Double | (15,4) |
Temporary margin for Futures & Options. |
| AdhocCurrencyMargin | Double | (15,4) |
Temporary margin for currency derivatives. |
| AdhocCommodityMargin | Double | (15,4) |
Temporary margin for commodities. |
| GrossExposureMarginPresent | Double | (15,4) |
Margin blocked for gross exposure positions. |
| BuyExposureMarginPresent | Double | (15,4) |
Margin blocked for buy exposure. |
| SellExposureMarginPresent | Double | (15,4) |
Margin blocked for sell exposure. |
| VarELMarginPresent | Double | (15,4) |
Margin blocked under VaR & ELM requirement. |
| ScripBasketMarginPresent | Double | (15,4) |
Margin blocked for scrip basket restrictions. |
| GrossExposureLimitPresent | Double | (15,4) |
Limit consumed against gross exposure. |
| BuyExposureLimitPresent | Double | (15,4) |
Limit consumed for buy exposure. |
| SellExposureLimitPresent | Double | (15,4) |
Limit consumed for sell exposure. |
| CNCLimitUsed | Double | (15,4) |
Limit used under CNC products. |
| CNCAmountUsed | Double | (15,4) |
Amount utilized under CNC trades. |
| MarginUsed | Double | (15,4) |
Total margin currently blocked/used. |
| LimitUsed | Double | (15,4) |
Other limits consumed (if applicable). |
| TotalSpanMargin | Double | (15,4) |
Margin utilized as SPAN (F&O requirement). |
| ExposureMarginPresent | Double | (15,4) |
Exposure margin used (non-SPAN component). |
| CNCLimit | Double | (15,4) |
Maximum CNC (delivery) trading limit assigned. |
| TurnoverLimitPresent | Double | (15,4) |
Turnover limit allocated. |
| MTMLossLimitPresent | Double | (15,4) |
Limit on MTM loss allowed. |
| BuyExposureLimit | Double | (15,4) |
Maximum exposure allowed for buy trades. |
| SellExposureLimit | Double | (15,4) |
Maximum exposure allowed for sell trades. |
| GrossExposureLimit | Double | (15,4) |
Overall gross exposure limit assigned. |
| GrossExposureDerivativesLimit | Double | (15,4) |
Gross exposure limit for derivatives. |
| BuyExposureFuturesLimit | Double | (15,4) |
Exposure limit for futures buy trades. |
| BuyExposureOptionsLimit | Double | (15,4) |
Exposure limit for options buy trades. |
| SellExposureOptionsLimit | Double | (15,4) |
Exposure limit for options sell trades. |
| SellExposureFuturesLimit | Double | (15,4) |
Exposure limit for futures sell trades. |
| ClientName | String | 15 |
User login ID. |
| EmailId | String | 50 |
Registered email address of the client. |
| MobileNo | String | 10 |
Registered mobile number of the client. |
| PAN | String | 15 |
Client’s Permanent Account Number (for compliance/KYC). |
| IncludeInAutoSquareoff | Boolean | 5 |
Whether the client’s positions are eligible for auto square-off. |
| IncludeInAutoSquareoffBlocked | Boolean | 5 |
Whether auto square-off is blocked for the client. |
| IsProClient | Boolean | 5 |
Indicates if the client is a proprietary client. |
| ResidAddress | String | 500 |
Client’s residential address. |
| OfficeAddress | String | 500 |
Client’s registered office address. |
| AccountNumber | String | 15 |
Bank account number. |
| AccountType | String | 10 |
Type of account ("Savings", "Current", etc.). |
| BankName | String | 100 |
Name of the bank. |
| BankBranchName | String | 100 |
Bank branch name. |
| BankCity | String | 50 |
City where the bank branch is located. |
| CustomerId | String | 15 |
Customer identifier as provided by the bank. |
| BankCityPincode | String | 10 |
Pincode of the bank’s city. |
| BankIFSCCode | String | 15 |
IFSC code for the bank branch. |
| ExchangeSegNumber | Integer | 2 |
Exchange Segment
|
| Enabled | Boolean | 5 |
Whether this exchange segment is active for the client. |
| ParticipantCode | String | 15 |
Participant/broker code provided by the exchange |
| IsValid | Boolean | 5 |
Indicates whether the order is valid based on margin checks. true means the order can proceed |
| MarginRequired | Double | (15,4) |
Total margin required (in currency units) to place the order |
| MarginAvailable | Double | (15,4) |
Total margin currently available in the user’s account |
| MarginShortfall | Double | (15,4) |
Margin deficit amount if available margin is insufficient |
| ErrorMessage | Double | 500 |
Error message when IsValid = false. Empty string means no error |
User
The user needs to log in using the appKey and secret key which are generated while registering with the API dashboard along with accessToken & uniqueKey obtained from below steps. The appKey will be first authenticated by the brokers gateway before redirecting to the API service.
OAuth Login Flow
The login flow starts by navigating to the login endpoint.
A successful login comes back with an accessToken as a URL query parameter to the return URL.
Steps to retrieve accessToken:
Navigate to
the above URL for login & enter valid UserID.
Validate the
UserID with password.
Navigate to
the above URL for login & enter valid UserID.
Once UserID is
validated it will ask for pin/otp.
After
successfull authorization, accessToken will be recieved on returnURL.
After retrieving accessToken from Oauth login flow, proceed with Hostlookup to obtain
connectionString & UniqueKey
This accessToken along with appKey, secretKey & uniqueKey will be used in the login API
to obtain a session token, which is then used for signing all subsequent requests.
In summary:
Navigate to the provided
url
for Oauth login flow.
A successful login comes back with a accessToken to the return URL.
NUsing
Hostlookup
step, obtain connectionString & UniqueKey.
POST the appKey, secretKey, accessToken and uniqueKey to
login API.
Obtain the session token and use that with all subsequent requests.
HostLookup Login (POST)
The API consumer must first send an HTTP POST request to the HostLookUp endpoint with the predefined access password and version.
- If the provided access password and version are valid, the consumer will receive a UniqueKey and ConnectionString in the response.
- This initial request to the HostLookUp service is required to obtain the UniqueKey and ConnectionString of the Interactive API server. use these values for all subsequent connections.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| AccessPassword |
AccessPassword
|
Y |
The UniqueKey is generated by the server during the HostLookUp process. |
| Version |
Version
|
Y |
Api Version number of the server. |
Request Body JSON
{
"AccessPassword": "2021HostLookUpAccess",
"version": "interactive_1.0.1",
}
Response Body Parameters
| Parameter Name | Type | Description |
|---|---|---|
| uniqueKey |
UniqueKey
|
The UniqueKey is generated by the server during the HostLookUp process. |
| connectionString |
ConnectionString
|
IP address of the server to which the client needs to connect. |
| timeStamp |
Timestamps
|
Timestamp of the server when the UniqueKey is returned to the user |
| remarks |
Remarks
|
Any remarks added by the server in the HostLookUp API. |
Response Body JSON
{
"type": "success",
"code": "hostlookup",
"description": "Hostlookup successful",
"result": {
"UniqueKey": "O+UTBgtksswxyU0gRFCh2vsq5M2Ft+qVV",
"connectionString": "https://developers.symphonyfintech.in/1interactive",
"timeStamp": "0",
"remarks": ""
}
}
Response Body JSON (Failure)
{
"type": "string",
"code": "string",
"description": "Reason for failed reques"
}
Code Examples
curl --location 'https://developers.symphonyfintech.in/hostlookup' \
--header 'Content-Type: application/json' \
--data '{
"accesspassword": "2021HostLookUpAccess",
"version": "interactive_1.0.2"
}'
Login API (POST)
The API consumer sends a login request to the Interactive API server with the secretKey and appKey. Upon successful validation, the server returns a login response. Retrieve the token from this response, which must be included in the headers of all subsequent requests.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| secretKey |
SecretKey
|
Y |
The predefined secret key assigned to the client. |
| appKey |
AppKey
|
Y |
The application key used for authentication. |
Request Body JSON
{
"secretKey": "Doqg107#6V",
"appKey": "5a75a8676cabe678",
"uniqueKey": "vp67Z9sQqVdgf2TwYpv9mHY+DH6r3whziBG3djqCcPVVCUyHiwtvhGOq3iCxaGaGvjc0pVsDmT",
"accessToken": "dd273f43805a88d5acc32ccc38f6844d1bebbb1b384292e4739e4dc5059a515",
}
Response Body Parameters
| Parameter Name | Type | Description |
|---|---|---|
| Enmus | Object |
Object of all Enums i.e socketEvent , OrderSide , positionSqureOffMode,positionSquareOffQuantityType,dayOrNet, exchangeSegment,instrumentType, orderSource,exchangeInfo,productType,orderType, TimeInForce |
| clientCodes | Array |
If isInvestorClient is false, an array list of clients mapped to the dealer is returned; otherwise, a single ClientID is returned as the investor client. |
| exchangeSegmentArray | Array |
ExchangeSegment
|
| token |
Token
|
The authentication token used with every subsequent request, unless it is invalidated by the logout API. |
| userID |
UserID
|
userID of investor client |
| isInvestorClient |
isInvestorClient
|
If the value is true, it represents an investor client; otherwise, it represents a dealer. |
| isOneTouchUser |
IsOneTouchUser
|
Indicates whether One Touch is enabled for this user. |
Response Body JSON
{
"type": "success",
"code": "s-user-0001",
"description": "Valid User.",
"result": {
"enums": {
"socketEvent": [
"joined",
"error",
"warning",
"success",
"order",
"trade",
"logout",
"position",
"tradeConversion",
"marketStatusUpdate",
"exchangeAdapterState",
"gttOrder",
"gttOrderRejection"
],
"orderSide": ["BUY", "SELL"],
"positionSqureOffMode": ["DayWise", "NetWise"],
"positionSquareOffQuantityType": ["Percentage", "ExactQty"],
"dayOrNet": ["DAY", "NET"],
"instrumentType": [
"Futures",
"Options",
"Spread",
"Equity",
"Spot",
"PreferenceShares",
"Debentures",
"Warrants",
"Miscellaneous",
"MutualFund"
],
"exchangeSegment": [
"NSECM",
"NSEFO",
"NSECD",
"BSECM",
"BSEFO",
"BSECD",
"NCDEX",
"MCXFO"
],
"exchangeInfo": {
"NSECM": {
"productType": {
"1": "MIS",
"2": "NRML",
"4": "CNC",
"8": "CO",
"16": "BO",
"32": "MTF",
"CO": 8,
"CNC": 4,
"MTF": 32,
"BO": 16,
"MIS": 1,
"NRML": 2
},
"orderType": ["StopLimit", "StopMarket", "Limit", "Market"],
"timeInForce": ["DAY", "IOC"]
},
"MCXFO": {
"productType": {
"1": "MIS",
"2": "NRML",
"8": "CO",
"16": "BO",
"CO": 8,
"BO": 16,
"MIS": 1,
"NRML": 2
},
"orderType": ["StopLimit", "StopMarket", "Limit", "Market"],
"timeInForce": ["DAY", "GTC", "IOC", "GTD", "EOS"]
}
}
},
"clientCodes": ["SYMP"],
"exchangeSegmentArray": [
{ "key": "NSECM", "value": "NSECM" },
{ "key": "NSEFO", "value": "NSEFO" },
{ "key": "NSECD", "value": "NSECD" },
{ "key": "BSECM", "value": "BSECM" },
{ "key": "BSEFO", "value": "MCXFO" }
],
"token": "v2.local.5Ymq1o2IoxIxqcwVaISzy3FssAbfHjNzUB8r7DC-XN0RnZjklEGq8IEUkwmv3iT69wlXuS97ab3s9qw3MUkyY5lJCgggP9bq-O4FwG-oH7qqKN9F1wkTjiIiMUMCxcq4r6wJg3t97nagC53D1yC7RmH56YslWFl98EuuAtWLkfessWRp5alRenXozAGwq5yajlfa_deExpNFGoEvHeJv1UajOog13Nq2l4FnWz4S6aa8vZ5W4PZH-Bv2O6YFet-miZN8ycFO_fGN8el7P-JMYewh",
"userID": "SYMP",
"isInvestorClient": true,
"isOneTouchUser": false
}
}
Code Examples
curl --location 'https://developers.symphonyfintech.in/1interactive/user/session' \
--header 'Content-Type: application/json' \
--data '{
"secretKey": "Doqg107#6V",
"appKey": "5a75a8676cabe678",
"uniqueKey": "vp67Z9sQqVdgf2TwYpv9mHY+DH6r3whziBG3djqCcPVVCUyHiwtvhGOq3iCxaGaGvjc0pVsDmT",
"accessToken": "dd273f43805a88d5acc32ccc38f6844d1bebbb1b384292e4739e4dc5059a515"
}'
Session Logout (Delete)
This call invalidates the session token and terminates the API session. After this, the user must go through the login flow again and retrieve a new session token from the login response before performing further activities. This does not log the user out of the XTS TWS application.
URL
Response Body Parameters
{
"type": "success",
"code": "s-user-0001",
"description": "successfully logout from all API.",
"result": ""
}
Code Examples
curl --location --request DELETE 'https://developers.symphonyfintech.in/1interactive/user/session' \ --header 'Authorization: xxxxxx'
Get Balance (GET)
Retrieves balance-related information for a user. The response includes details about equities, derivatives, upfront margins, available exposure, and other RMS-related balances. This API is primarily used to check real-time trading limits and exposures.
URL
Request Body Parameters
| Parameter Name | Type | Description | Description |
|---|---|---|---|
| clientID |
ClientID
|
N |
Client ID Mandatory in case of Dealer |
Response Body Parameters
| Parameter Name | Type | Description |
|---|---|---|
| BalanceList | BalanceList |
- |
| limitHeader |
LimitHeader
|
A pipe (|) separated string, often representing category tags like segment|exchange|product (here "ALL|ALL|ALL" = applies to all). |
| limitObject | limitObject | Main object holding multiple limit & margin details. |
| RMSSubLimits | RMSSubLimitsList | Represents RMS (Risk Management System) sub-limits. |
| cashAvailable |
CashAvailable
|
Total free cash available for trading. |
| collateral |
Collateral
|
Value of pledged securities/collateral. |
| marginUtilized |
MarginUtilized
|
Margin currently blocked/used for trades. |
| netMarginAvailable |
NetMarginAvailable
|
Remaining margin after utilization (cashAvailable + collateral - marginUtilized). |
| MTM |
MTM
|
Mark-to-Market profit/loss. |
| UnrealizedMTM |
UnrealizedMTM
|
P/L from open positions not yet squared off. |
| RealizedMTM |
RealizedMTM
|
P/L from closed positions. |
| MarginAvailable | MarginAvailableList | Represents types of available margins. |
| CashMarginAvailable |
CashMarginAvailable
|
Actual cash margin balance available. |
| AdhocMargin |
AdhocMargin
|
Temporary/adhoc margin assigned by broker/RMS. |
| NotinalCash |
NotinalCash
|
Virtual/notional cash margin (non-cash benefit). |
| PayInAmount |
PayInAmount
|
Funds incoming from client. |
| PayOutAmount |
PayOutAmount
|
Funds payable back to client. |
| CNCSellBenifit |
CNCSellBenifit
|
Margins benefit from CNC (Cash & Carry) sell transactions. |
| DirectCollateral |
DirectCollateral
|
Margin directly from pledged collateral. |
| HoldingCollateral |
HoldingCollateral
|
Margins benefit from stock holdings. |
| ClientBranchAdhoc |
ClientBranchAdhoc
|
Branch-level adhoc margin allocated. |
| SellOptionsPremium |
SellOptionsPremium
|
Premium received from option selling credited as margin. |
| TotalBranchAdhoc |
TotalBranchAdhoc
|
Total adhoc margin provided at branch level. |
| AdhocFOMargin |
AdhocFOMargin
|
Temporary margin for Futures & Options. |
| AdhocCurrencyMargin |
AdhocCurrencyMargin
|
Temporary margin for currency derivatives. |
| AdhocCommodityMargin |
AdhocCommodityMargin
|
Temporary margin for commodities. |
| marginUtilizedList | marginUtilizedList | Represents how margin is being consumed. |
| GrossExposureMarginPresent |
GrossExposureMarginPresent
|
Margin blocked for gross exposure positions. |
| BuyExposureMarginPresent |
BuyExposureMarginPresent
|
Margin blocked for buy exposure. |
| SellExposureMarginPresent |
SellExposureMarginPresent
|
Margin blocked for sell exposure. |
| VarELMarginPresent |
VarELMarginPresent
|
Margin blocked under VaR + ELM requirement. |
| ScripBasketMarginPresent |
ScripBasketMarginPresent
|
Margin blocked for scrip basket restrictions. |
| GrossExposureLimitPresent |
GrossExposureLimitPresent
|
Limit consumed against gross exposure. |
| BuyExposureLimitPresent |
BuyExposureLimitPresent
|
Limit consumed for buying exposure. |
| SellExposureLimitPresent |
SellExposureLimitPresent
|
Limit consumed for selling exposure. |
| CNCLimitUsed |
CNCLimitUsed
|
Limit used under CNC products. |
| CNCAamountUsed |
CNCAamountUsed
|
Amount utilized under CNC trades. |
| MarginUsed |
MarginUsed
|
Total margin currently blocked/used. |
| LimitUsed |
LimitUsed
|
Other limits consumed (if applicable). |
| TotalSpanMargin |
TotalSpanMargin
|
Margin utilized as SPAN (F&O requirement). |
| ExposureMarginPresent |
ExposureMarginPresent
|
Exposure margin used (non-SPAN component). |
| limitsAssigned | limitsAssignedList | Represents maximum limits allocated to accounts. |
| CNCLimit |
CNCLimit
|
Maximum CNC (delivery) trading limit assigned. |
| TurnoverLimitPresent |
TurnoverLimitPresent
|
Turnover limit allocated. |
| MTMLossLimitPresent |
MTMLossLimitPresent
|
Limit on MTM loss allowed. |
| BuyExposureLimit |
BuyExposureLimit
|
Maximum exposure allowed for buy trades. |
| SellExposureLimit |
SellExposureLimit
|
Maximum exposure allowed for sell trades. |
| GrossExposureLimit |
GrossExposureLimit
|
Overall gross exposure limit assigned. |
| GrossExposureDerivativesLimit |
GrossExposureDerivativesLimit
|
Gross exposure limit for derivatives. |
| BuyExposureFuturesLimit |
BuyExposureFuturesLimit
|
Exposure limit for futures buy trades. |
| BuyExposureOptionsLimit |
BuyExposureOptionsLimit
|
Exposure limit for options buy trades. |
| SellExposureOptionsLimit |
SellExposureOptionsLimit
|
Exposure limit for options sell trades. |
| SellExposureFuturesLimit |
SellExposureFuturesLimit
|
Exposure limit for futures sell trades. |
| AccountID |
AccountID
|
User login ID. |
Response Body JSON
{
"type": "success",
"code": "s-user-0002",
"description": "OK",
"result": {
"BalanceList": {
"limitHeader": "ALL|ALL|ALL",
"limitObject": {
"RMSSubLimits": {
"cashAvailable": 99999999999999,
"collateral": 0,
"marginUtilized": 52955.278,
"netMarginAvailable": 99999999949541.72,
"MTM": 0,
"UnrealizedMTM": 0,
"RealizedMTM": 0
},
"marginAvailable": {
"CashMarginAvailable": 99999999999999,
"AdhocMargin": 0,
"NotinalCash": 0,
"PayInAmount": 0,
"PayOutAmount": 0,
"CNCSellBenifit": 0,
"DirectCollateral": 0,
"HoldingCollateral": 0,
"ClientBranchAdhoc": 0,
"SellOptionsPremium": 0,
"TotalBranchAdhoc": 0,
"AdhocFOMargin": 0,
"AdhocCurrencyMargin": 0,
"AdhocCommodityMargin": 0
},
"marginUtilized": {
"GrossExposureMarginPresent": 0,
"BuyExposureMarginPresent": 0,
"SellExposureMarginPresent": 0,
"VarELMarginPresent": 0,
"ScripBasketMarginPresent": 0,
"GrossExposureLimitPresent": 0,
"BuyExposureLimitPresent": 0,
"SellExposureLimitPresent": 0,
"CNCLimitUsed": 0,
"CNCAmountUsed": 1671,
"MarginUsed": 52955.2789,
"LimitUsed": 0,
"TotalSpanMargin": 0,
"ExposureMarginPresent": 0
},
"limitsAssigned": {
"CNCLimit": 0,
"TurnoverLimitPresent": 0,
"MTMLossLimitPresent": 0,
"BuyExposureLimit": 0,
"SellExposureLimit": 0,
"GrossExposureLimit": 0,
"GrossExposureDerivativesLimit": 0,
"BuyExposureFuturesLimit": 0,
"BuyExposureOptionsLimit": 0,
"SellExposureOptionsLimit": 0,
"SellExposureFuturesLimit": 0
},
"AccountID": "SYMP1"
}
}
}
}
Code Examples
curl --location 'https://developers.symphonyfintech.in/1interactive/user/balance' \ --header 'Authorization: xxxxxx'
Get Profile (GET)
Using the session token, the user can access their profile stored with the broker. The profile can be retrieved at any point in time.
URL
Request Body Parameters
| Parameter Name | Type | Description | Description |
|---|---|---|---|
| clientID |
ClientID
|
N |
Client ID Mandatory in case of Dealer |
Response Body Parameters
| Parameter Name | Type | Description |
|---|---|---|
| ClientId |
ClientID
|
User login ID. |
| ClientName |
ClientName
|
Registered name of the client. |
| EmailId |
EmailId
|
Registered email address of the client. |
| MobileNo |
MobileNo
|
Registered mobile number of the client. |
| PAN |
PAN
|
Client’s Permanent Account Number (for compliance/KYC). |
| IsClientAutoSquareoff |
IncludeInAutoSquareoffBlocked
|
Whether auto square-off is blocked for the client. |
| IncludeInAutoSquareoffBlocked |
IncludeInAutoSquareoffBlocked
|
Whether auto square-off is blocked for the client. |
| IsProClient |
IsProClient
|
Indicates if the client is a proprietary client. |
| IsInvestorClient |
IsInvestorClient
|
Indicates if the client is categorized as an investor client. |
| ResidentialAddress |
ResidentialAddress
|
Client’s registered residential address. |
| OfficeAddress |
OfficeAddress
|
Client’s registered office address. |
| ClientBankInfoList | ClientBankInfoList | Bank account details linked to the client. |
| ClientId |
ClientID
|
User login ID. |
| AccountNumber |
AccountNumber
|
Bank account number. |
| AccountType |
AccountType
|
Type of account ("Savings", "Current", etc.). |
| BankName |
BankName
|
Name of the bank. |
| BankBranchName |
BankBranchName
|
Bank branch name. |
| BankCity |
BankCity
|
City where the bank branch is located. |
| CustomerId |
CustomerId
|
Customer identifier as provided by the bank. |
| BankCityPincode |
BankCityPincode
|
Pincode of the bank’s city. |
| BankIFSCCode |
BankIFSCCode
|
IFSC code for the bank branch. |
| ClientExchangeDetailsList | ClientExchangeDetailsList | Exchange-specific details mapped to the client. Each exchange (e.g., NSECM, BSEFO, etc.) will appear as a nested object. |
| ClientId |
ClientID
|
User login ID. |
| ExchangeSegNumber |
ExchangeSegNumber
|
Segment number used internally to identify the exchange segment. |
| Enabled |
Enabled
|
Whether this exchange segment is active for the client. |
| ParticipantCode |
ParticipantCode
|
Participant/broker code provided by the exchange. |
Response Body JSON
{
"type": "success",
"code": "s-user-0001",
"description": "User profile",
"result": {
"ClientId": "SYMP1",
"ClientName": "SYMP",
"EmailId": "symp.t@symphonyfintech.com",
"MobileNo": "5555587878",
"PAN": "HSDIG2342J",
"IncludeInAutoSquareoff": true,
"IncludeInAutoSquareoffBlocked": false,
"IsProClient": false,
"IsInvestorClient": true,
"ResidentialAddress": "1",
"OfficeAddress": "address",
"ClientBankInfoList": {
"ClientId": "SYMP1",
"AccountNumber": "1234567890123456",
"AccountType": "Current",
"BankName": "ICICI Bank",
"BankBranchName": "Andheri",
"BankCity": "Mumbai",
"CustomerId": "87654321",
"BankCityPincode": "400093",
"BankIFSCCode": "ICICI1000456789"
},
"ClientExchangeDetailsList": {
"NSECM": {
"ClientId": "SYMP1",
"ExchangeSegNumber": 1,
"Enabled": true,
"ParticipantCode": "10000001"
},
"NSEFO": {
"ClientId": "SYMP1",
"ExchangeSegNumber": 2,
"Enabled": true,
"ParticipantCode": "10000002"
}
}
}
}
Code Examples
curl --location 'https://developers.symphonyfintech.in/1interactive/user/profile?clientID=SYMP' \ --header 'Authorization: xxxxxx'
Brokerage (POST)
Using the session token, the user can access their profile stored with the broker. The profile can be retrieved at any point in time.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| clientID |
ClientID
|
Y | CLIENT ID |
| exchangeSegment |
ExchangeSegment
|
Y | Exchange Scrip code or Symbol Token is unique identifier |
| exchangeInstrumentID |
ExchangeInstrumentID
|
Y | Exchange Scrip code or Symbol Token is unique identifier |
| productType |
ProductType
|
Y | ProductType |
| orderSide |
OrderSide
|
Y | OrderSide |
| orderQty |
OrderQuantity
|
Y | Quantity to transact. In terms of Lots |
| orderPrice |
Price
|
Y | The price to execute the order at |
Request Body JSON
{
"clientID": "SYMP",
"brokerageOrderInformation": [
{
"exchangeSegment": 2,
"exchangeInstrumentID": 37054,
"productType": "NRML",
"orderSide": "BUY",
"orderQty": 75,
"orderPrice": 25000
}
]
}
Response Body Parameters
| Parameter Name | Type | Description |
|---|---|---|
| AppOrderID |
AppOrderID
|
Unique order ID |
| OrderUniqueIdentifier |
OrderUniqueIdentifier
|
Echo back to identify order |
| ClientID |
ClientID
|
ClientID which is sent in request body |
| Brokerage |
Brokerage
|
Brokerage value |
| STTOrCTT |
STTOrCTT
|
Securities Transaction Tax / CTT |
| ExchangeTurnoverCharges |
ExchangeTurnoverCharges
|
Exchange turnover fees |
| ExchangeCharges |
ExchangeCharges
|
Exchange transaction charges |
| GST |
GST
|
Goods and Services Tax |
| SebiCharges |
SebiCharges
|
SEBI regulatory charges |
| StampDuty |
StampDuty
|
Stamp duty on trade |
| ClearingCharges |
ClearingCharges
|
Clearing corporation fees |
| DPCharges |
DPCharges
|
Depository participant charges |
| Total |
Total
|
Total charges |
Response Body JSON
{
"type": "success",
"code": "s-calculatebrokerage-0003",
"description": "Calculate Brokerage Data",
"result": {
"brokerageDeatils": {
"Brokerage": 37.5,
"STTOrCTT": 187500,
"ExchangeTurnoverCharges": 187.5,
"ExchangeCharges": 18.75,
"GST": 47.5875,
"SebiCharges": 1.875,
"StampDuty": 93.75,
"ClearingCharges": 18.75,
"DPCharges": 18.75,
"Total": 187924.4625
}
}
}
Code Examples
curl --location 'https://developers.symphonyfintech.in/1interactive/user/calculatebrokerage' \
--header 'Authorization: xxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"clientID": "SYMP",
"brokerageOrderInformation": [
{
"exchangeSegment": 2,
"exchangeInstrumentID": 47664,
"productType": "NRML",
"orderSide": "BUY",
"orderQty": 75,
"orderPrice": 123
}
]
}'
Standard Orders
Place Order API (POST)
Order Placement Workflow & Key Considerations
-
Read all ENUM values from the login response along with the authentication token
-
Use the ENUM values and token when constructing the Place Order request
-
The token must be included in the JSON request headers for all API calls for all API calls
-
The Place Order request is asynchronous in nature
-
On submission, the user receives an appOrderID
-
The appOrderID can be used later with the Order Book (Get Order) API to confirm order execution.
-
The execution of an order depends on multiple factors: (1.RMS limits, 2.Risk checks, 3.Other validations)
-
Limit orders may remain open throughout the trading day if not executed.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| exchangeSegment |
ExchangeSegment
|
Y | ExchangeSegment |
| exchangeInstrumentID |
ExchangeInstrumentID
|
Y | Exchange Scrip code or Symbol Token is unique identifier |
| productType |
ProductType
|
Y |
ProductType
|
| orderType |
OrderType
|
Y |
OrderType
|
| orderSide |
OrderSide
|
Y |
OrderSide
|
| timeInForce |
TimeInForce
|
Y |
TimeInForce
|
| disclosedQuantity |
OrderQuantity
|
Y | Quantity to disclose (for equity) |
| orderQuantity |
OrderQuantity
|
Y | Quantity to transact. In terms of Lots |
| limitPrice |
Price
|
Y | The price to execute the order at |
| stopPrice |
Price
|
Y | The price at which an order should be triggered (SL, SL-M) |
| orderUniqueIdentifier |
OrderUniqueIdentifier
|
N | Echo back to identify order |
| clientID |
ClientID
|
N | ClientID Mandatory in case of Dealer |
| apiOrderSource |
ApiOrderSource
|
N | API Order Source can be a third party application name which you want to give to your order, which will be used to track your order with a particular source. |
Request Body JSON
{
"exchangeSegment": "NSECM",
"exchangeInstrumentID": 3045,
"productType": "NRML",
"orderType": "LIMIT",
"orderSide": "BUY",
"timeInForce": "DAY",
"disclosedQuantity": 0,
"orderQuantity": 15,
"limitPrice": 254.55,
"stopPrice": 245.55,
"orderUniqueIdentifier": "123abc",
"clientID": "SYMP1",
"apiOrderSource": "ThirdPartyAppName"
}
Response Body Parameters
| Parameter Name | Type | Description |
|---|---|---|
| AppOrderID |
AppOrderID
|
Unique order ID |
| OrderUniqueIdentifier |
OrderUniqueIdentifier
|
Echo back to identify order |
| ClientID |
ClientID
|
ClientID which is send in request body |
Response Body JSON
{
"type": "success",
"code": "s-orders-0001",
"description": "Request sent",
"result": {
"AppOrderID": 2190766863,
"OrderUniqueIdentifier": "123abc",
"ClientID": "SYMP1"
}
}
Code Examples
curl --location 'https://developers.symphonyfintech.in/1interactive/orders' \
--header 'Authorization: xxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"exchangeSegment": "NSECM",
"exchangeInstrumentID": 2885,
"productType": "NRML",
"orderType": "LIMIT",
"orderSide": "BUY",
"timeInForce": "DAY",
"disclosedQuantity": 0,
"orderQuantity": 1,
"limitPrice": 1500,
"stopPrice": 0,
"orderUniqueIdentifier": "testtt"
}'
import requests
url = "https://developers.symphonyfintech.in/1interactive/orders"
payload = {
"exchangeSegment": "BSECM",
"exchangeInstrumentID": 500325,
"productType": "NRML",
"orderType": "LIMIT",
"orderSide": "BUY",
"timeInForce": "DAY",
"disclosedQuantity": 0,
"orderQuantity": 1,
"limitPrice": 1500,
"stopPrice": 0,
"orderUniqueIdentifier": "testtt"
}
headers = {
"Authorization": "xxxxxxxxxx",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print("Status Code:", response.status_code)
print("Response:", response.text)
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
url := "https://developers.symphonyfintech.in/1interactive/orders"
payload := []byte(`{
"exchangeSegment": "NSECM",
"exchangeInstrumentID": 2885,
"productType": "NRML",
"orderType": "LIMIT",
"orderSide": "BUY",
"timeInForce": "DAY",
"disclosedQuantity": 0,
"orderQuantity": 1,
"limitPrice": 1500,
"stopPrice": 0,
"orderUniqueIdentifier": "testtt",
"algoID": "21001",
"algoCategory": "211"
}`)
req, err := http.NewRequest("POST", url, bytes.NewBuffer(payload))
if err != nil {
fmt.Println("Error creating request:", err)
return
}
req.Header.Set("Authorization", "xxxxxxxxxx")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
res, err := client.Do(req)
if err != nil {
fmt.Println("Error sending request:", err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println("Error reading response:", err)
return
}
fmt.Println("Status Code:", res.StatusCode)
fmt.Println("Response:", string(body))
}
const axios = require("axios");
const url = "https://developers.symphonyfintech.in/1interactive/orders";
const payload = {
exchangeSegment: "NSECM",
exchangeInstrumentID: 2885,
productType: "NRML",
orderType: "LIMIT",
orderSide: "BUY",
timeInForce: "DAY",
disclosedQuantity: 0,
orderQuantity: 1,
limitPrice: 1500,
stopPrice: 0,
orderUniqueIdentifier: "testtt",
algoID: "21001",
algoCategory: "211"
};
const config = {
method: "post",
url,
headers: {
Authorization: "xxxxxxxxxx",
"Content-Type": "application/json"
},
data: payload
};
axios(config)
.then(response => {
console.log("Status:", response.status);
console.log("Response:", response.data);
})
.catch(error => {
if (error.response) {
console.error("Error Status:", error.response.status);
console.error("Error Data:", error.response.data);
} else {
console.error("Error:", error.message);
}
});
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
using var client = new HttpClient();
var url = "https://developers.symphonyfintech.in/1interactive/orders";
var payload = new
{
exchangeSegment = "NSECM",
exchangeInstrumentID = 2885,
productType = "NRML",
orderType = "LIMIT",
orderSide = "BUY",
timeInForce = "DAY",
disclosedQuantity = 0,
orderQuantity = 1,
limitPrice = 1500,
stopPrice = 0,
orderUniqueIdentifier = "testtt",
algoID = "21001",
algoCategory = "211"
};
var json = System.Text.Json.JsonSerializer.Serialize(payload);
var content = new StringContent(json, Encoding.UTF8, "application/json");
client.DefaultRequestHeaders.Add("Authorization", "xxxxxxxxxx");
var response = await client.PostAsync(url, content);
response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine("Response:");
Console.WriteLine(responseBody);
}
}
import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
public class Main {
public static void main(String[] args) {
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
String jsonPayload = """
{
"exchangeSegment": "NSECM",
"exchangeInstrumentID": 2885,
"productType": "NRML",
"orderType": "LIMIT",
"orderSide": "BUY",
"timeInForce": "DAY",
"disclosedQuantity": 0,
"orderQuantity": 1,
"limitPrice": 1500,
"stopPrice": 0,
"orderUniqueIdentifier": "testtt",
"algoID": "21001",
"algoCategory": "211"
}
""";
RequestBody body = RequestBody.create(jsonPayload, mediaType);
Request request = new Request.Builder()
.url("https://developers.symphonyfintech.in/1interactive/orders")
.post(body)
.addHeader("Authorization", "xxxxxxxxxx")
.addHeader("Content-Type", "application/json")
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println("Status Code: " + response.code());
System.out.println("Response: " + response.body().string());
} catch (Exception e) {
e.printStackTrace();
}
}
}
Modify Order API (PUT)
XTS provides the ability to modify open orders by allowing you to change a limit order to a market order (or vice versa), update the price or quantity of an open limit order, and modify the disclosed quantity or stop-loss of any open stop-loss order. Note : XTS considers open orders whose order status is either New, Replaced, PartiallyFilled.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| appOrderID |
AppOrderID
|
Y | It is system generated unique order number |
| modifiedProductType |
ProductType
|
Y |
ProductType
|
| modifiedOrderType |
OrderType
|
Y | OrderType |
| modifiedDisclosedQuantity |
Quantity
|
Y | Quantity to disclose (for equity) |
| modifiedOrderQuantity |
Quantity
|
Y | Quantity to transact. In terms of Lots |
| modifiedLimitPrice |
Price
|
Y | The price to execute the order at |
| modifiedStopPrice |
Price
|
Y | The price at which an order should be triggered (SL, SL-M) |
| modifiedTimeInForce |
TimeInForce
|
Y | TimeInForce |
| orderUniqueIdentifier |
OrderUniqueIdentifier
|
N | Echo back to identify order |
| apiOrderSource |
ApiOrderSource
|
N | API Order Source can be third party application name which you want to give to your order, which will be used to track your order with particular source. |
| clientID |
ClientID
|
N | Client ID Mandatory in case of Dealer |
Request Body JSON
{
"appOrderID": 2190766863,
"modifiedProductType": "NRML",
"modifiedOrderType": "LIMIT",
"modifiedOrderQuantity": 25,
"modifiedDisclosedQuantity": 0,
"modifiedLimitPrice": 255.65,
"modifiedStopPrice": 0,
"modifiedTimeInForce": "DAY",
"orderUniqueIdentifier": "123abc",
"apiOrderSource": "ThirdPartyAppName"
}
Response Body Parameters
| Parameter Name | Type | Description |
|---|---|---|
| AppOrderID |
AppOrderID
|
Unique order ID |
| OrderUniqueIdentifier |
OrderUniqueIdentifier
|
Echo back to identify order |
| ClientID |
ClientID
|
ClientID which is send in request body |
Response Body JSON
{
"type": "success",
"code": "s-orders-0001",
"description": "Request sent",
"result": {
"AppOrderID": 2190766863,
"OrderUniqueIdentifier": "123abc",
"ClientID": "SYMP1"
}
}
Code Examples
curl --location --request PUT 'https://developers.symphonyfintech.in/1interactive/orders' \
--header 'Authorization: xxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"appOrderID": "10001253450000041478",
"modifiedProductType": "NRML",
"modifiedOrderType": "LIMIT",
"modifiedOrderQuantity": 75,
"modifiedDisclosedQuantity": 0,
"modifiedLimitPrice": 28000,
"modifiedStopPrice": 0,
"modifiedTimeInForce": "DAY",
"orderUniqueIdentifier": "x12"
}'
import requests
import json
url = "https://developers.symphonyfintech.in/1interactive/orders"
payload = json.dumps({
"appOrderID": "10001253450000041478",
"modifiedProductType": "NRML",
"modifiedOrderType": "LIMIT",
"modifiedOrderQuantity": 75,
"modifiedDisclosedQuantity": 0,
"modifiedLimitPrice": 28000,
"modifiedStopPrice": 0,
"modifiedTimeInForce": "DAY",
"orderUniqueIdentifier": "x12"
})
headers = {
"Authorization": "xxxxxxxxxx",
"Content-Type": "application/json"
}
response = requests.request(
"PUT",
url,
headers=headers,
data=payload
)
print(response.text)
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://developers.symphonyfintech.in/1interactive/orders"
method := "PUT"
payload := strings.NewReader(`{
"appOrderID": "10001253450000041478",
"modifiedProductType": "NRML",
"modifiedOrderType": "LIMIT",
"modifiedOrderQuantity": 75,
"modifiedDisclosedQuantity": 0,
"modifiedLimitPrice": 28000,
"modifiedStopPrice": 0,
"modifiedTimeInForce": "DAY",
"orderUniqueIdentifier": "x12"
}`)
client := &http.Client{}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "xxxxxxxxxx")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
const axios = require("axios");
let data = JSON.stringify({
"appOrderID": "10001253450000041478",
"modifiedProductType": "NRML",
"modifiedOrderType": "LIMIT",
"modifiedOrderQuantity": 75,
"modifiedDisclosedQuantity": 0,
"modifiedLimitPrice": 28000,
"modifiedStopPrice": 0,
"modifiedTimeInForce": "DAY",
"orderUniqueIdentifier": "x12"
});
let config = {
method: "put",
maxBodyLength: Infinity,
url: "https://developers.symphonyfintech.in/1interactive/orders",
headers: {
"Authorization": "xxxxxxxxxx",
"Content-Type": "application/json"
},
data: data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
var client = new HttpClient();
var request = new HttpRequestMessage(
HttpMethod.Put,
"https://developers.symphonyfintech.in/1interactive/orders"
);
request.Headers.Add("Authorization", "xxxxxxxxxx");
var content = new StringContent(
"{\r\n" +
" \"appOrderID\": \"10001253450000041478\",\r\n" +
" \"modifiedProductType\": \"NRML\",\r\n" +
" \"modifiedOrderType\": \"LIMIT\",\r\n" +
" \"modifiedOrderQuantity\": 75,\r\n" +
" \"modifiedDisclosedQuantity\": 0,\r\n" +
" \"modifiedLimitPrice\": 28000,\r\n" +
" \"modifiedStopPrice\": 0,\r\n" +
" \"modifiedTimeInForce\": \"DAY\",\r\n" +
" \"orderUniqueIdentifier\": \"x12\"\r\n" +
"}",
null,
"application/json"
);
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(
mediaType,
"{\r\n" +
" \"appOrderID\": \"10001253450000041478\",\r\n" +
" \"modifiedProductType\": \"NRML\",\r\n" +
" \"modifiedOrderType\": \"LIMIT\",\r\n" +
" \"modifiedOrderQuantity\": 75,\r\n" +
" \"modifiedDisclosedQuantity\": 0,\r\n" +
" \"modifiedLimitPrice\": 28000,\r\n" +
" \"modifiedStopPrice\": 0,\r\n" +
" \"modifiedTimeInForce\": \"DAY\",\r\n" +
" \"orderUniqueIdentifier\": \"x12\"\r\n" +
"}"
);
Request request = new Request.Builder()
.url("https://developers.symphonyfintech.in/1interactive/orders")
.method("PUT", body)
.addHeader("Authorization", "xxxxxxxxxx")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
Cancel Order API (DELETE)
This API can be used to cancel any open order by providing the correct appOrderID that matches the selected open order. Note : XTS considers open orders whose order status is either New, Replaced, PartiallyFilled.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| AppOrderID |
AppOrderID
|
Y | Unique order ID |
| OrderUniqueIdentifier |
OrderUniqueIdentifier
|
Y | Echo back to identify order |
| ClientID |
ClientID
|
N | ClientID which is send in request body |
Response Body JSON
{
"type": "success",
"code": "s-user-0001",
"description": "Request sent",
"result": [
{
"AppOrderID": 1200043151,
"ClientID": "SYMP"
}
]
}
Code Examples
curl --location --request DELETE 'https://developers.symphonyfintech.in/1interactive/orders?appOrderID=1000125345' \ --header 'Authorization: xxxxxxxxxx' \ --data ''
import requests
url = "https://developers.symphonyfintech.in/1interactive/orders?appOrderID=1000125345"
payload = ""
headers = {
"Authorization": "xxxxxxxxxx"
}
response = requests.request(
"DELETE",
url,
headers=headers,
data=payload
)
print(response.text)
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://developers.symphonyfintech.in/1interactive/orders?appOrderID=1000125345"
method := "DELETE"
payload := strings.NewReader("")
client := &http.Client{}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "xxxxxxxxxx")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
const axios = require("axios");
let data = "";
let config = {
method: "delete",
maxBodyLength: Infinity,
url: "https://developers.symphonyfintech.in/1interactive/orders?appOrderID=1000125345",
headers: {
"Authorization": "xxxxxxxxxx"
},
data: data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
var client = new HttpClient();
var request = new HttpRequestMessage(
HttpMethod.Delete,
"https://developers.symphonyfintech.in/1interactive/orders?appOrderID=1000125345"
);
request.Headers.Add("Authorization", "xxxxxxxxxx");
var content = new StringContent(
"",
null,
"text/plain"
);
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(
mediaType,
""
);
Request request = new Request.Builder()
.url("https://developers.symphonyfintech.in/1interactive/orders?appOrderID=1000125345")
.method("DELETE", body)
.addHeader("Authorization", "xxxxxxxxxx")
.build();
Response response = client.newCall(request).execute();
CancelAll Order (POST)
This API can be called for a particular segment to either:
-
Cancel all open orders of the user by passing 0 in ExchangeInstrumentID in the request.
-
Cancel all open orders for a specific instrument by passing its ExchangeInstrumentID (e.g., 3045) in the request.
- For example:
-
If you pass ExchangeSegment: NSECM and ExchangeInstrumentID: 0, it will cancel all open orders for NSECM for that user.
-
If you pass ExchangeSegment: NSECM and ExchangeInstrumentID: 3045, it will cancel all open orders for NSECM SBIN (3045) for that user.
Note : XTS considers open orders whose order status is either New, Replaced, PartiallyFilled.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| exchangeSegment |
ExchangeSegment
|
Y |
ExchangeSegment
|
| exchangeInstrumentID |
ExchangeInstrumentID
|
Y | Exchange Scrip code or Symbol Token is unique identifier |
| clientID |
ClientID
|
N | Client ID Mandatory in case of Dealer |
Request Body JSON
[
{
"exchangeSegment": "NSECM",
"exchangeInstrumentID": 3045
}
]
Response Body JSON
{
"type": "success",
"code": "s-cancelAll-0001",
"description": "Cancel All Order Request Send Successfully",
"result": ""
}
Code Examples
curl --location 'https://developers.symphonyfintech.in/1interactive/orders/cancelall' \
--header 'Authorization: xxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"exchangeSegment": "NSECM",
"exchangeInstrumentID": "1333"
}'
import requests
import json
url = "https://developers.symphonyfintech.in/1interactive/orders/cancelall"
payload = json.dumps({
"exchangeSegment": "NSECM",
"exchangeInstrumentID": "1333"
})
headers = {
"Authorization": "xxxxxxxxxx",
"Content-Type": "application/json"
}
response = requests.request(
"POST",
url,
headers=headers,
data=payload
)
print(response.text)
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://developers.symphonyfintech.in/1interactive/orders/cancelall"
method := "POST"
payload := strings.NewReader(`{
"exchangeSegment": "NSECM",
"exchangeInstrumentID": "1333"
}`)
client := &http.Client{}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "xxxxxxxxxx")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
const axios = require("axios");
let data = JSON.stringify({
"exchangeSegment": "NSECM",
"exchangeInstrumentID": "1333"
});
let config = {
method: "post",
maxBodyLength: Infinity,
url: "https://developers.symphonyfintech.in/1interactive/orders/cancelall",
headers: {
"Authorization": "xxxxxxxxxx",
"Content-Type": "application/json"
},
data: data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
var client = new HttpClient();
var request = new HttpRequestMessage(
HttpMethod.Post,
"https://developers.symphonyfintech.in/1interactive/orders/cancelall"
);
request.Headers.Add("Authorization", "xxxxxxxxxx");
var content = new StringContent(
"{\r\n" +
" \"exchangeSegment\": \"NSECM\",\r\n" +
" \"exchangeInstrumentID\": \"1333\"\r\n" +
"}",
null,
"application/json"
);
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(
mediaType,
"{\r\n" +
" \"exchangeSegment\": \"NSECM\",\r\n" +
" \"exchangeInstrumentID\": \"1333\"\r\n" +
"}"
);
Request request = new Request.Builder()
.url("https://developers.symphonyfintech.in/1interactive/orders/cancelall")
.method("POST", body)
.addHeader("Authorization", "xxxxxxxxxx")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
Cover orders (CO)
Place Cover Order (POST)
A Cover Order (CO) is an advanced intraday order that is always accompanied by a
mandatory Stop-Loss Order.
This helps users minimize potential losses by safeguarding against unexpected market movements.
A Cover Order offers high leverage and is available in the following segments:
-
Equity Cash
-
Equity F&O
-
Commodity F&O
-
Currency F&O
A Cover Order consists of embedded orders:
-
Limit/Market Order
The investor aims to enter a trade at either the best available market price or a desired limit price of the asset at that time. -
Stop-Loss Order
The main order is always accompanied by a Stop-Loss Order and the position is squared off automatically if the market price reaches the specified stop-loss price. -
The stop-loss order can be modified but cannot be cancelled.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| exchangeSegment |
ExchangeSegment
|
Y |
ExchangeSegment
|
| exchangeInstrumentID |
ExchangeInstrumentID
|
Y | Exchange Scrip code or Symbol Token is unique identifier |
| orderType |
OrderType
|
Y |
OrderType
|
| orderSide |
OrderSide
|
Y |
OrderSide
|
| disclosedQuantity |
DisclosedQuantity
|
Y | Quantity to disclose (for equity) |
| orderQuantity |
Quantity
|
Y | Quantity to transact. In terms of Lots |
| limitPrice |
Price
|
Y | The price to execute the order at |
| stopPrice |
Price
|
Y | The price at which an order should be triggered (SL, SL-M) |
| orderUniqueIdentifier |
OrderUniqueIdentifier
|
N | Echo back to identify order |
| apiOrderSource |
ApiOrderSource
|
N | API Order Source can be third party application name which you want to give to your order, which will be used to track your order with particular source. |
| clientID |
ClientID
|
N | ClientID Mandatory in case of Dealer |
Request Body JSON
{
"exchangeSegment": "NSECM",
"exchangeInstrumentID": 3045,
"orderSide": "BUY",
"orderQuantity": 15,
"disclosedQuantity": 0,
"limitPrice": 254.55,
"stopPrice": 251.5,
"orderType": "LIMIT",
"orderUniqueIdentifier": "123abc",
"clientID": "SYMP1",
"apiOrderSource": "ThirdPartyAppName"
}
Response Body Parameters
| Parameter Name | Type | Description |
|---|---|---|
| EntryAppOrderID |
EntryAppOrderID
|
The unique order ID for the main/entry order |
| ExitAppOrderID |
ExitAppOrderID
|
The unique order ID for the linked exit order (Stop-Loss or Target) |
| OrderUniqueIdentifier |
OrderUniqueIdentifier
|
Echo back to identify order |
| ClientID |
ClientID
|
ClientID which is send in request body |
Response Body JSON
{
"type": "success",
"code": "s-orders-0001",
"description": "Request sent",
"result": {
"EntryAppOrderID": 1323797170,
"ExitAppOrderID": 3727296468,
"OrderUniqueIdentifier": "123abc",
"ClientID": "SYMP1"
}
}
Code Examples
Exit Cover Order (PUT)
The Exit Cover API allows the user to easily exit an open stop-loss order by converting it into an exit order.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| appOrderID |
AppOrderID
|
Y | Unique order ID |
| orderUniqueIdentifier |
OrderUniqueIdentifier
|
N | Echo back to identify order |
| clientID |
ClientID
|
N | Client ID Mandatory in case of Dealer |
Request Body JSON
{
"appOrderID": 3727296468,
"OrderUniqueIdentifier": "123abc",
"ClientID": "SYMP1"
}
Response Body Parameters
| Parameter Name | Type | Description |
|---|---|---|
| AppOrderID |
AppOrderID
|
Unique order ID |
| OrderUniqueIdentifier |
OrderUniqueIdentifier
|
Echo back to identify order |
| ClientID |
ClientID
|
ClientID which is send in request body |
Response Body JSON
{
"type": "success",
"code": "s-orders-0001",
"description": "Request sent",
"result": {
"AppOrderID": 3727296468,
"ClientID": "SYMP1"
}
}
Code Examples
Bracket Order
Bracket Order (POST)
Bracket Order (BO) is a type of order where you can enter a new position along with a target/exit and a stop-loss order.
-
As soon as the main order is executed, the system will automatically place two more orders:
- - A profit-taking order
- - A stop-loss order
-
When either the profit-taking order or the stop-loss order is executed, the other order is automatically cancelled.
Bracket Orders are essentially algorithmic orders.
-
Entry with Bracket Orders can be done using Limit Orders or Stop-Loss Orders based on triggers.
-
The stop-loss for exit will always be an SL order.
You can also use a Trailing Stop-Loss. This means:
-
If the contract/stock moves in your favor (i.e., the position becomes profitable) by a certain number of ticks, the stop-loss will automatically adjust upward or downward based on whether you are long or short.
Using a trailing stop-loss is optional, but if you enable it, you cannot modify the Bracket Order after placement.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| exchangeSegment |
ExchangeSegment
|
Y |
ExchangeSegment
|
| exchangeInstrumentID |
ExchangeInstrumentID
|
Y | Exchange Scrip code or Symbol Token is unique identifier |
| orderType |
OrderType
|
Y |
OrderType
|
| orderSide |
OrderSide
|
Y |
OrderSide
|
| disclosedQuantity |
Quantity
|
Y | Quantity to disclose (for equity) |
| orderQuantity |
Quantity
|
Y | Quantity to transact. In terms of Lots |
| limitPrice |
Price
|
Y | The price to execute the order at |
| stopLossPrice |
StopLossPrice
|
Y | A stoploss price is the price in a stop order that triggers the creation of a market order. |
| squarOff |
SquarOff
|
Y | Represents the profit-taking offset value |
| trailingStoploss |
TrailingStoploss
|
Y | It is an incremental value (in ticks or price units) that moves your stop-loss in the profitable direction |
| orderUniqueIdentifier |
OrderUniqueIdentifier
|
N | Echo back to identify order |
| apiOrderSource |
ApiOrderSource
|
N | API Order Source can be third party application name which you want to give to your order, which will be used to track your order with particular source. |
| clientID |
ClientID
|
N | ClientID Mandatory in case of Dealer |
Request Body JSON
{
"exchangeSegment": "NSECM",
"exchangeInstrumentID": 3045,
"orderType": "LIMIT",
"orderSide": "BUY",
"disclosedQuantity": 0,
"orderQuantity": 15,
"limitPrice": 254.55,
"stopLossPrice": 245.55,
"squarOff": 5,
"trailingStoploss": 5,
"orderUniqueIdentifier": "123abc",
"apiOrderSource": "ThirdPartyAppName",
"clientID": "SYMP1"
}
Response Body Parameters
| Parameter Name | Type | Description |
|---|---|---|
| AppOrderID |
AppOrderID
|
Unique order ID |
| OrderUniqueIdentifier |
OrderUniqueIdentifier
|
Echo back to identify order |
| ClientID |
ClientID
|
ClientID which is sent in request body |
Response Body JSON
{
"type": "success",
"code": "s-bracketorders-0002",
"description": "Request sent",
"result": {
"AppOrderID": 1290766863,
"OrderUniqueIdentifier": "123abc",
"ClientID": "SYMP1"
}
}
Code Examples
curl --location 'https://developers.symphonyfintech.in/1interactive/orders/bracket' \
--header 'Authorization: xxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"exchangeSegment": "NSECM",
"exchangeInstrumentID": 2885,
"orderType": "LIMIT",
"orderSide": "BUY",
"orderQuantity": 1,
"disclosedQuantity": 0,
"limitPrice": 1250,
"stopLossPrice": 20,
"squareOff": 20,
"trailingStopLoss": 0,
"apiOrderSource": "WEB",
"clientID": "SYMPH",
"orderUniqueIdentifier": "TEST123"
}'
import requests
import json
url = "https://developers.symphonyfintech.in/1interactive/orders/bracket"
payload = json.dumps({
"exchangeSegment": "NSECM",
"exchangeInstrumentID": 2885,
"orderType": "LIMIT",
"orderSide": "BUY",
"orderQuantity": 1,
"disclosedQuantity": 0,
"limitPrice": 1250,
"stopLossPrice": 20,
"squareOff": 20,
"trailingStopLoss": 0,
"apiOrderSource": "WEB",
"clientID": "SYMPH",
"orderUniqueIdentifier": "TEST123"
})
headers = {
"Authorization": "xxxxxx",
"Content-Type": "application/json"
}
response = requests.post(url, headers=headers, data=payload)
print(response.text)
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://developers.symphonyfintech.in/1interactive/orders/bracket"
method := "POST"
payload := strings.NewReader(`{
"exchangeSegment": "NSECM",
"exchangeInstrumentID": 2885,
"orderType": "LIMIT",
"orderSide": "BUY",
"orderQuantity": 1,
"disclosedQuantity": 0,
"limitPrice": 1250,
"stopLossPrice": 20,
"squareOff": 20,
"trailingStopLoss": 0,
"apiOrderSource": "WEB",
"clientID": "SYMPH",
"orderUniqueIdentifier": "TEST123"
}`)
client := &http.Client{}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "xxxxxx")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
const axios = require('axios');
let data = JSON.stringify({
"exchangeSegment": "NSECM",
"exchangeInstrumentID": 2885,
"orderType": "LIMIT",
"orderSide": "BUY",
"orderQuantity": 1,
"disclosedQuantity": 0,
"limitPrice": 1250,
"stopLossPrice": 20,
"squareOff": 20,
"trailingStopLoss": 0,
"apiOrderSource": "WEB",
"clientID": "SYMPH",
"orderUniqueIdentifier": "TEST123"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://developers.symphonyfintech.in/1interactive/orders/bracket',
headers: {
'Authorization': 'xxxxxx',
'Content-Type': 'application/json'
},
data: data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://developers.symphonyfintech.in/1interactive/orders/bracket");
request.Headers.Add("Authorization", "xxxxxx");
var content = new StringContent(
@"{
""exchangeSegment"": ""NSECM"",
""exchangeInstrumentID"": 2885,
""orderType"": ""LIMIT"",
""orderSide"": ""BUY"",
""orderQuantity"": 1,
""disclosedQuantity"": 0,
""limitPrice"": 1250,
""stopLossPrice"": 20,
""squareOff"": 20,
""trailingStopLoss"": 0,
""apiOrderSource"": ""WEB"",
""clientID"": ""SYMPH"",
""orderUniqueIdentifier"": ""TEST123""
}",
System.Text.Encoding.UTF8,
"application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n" +
" \"exchangeSegment\": \"NSECM\",\r\n" +
" \"exchangeInstrumentID\": 2885,\r\n" +
" \"orderType\": \"LIMIT\",\r\n" +
" \"orderSide\": \"BUY\",\r\n" +
" \"orderQuantity\": 1,\r\n" +
" \"disclosedQuantity\": 0,\r\n" +
" \"limitPrice\": 1250,\r\n" +
" \"stopLossPrice\": 20,\r\n" +
" \"squareOff\": 20,\r\n" +
" \"trailingStopLoss\": 0,\r\n" +
" \"apiOrderSource\": \"WEB\",\r\n" +
" \"clientID\": \"SYMPH\",\r\n" +
" \"orderUniqueIdentifier\": \"TEST123\"\r\n" +
"}");
Request request = new Request.Builder()
.url("https://developers.symphonyfintech.in/1interactive/orders/bracket")
.method("POST", body)
.addHeader("Authorization", "xxxxxx")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
Modify Bracket Order (PUT)
XTS provides the ability to modify open bracket orders by allowing you to update the quantity, limit price, and stop-loss price of an open entry order.
-
You can change the limit price of an open target order.
-
You can change the stop-loss price of any open stop-loss order.
- However:
-
When modifying a stop-loss order, the limit price will not be updated.
-
Similarly, when modifying a profit (target) order, the stop-loss price will not be updated.
Note : XTS considers open orders whose order status is either New, Replaced, PartiallyFilled.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| appOrderID |
AppOrderID
|
Y | Unique order ID |
| orderQuantity |
OrderQuantity
|
Y | Quantity to transact. In terms of Lots |
| limitPrice |
Price
|
Y | The price to execute the order at |
| stopLossPrice |
Price
|
Y | A stop loss price is the price in a stop order that triggers the creation of a market order. |
| orderUniqueIdentifier |
OrderUniqueIdentifier
|
N | Echo back to identify order |
| apiOrderSource |
ApiOrderSource
|
N | API Order Source can be a third party application name which you want to give to your order, which will be used to track your order with a particular source. |
| clientID |
ClientID
|
N | ClientID Mandatory in case of Dealer |
Request Body JSON
{
"appOrderID": 1290766863,
"orderQuantity": 15,
"limitPrice": 254.55,
"stopLossPrice": 245.55,
"orderUniqueIdentifier": "123abc",
"apiOrderSource": "ThirdPartyAppName",
"clientID": "SYMP1"
}
Response Body Parameters
| Parameter Name | Type | Description |
|---|---|---|
| AppOrderID |
AppOrderID
|
Unique order ID |
| OrderUniqueIdentifier |
OrderUniqueIdentifier
|
Echo back to identify order |
| ClientID |
ClientID
|
ClientID which is send in request body |
Response Body JSON
{
"type": "success",
"code": "s-bracketorder-0008",
"description": "Request sent",
"result": {
"AppOrderID": 1290766863,
"orderUniqueIdentifier": "123abc",
"ClientID": "SYMP1"
}
}
Code Examples
curl --location --request PUT 'https://developers.symphonyfintech.in/1interactive/orders/bracket' \
--header 'Authorization: xxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"limitPrice": "1251",
"stopLossPrice": "21",
"orderQuantity": "1",
"appOrderID": "1800125097"
}'
import requests
import json
url = "https://developers.symphonyfintech.in/1interactive/orders/bracket"
payload = json.dumps({
"limitPrice": "1251",
"stopLossPrice": "21",
"orderQuantity": "1",
"appOrderID": "1800125097"
})
headers = {
"Authorization": "xxxxxx",
"Content-Type": "application/json"
}
response = requests.put(url, headers=headers, data=payload)
print(response.text)
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://developers.symphonyfintech.in/1interactive/orders/bracket"
method := "PUT"
payload := strings.NewReader(`{
"limitPrice": "1251",
"stopLossPrice": "21",
"orderQuantity": "1",
"appOrderID": "1800125097"
}`)
client := &http.Client{}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "xxxxxx")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
const axios = require('axios');
let data = JSON.stringify({
"limitPrice": "1251",
"stopLossPrice": "21",
"orderQuantity": "1",
"appOrderID": "1800125097"
});
let config = {
method: 'put',
maxBodyLength: Infinity,
url: 'https://developers.symphonyfintech.in/1interactive/orders/bracket',
headers: {
'Authorization': 'xxxxxx',
'Content-Type': 'application/json'
},
data: data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://developers.symphonyfintech.in/1interactive/orders/bracket");
request.Headers.Add("Authorization", "xxxxxx");
var content = new StringContent(
@"{
""limitPrice"": ""1251"",
""stopLossPrice"": ""21"",
""orderQuantity"": ""1"",
""appOrderID"": ""1800125097""
}",
System.Text.Encoding.UTF8,
"application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n" +
" \"limitPrice\": \"1251\",\r\n" +
" \"stopLossPrice\": \"21\",\r\n" +
" \"orderQuantity\": \"1\",\r\n" +
" \"appOrderID\": \"1800125097\"\r\n" +
"}");
Request request = new Request.Builder()
.url("https://developers.symphonyfintech.in/1interactive/orders/bracket")
.method("PUT", body)
.addHeader("Authorization", "xxxxxx")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
Cancel Bracket Order (Delete)
This API can be used to cancel any open Bracket Order by providing the correct BOEntryOrderID that matches the selected open order to be cancelled.
URL
Note : XTS considers open orders whose order status is either New, Replaced, PartiallyFilled.
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| boEntryOrderId |
AppOrderID
|
Y | Unique order ID |
| orderUniqueIdentifier |
OrderUniqueIdentifier
|
N | Echo back to identify order |
| clientID |
ClientID
|
N | Client ID mandatory in case of Dealer |
Response Body Parameters
| Parameter Name | Type | Description |
|---|---|---|
| AppOrderID |
AppOrderID
|
Unique order ID |
| OrderUniqueIdentifier |
OrderUniqueIdentifier
|
Echo back to identify order |
| ClientID |
ClientID
|
ClientID which is send in request body |
Response Body JSON
{
"type": "success",
"code": "s-bracketorder-0014",
"description": "Request sent",
"result": {
"AppOrderID": 1290766863,
"ClientID": "SYMP1"
}
}
Code Examples
OrderBook And TradeBook
OrderBook (GET)
The Order Book contains the status of all orders placed by a user. The possible states of an order are referred to as the Order Status.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| clientID |
ClientID
|
N | Client ID Mandatory in case of Dealer |
Response Body Parameters
| Parameter Name | Type | Description |
|---|---|---|
| LoginID |
UserID
|
User login ID |
| ClientID |
ClientID
|
User specific identification |
| AppOrderID |
AppOrderID
|
Unique order ID |
| OrderReferenceID |
OrderReferenceID
|
It is unique OrderReferenceID to identify more than 1 leg orders. |
| GeneratedBy |
GeneratedBy
|
It represents Source |
| ExchangeOrderID |
ExchangeOrderID
|
It is unique OrderID generated by exchange |
| OrderCategoryType |
OrderCategoryType
|
It represents order market type, i.e.
MarketType
|
| ExchangeSegment |
ExchangeSegment
|
ExchangeSegment
|
| ExchangeInstrumentID |
ExchangeInstrumentID
|
Exchange Scrip code or Symbol Token is unique identifier |
| OrderSide |
OrderSide
|
OrderSide
|
| OrderType |
OrderType
|
OrderType
|
| ProductType |
ProductType
|
ProductType
|
| TimeInForce |
TimeInForce
|
TimeInForce
|
| OrderPrice |
Price
|
The price to execute the order at |
| OrderQuantity |
Quantity
|
Quantity to transact |
| OrderStopPrice |
Price
|
The price at which an order should be triggered (SL, SL-M) |
| OrderStatus |
OrderStatus
|
It is the status of order i.e.
OrderStatus |
| OrderAverageTradedPrice | OrderAverageTradedPrice |
Average traded price, also referred as a Volume-Weighted Average Price |
| LeavesQuantity |
Quantity
|
The remaining shares still left to buy/sell of a single instrument on an order. |
| CumulativeQuantity |
Quantity
|
The total number of shares bought/sold on a single order for a single instrument |
| OrderDisclosedQuantity |
Quantity
|
Quantity to disclose (for equity) |
| OrderGeneratedDateTime |
Timestamps
|
Timestamp at which the order was registered by the API |
| ExchangeTransactTime |
Timestamps
|
Timestamp at which the order was registered by the exchange |
| LastUpdateDateTime |
Timestamps
|
Timestamp at which an order's state changed |
| OrderExpiryDate |
OrderExpiryDate
|
It is order expiry date of order when validity set to GTD (Good Till Date) |
| CancelRejectReason |
RejectReason
|
It is reason if order rejected or canceled |
| OrderUniqueIdentifier |
OrderUniqueIdentifier
|
Echo back to identify order (20 char length) |
| OrderLegStatus |
OrderLegStatus
|
It represents type of order i.e.
OrderLegStatus |
| BoLegDetails |
BoLegDetails
|
Bracket Order Leg details i.e.
BoLegDetails |
| IsSpread |
IsSpread
|
Indicates Spread order or normal order |
| BoEntryOrderID |
AppOrderID
|
Unique order ID |
| MessageCode |
MessageCode
|
API MessageCode |
| MessageVersion |
MessageVersion
|
API Message Version |
| TokenID |
TokenID
|
API TokenID |
| ApplicationType |
ApplicationType
|
API ApplicationType |
| SequenceNumber |
SequenceNumber
|
API SequenceNumber |
Response Body JSON
{
"type": "success",
"code": "s-user-0001",
"description": "Success order book",
"result": [
{
"LoginID": "SYMP1",
"ClientID": "SYMP1",
"AppOrderID": 648468730,
"OrderReferenceID": "",
"GeneratedBy": "TWSAPI",
"ExchangeOrderID": "1005239196374108",
"OrderCategoryType": "NORMAL",
"ExchangeSegment": "NSECM",
"ExchangeInstrumentID": 16921,
"OrderSide": "BUY",
"OrderType": "Limit",
"ProductType": "NRML",
"TimeInForce": "DAY",
"OrderPrice": 254.55,
"OrderQuantity": 15,
"OrderStopPrice": 0,
"OrderStatus": "New",
"OrderAverageTradedPrice": 250.4,
"LeavesQuantity": 1,
"CumulativeQuantity": 0,
"OrderDisclosedQuantity": 0,
"OrderGeneratedDateTime": "14-05-2021 11:17:29",
"ExchangeTransactTime": "14-05-2021 11:17:30",
"LastUpdateDateTime": "14-05-2021 11:17:29",
"OrderExpiryDate": "01-01-1980 00:00:00",
"CancelRejectReason": "",
"OrderUniqueIdentifier": "123abc",
"OrderLegStatus": "SingleOrderLeg",
"BoLegDetails": 0,
"IsSpread": false,
"BoEntryOrderId": "",
"MessageCode": 9004,
"MessageVersion": 4,
"TokenID": 0,
"ApplicationType": 0,
"SequenceNumber": 0
}
]
}
Code Examples
import requests
url = "https://developers.symphonyfintech.in/1interactive/orders"
headers = {
"Authorization": "xxxxxx"
}
response = requests.get(url, headers=headers)
print(response.text)
TradeBook (GET)
The trade book returns a list of all trades executed on a particular day that were placed by the user. It displays all filled and partially filled orders.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| clientID |
ClientID
|
N | Client ID Mandatory in case of Dealer |
Response Body Parameters
| Parameter Name | Type | Description |
|---|---|---|
| LoginID |
UserID
|
User login ID |
| ClientID |
ClientID
|
User specific identification |
| AppOrderID |
AppOrderID
|
Unique order ID |
| OrderReferenceID |
OrderReferenceID
|
It is unique OrderReferenceID to identify more than 1 leg orders. |
| GeneratedBy |
GeneratedBy
|
It represents
Source
|
| ExchangeOrderID |
ExchangeOrderID
|
It is unique OrderID generated by exchange |
| OrderCategoryType |
OrderCategoryType
|
It represents order market type, i.e.
MarketType
|
| ExchangeSegment |
ExchangeSegment
|
ExchangeSegment
|
| ExchangeInstrumentID |
ExchangeInstrumentID
|
Exchange Scrip code or Symbol Token is unique identifier |
| OrderSide |
OrderSide
|
OrderSide
|
| OrderType |
OrderType
|
OrderType
|
| ProductType |
ProductType
|
ProductType
|
| TimeInForce |
TimeInForce
|
TimeInForce
|
| OrderPrice |
Price
|
The price to execute the order at |
| OrderQuantity |
Quantity
|
Quantity to transact |
| OrderStopPrice |
Price
|
The price at which an order should be triggered (SL, SL-M) |
| OrderStatus |
OrderStatus
|
It is the status of order i.e.
OrderStatus
|
| OrderAverageTradedPrice |
Price
|
Average traded price, also referred as Volume-Weighted Average Price |
| LeavesQuantity |
Quantity
|
The remaining shares still left to buy/sell of a single instrument on an order. |
| CumulativeQuantity |
Quantity
|
The total number of shares bought/sold on a single order for a single instrument |
| OrderDisclosedQuantity |
Quantity
|
Quantity to disclose (for equity) |
| OrderGeneratedDateTime |
Timestamps
|
Timestamp at which the order was registered by the API |
| ExchangeTransactTime |
Timestamps
|
Timestamp at which the order was registered by the exchange |
| LastUpdateDateTime |
Timestamps
|
Timestamp at which an order's state changed |
| OrderExpiryDate |
OrderExpiryDate
|
It is order expiry date when validity set to GTD (Good Till Date) |
| CancelRejectReason |
RejectReason
|
It is reason if order rejected or canceled |
| OrderUniqueIdentifier |
OrderUniqueIdentifier
|
Echo back to identify order (20 char length) |
| OrderLegStatus |
OrderLegStatus
|
It represents type of order i.e.
OrderLegStatus |
| BoLegDetails |
BoLegDetails
|
Bracket Order Leg details i.e.
BoLegDetails |
| IsSpread |
IsSpread
|
Indicates Spread order or normal order |
| BoEntryOrderID |
AppOrderID
|
Unique order ID |
| MessageCode |
MessageCode
|
API MessageCode |
| MessageVersion |
MessageVersion
|
API Message Version |
| TokenID |
TokenID
|
API TokenID |
| ApplicationType |
ApplicationType
|
API ApplicationType |
| SequenceNumber |
SequenceNumber
|
API SequenceNumber |
Response Body JSON
{
"type": "success",
"code": "s-orders-0001",
"description": "Success trade book",
"result": [
{
"LoginID": "SYMP",
"ClientID": "SYMP",
"AppOrderID": 648468731,
"OrderReferenceID": "",
"GeneratedBy": "TWSAPI",
"ExchangeOrderID": "1005239196374109",
"OrderCategoryType": "NORMAL",
"ExchangeSegment": "NSECM",
"ExchangeInstrumentID": "16921",
"OrderSide": "BUY",
"OrderType": "Limit",
"ProductType": "NRML",
"TimeInForce": "DAY",
"OrderPrice": 254.55,
"OrderQuantity": 1,
"OrderStopPrice": 0,
"OrderStatus": "Filled",
"OrderAverageTradedPrice": 254.55,
"LeavesQuantity": 0,
"CumulativeQuantity": 1,
"OrderDisclosedQuantity": 0,
"OrderGeneratedDateTime": "14-05-2021 11:17:29",
"ExchangeTransactTime": "14-05-2021 11:17:30",
"LastUpdateDateTime": "14-05-2021 11:17:29",
"OrderUniqueIdentifier": "123abc",
"OrderLegStatus": "SingleOrderLeg",
"LastTradedPrice": 254.55,
"LastTradedQuantity": 1,
"LastExecutionTransactTime": "14-05-2021 11:17:29",
"ExecutionID": "3308927",
"ExecutionReportIndex": 3,
"IsSpread": false,
"MessageCode": 9005,
"MessageVersion": 4,
"TokenID": 0,
"ApplicationType": 0,
"SequenceNumber": 0
}
]
}
Code Examples
curl --location 'https://developers.symphonyfintech.in/1interactive/orders/trades' \ --header 'Authorization: xxxxxx'
Order History (GET)
Order History provides the complete trail of a particular order, showing all its state
changes.
For example: New → New, New → Partially Filled, Partially Filled → Partially Filled, and
Partially Filled → Filled, etc.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| appOrderID |
UserID
|
N | Unique order ID |
Response Body Parameters
| Parameter Name | Type | Description |
|---|---|---|
| LoginID |
UserID
|
User login ID |
| ClientID |
ClientID
|
User specific identification |
| AppOrderID |
AppOrderID
|
Unique order ID |
| OrderReferenceID |
OrderReferenceID
|
Unique OrderReferenceID to identify multi-leg orders |
| GeneratedBy |
GeneratedBy
|
Represents source from which operation was performed |
| ExchangeOrderID |
ExchangeOrderID
|
Unique Order ID generated by exchange |
| OrderCategoryType |
OrderCategoryType
|
Represents order market type |
| ExchangeSegment |
ExchangeSegment
|
Exchange Segment |
| ExchangeInstrumentID |
ExchangeInstrumentID
|
Exchange scrip code or symbol token |
| OrderSide |
OrderSide
|
Order side (Buy / Sell) |
| OrderType |
OrderType
|
Type of order (Limit / Market / SL / SL-M) |
| ProductType |
ProductType
|
Product type of order |
| OrderStatus |
OrderStatus
|
Status of the order |
| TokenID |
TokenID
|
API Token ID |
| ApplicationType |
ApplicationType
|
API application type |
| SequenceNumber |
SequenceNumber
|
API sequence number |
Response Body JSON
{
"type": "success",
"code": "s-orders-0001",
"description": "Success order history",
"result": [
{
"LoginID": "SYMP1",
"ClientID": "SYMP1",
"AppOrderID": 648468730,
"OrderReferenceID": "",
"GeneratedBy": "TWSAPI",
"ExchangeOrderID": "1005239196374108",
"OrderCategoryType": "NORMAL",
"ExchangeSegment": "NSECM",
"ExchangeInstrumentID": 16921,
"OrderSide": "BUY",
"OrderType": "Limit",
"ProductType": "NRML",
"TimeInForce": "DAY",
"OrderPrice": 254.55,
"OrderQuantity": 15,
"OrderStopPrice": 0,
"OrderStatus": "New",
"OrderAverageTradedPrice": 250.4,
"LeavesQuantity": 1,
"CumulativeQuantity": 0,
"OrderDisclosedQuantity": 0,
"OrderGeneratedDateTime": "14-05-2021 11:17:29",
"ExchangeTransactTime": "14-05-2021 11:17:30",
"LastUpdateDateTime": "14-05-2021 11:17:29",
"OrderExpiryDate": "01-01-1980 00:00:00",
"CancelRejectReason": "",
"OrderUniqueIdentifier": "123abc",
"OrderLegStatus": "SingleOrderLeg",
"BoLegDetails": 0,
"IsSpread": false,
"BoEntryOrderId": "",
"MessageCode": 9004,
"MessageVersion": 4,
"TokenID": 0,
"ApplicationType": 0,
"SequenceNumber": 0
}
]
}
Code Examples
curl --location 'https://developers.symphonyfintech.in/1interactive/orders?appOrderID=3727296468' \ --header 'Authorization: xxxxxx' \ --data ''
Spread Orders
Place Spread Order (POST)
Places a spread order involving spread instruments (buy/sell) in a single request, ensuring all legs are executed together.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| exchangeSegment |
ExchangeSegment
|
Y |
Exchange Segment
|
| exchangeInstrumentID |
ExchangeInstrumentID
|
Y | Exchange Scrip code or Symbol Token is unique identifier |
| productType |
ProductType
|
Y |
ProductType
|
| action |
Action
|
Y |
OrderSide
|
| orderType |
OrderType
|
Y |
OrderType
|
| orderDuration |
OrderDuration
|
Y |
TimeInForce
|
| quantity |
OrderQuantity
|
Y | Quantity to transact. In terms of Lots |
| spreadPrice |
Price
|
Y | Spread Price difference |
| totalPrice |
Price
|
N | Total price used in some spread structures |
| leg1ExchangeSegment |
ExchangeSegment
|
Y | Exchange segment for Leg 1 |
| leg1ExchangeInstrumentID |
ExchangeInstrumentID
|
Y | Instrument token for Leg 1 |
| leg2ExchangeSegment |
ExchangeSegment
|
Y | Exchange segment for Leg 2 |
| leg2ExchangeInstrumentID |
ExchangeInstrumentID
|
Y | Instrument token for Leg 2 |
| spreadExchangeInstrumentID |
ExchangeInstrumentID
|
Y | Main spread instrument ID |
| apiOrderSource |
ApiOrderSource
|
N | API Order Source can be third party application name which you want to give to your order, which will be used to track your order with particular source. |
| clientID |
ClientID
|
N | Client ID Mandatory in case of Dealer |
| userID |
UserID
|
N | User ID authenticated for API |
Request Body JSON
{
"exchangeSegment": "NSEFO",
"exchangeInstrumentID": 13620424,
"productType": "NRML",
"action": "BUY",
"orderType": "LIMIT",
"orderDuration": "DAY",
"quantity": "75",
"spreadPrice": 1000,
"totalPrice": 0,
"leg1ExchangeSegment": "NSEFO",
"leg1ExchangeInstrumentID": 53001,
"leg2ExchangeSegment": "NSEFO",
"leg2ExchangeInstrumentID": 52168,
"spreadExchangeInstrumentID": 13620424,
"apiOrderSource": "WEB",
"clientID": "SYMP",
"userID": "SYMPTEST"
}
Response Body JSON
{
"type": "success",
"code": "s-spreadorder-0001",
"description": "Spread order place successfully",
"result": {}
}
Code Examples
curl --location 'https://developers.symphonyfintech.in/1interactive/orders/spread' \
--header 'Authorization: xxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"exchangeSegment": "NSEFO",
"exchangeInstrumentID": "39543",
"productType": "NRML",
"action": "Buy",
"orderDuration": "DAY",
"quantity": "75",
"spreadPrice": 100,
"leg1ExchangeSegment": "NSEFO",
"leg1ExchangeInstrumentID": 49953,
"leg2ExchangeSegment": "NSEFO",
"leg2ExchangeInstrumentID": 48772,
"spreadExchangeInstrumentID": 12836740,
"apiOrderSource": "WEB",
"clientID": "SYMPH"
}'
import requests
import json
url = "https://developers.symphonyfintech.in/1interactive/orders/spread"
payload = json.dumps({
"exchangeSegment": "NSEFO",
"exchangeInstrumentID": "39543",
"productType": "NRML",
"action": "Buy",
"orderDuration": "DAY",
"quantity": "75",
"spreadPrice": 100,
"leg1ExchangeSegment": "NSEFO",
"leg1ExchangeInstrumentID": 49953,
"leg2ExchangeSegment": "NSEFO",
"leg2ExchangeInstrumentID": 48772,
"spreadExchangeInstrumentID": 12836740,
"apiOrderSource": "WEB",
"clientID": "SYMPH"
})
headers = {
"Authorization": "xxxxxx",
"Content-Type": "application/json"
}
response = requests.request(
"POST",
url,
headers=headers,
data=payload
)
print(response.text)
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://developers.symphonyfintech.in/1interactive/orders/spread"
method := "POST"
payload := strings.NewReader(`{
"exchangeSegment": "NSEFO",
"exchangeInstrumentID": "39543",
"productType": "NRML",
"action": "Buy",
"orderDuration": "DAY",
"quantity": "75",
"spreadPrice": 100,
"leg1ExchangeSegment": "NSEFO",
"leg1ExchangeInstrumentID": 49953,
"leg2ExchangeSegment": "NSEFO",
"leg2ExchangeInstrumentID": 48772,
"spreadExchangeInstrumentID": 12836740,
"apiOrderSource": "WEB",
"clientID": "SYMPH"
}`)
client := &http.Client{}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "xxxxxx")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
const axios = require("axios");
let data = JSON.stringify({
"exchangeSegment": "NSEFO",
"exchangeInstrumentID": "39543",
"productType": "NRML",
"action": "Buy",
"orderDuration": "DAY",
"quantity": "75",
"spreadPrice": 100,
"leg1ExchangeSegment": "NSEFO",
"leg1ExchangeInstrumentID": 49953,
"leg2ExchangeSegment": "NSEFO",
"leg2ExchangeInstrumentID": 48772,
"spreadExchangeInstrumentID": 12836740,
"apiOrderSource": "WEB",
"clientID": "SYMPH"
});
let config = {
method: "post",
maxBodyLength: Infinity,
url: "https://developers.symphonyfintech.in/1interactive/orders/spread",
headers: {
"Authorization": "xxxxxx",
"Content-Type": "application/json"
},
data: data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
var client = new HttpClient();
var request = new HttpRequestMessage(
HttpMethod.Post,
"https://developers.symphonyfintech.in/1interactive/orders/spread"
);
request.Headers.Add("Authorization", "xxxxxx");
var content = new StringContent(
"{\r\n" +
" \"exchangeSegment\": \"NSEFO\",\r\n" +
" \"exchangeInstrumentID\": \"39543\",\r\n" +
" \"productType\": \"NRML\",\r\n" +
" \"action\": \"Buy\",\r\n" +
" \"orderDuration\": \"DAY\",\r\n" +
" \"quantity\": \"75\",\r\n" +
" \"spreadPrice\": 100,\r\n" +
" \"leg1ExchangeSegment\": \"NSEFO\",\r\n" +
" \"leg1ExchangeInstrumentID\": 49953,\r\n" +
" \"leg2ExchangeSegment\": \"NSEFO\",\r\n" +
" \"leg2ExchangeInstrumentID\": 48772,\r\n" +
" \"spreadExchangeInstrumentID\": 12836740,\r\n" +
" \"apiOrderSource\": \"WEB\",\r\n" +
" \"clientID\": \"SYMPH\"\r\n" +
"}",
null,
"application/json"
);
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(
mediaType,
"{\r\n" +
" \"exchangeSegment\": \"NSEFO\",\r\n" +
" \"exchangeInstrumentID\": \"39543\",\r\n" +
" \"productType\": \"NRML\",\r\n" +
" \"action\": \"Buy\",\r\n" +
" \"orderDuration\": \"DAY\",\r\n" +
" \"quantity\": \"75\",\r\n" +
" \"spreadPrice\": 100,\r\n" +
" \"leg1ExchangeSegment\": \"NSEFO\",\r\n" +
" \"leg1ExchangeInstrumentID\": 49953,\r\n" +
" \"leg2ExchangeSegment\": \"NSEFO\",\r\n" +
" \"leg2ExchangeInstrumentID\": 48772,\r\n" +
" \"spreadExchangeInstrumentID\": 12836740,\r\n" +
" \"apiOrderSource\": \"WEB\",\r\n" +
" \"clientID\": \"SYMPH\"\r\n" +
"}"
);
Request request = new Request.Builder()
.url("https://developers.symphonyfintech.in/1interactive/orders/spread")
.method("POST", body)
.addHeader("Authorization", "xxxxxx")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
SpreadOrder Modify (PUT)
Modifies an existing open spread order by updating allowed parameters such as price or quantity for one or more legs.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| exchangeOrderID |
ExchangeOrderID
|
Y | It is unique OrderID generated by exchange |
| productType |
ProductType
|
Y |
ProductType
|
| action | Action | Y | BUY/SELL instruction |
| orderDuration | OrderDuration | Y | Duration for which the order remains valid |
| quantity |
OrderQuantity
|
Y | Quantity to transact. In terms of Lots. |
| spreadPrice |
Price
|
Y | Spread price for the order |
| orderID |
OrderID
|
Y | Unique order ID generated by RMS |
| leg1ExchangeSegment |
ExchangeSegment
|
Y | Exchange segment of first leg (All below content verify) |
| leg1ExchangeInstrumentID |
ExchangeInstrumentID
|
Y | Instrument token of first leg |
| leg2ExchangeSegment |
ExchangeSegment
|
Y | Exchange segment of second leg |
| leg2ExchangeInstrumentID |
ExchangeInstrumentID
|
Y | Instrument token of second leg |
| spreadExchangeInstrumentID |
ExchangeInstrumentID
|
Y | Combined spread instrument token |
| apiOrderSource |
ApiOrderSource
|
N | Source of order placement (e.g., WEB) |
| clientID |
ClientID
|
N | Unique client identification |
Request Body JSON
{
"exchangeOrderID": "X_174305899",
"productType": "NRML",
"action": "BUY",
"orderDuration": "DAY",
"quantity": "75",
"spreadPrice": 900,
"orderID": "1240992685",
"leg1ExchangeSegment": "NSEFO",
"leg1ExchangeInstrumentID": 53216,
"leg2ExchangeSegment": "NSEFO",
"leg2ExchangeInstrumentID": 64103,
"spreadExchangeInstrumentID": 13687399,
"apiOrderSource": "WEB",
"clientID": "SYMP"
}
Response Body JSON
{
"type": "success",
"code": "s-updatespreadorder-0001",
"description": "Success modify spread",
"result": {}
}
Code Examples
curl --location --request PUT 'https://developers.symphonyfintech.in/1interactive/orders/spread' \
--header 'Authorization: xxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"exchangeOrderID": "124270000004574",
"productType": "NRML",
"action": "Buy",
"orderDuration": "DAY",
"quantity": "75",
"spreadPrice": 100,
"orderID": "124270000004574",
"leg1ExchangeSegment": "NSEFO",
"leg1ExchangeInstrumentID": 49953,
"leg2ExchangeSegment": "NSEFO",
"leg2ExchangeInstrumentID": 48772,
"spreadExchangeInstrumentID": 12836740,
"apiOrderSource": "WEB",
"clientID": "SYMPH"
}'
import requests
import json
url = "https://developers.symphonyfintech.in/1interactive/orders/spread"
payload = json.dumps({
"exchangeOrderID": "124270000004574",
"productType": "NRML",
"action": "Buy",
"orderDuration": "DAY",
"quantity": "75",
"spreadPrice": 100,
"orderID": "124270000004574",
"leg1ExchangeSegment": "NSEFO",
"leg1ExchangeInstrumentID": 49953,
"leg2ExchangeSegment": "NSEFO",
"leg2ExchangeInstrumentID": 48772,
"spreadExchangeInstrumentID": 12836740,
"apiOrderSource": "WEB",
"clientID": "SYMPH"
})
headers = {
"Authorization": "xxxxxx",
"Content-Type": "application/json"
}
response = requests.request(
"PUT",
url,
headers=headers,
data=payload
)
print(response.text)
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://developers.symphonyfintech.in/1interactive/orders/spread"
method := "PUT"
payload := strings.NewReader(`{
"exchangeOrderID": "124270000004574",
"productType": "NRML",
"action": "Buy",
"orderDuration": "DAY",
"quantity": "75",
"spreadPrice": 100,
"orderID": "124270000004574",
"leg1ExchangeSegment": "NSEFO",
"leg1ExchangeInstrumentID": 49953,
"leg2ExchangeSegment": "NSEFO",
"leg2ExchangeInstrumentID": 48772,
"spreadExchangeInstrumentID": 12836740,
"apiOrderSource": "WEB",
"clientID": "SYMPH"
}`)
client := &http.Client{}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "xxxxxx")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
const axios = require("axios");
let data = JSON.stringify({
"exchangeOrderID": "124270000004574",
"productType": "NRML",
"action": "Buy",
"orderDuration": "DAY",
"quantity": "75",
"spreadPrice": 100,
"orderID": "124270000004574",
"leg1ExchangeSegment": "NSEFO",
"leg1ExchangeInstrumentID": 49953,
"leg2ExchangeSegment": "NSEFO",
"leg2ExchangeInstrumentID": 48772,
"spreadExchangeInstrumentID": 12836740,
"apiOrderSource": "WEB",
"clientID": "SYMPH"
});
let config = {
method: "put",
maxBodyLength: Infinity,
url: "https://developers.symphonyfintech.in/1interactive/orders/spread",
headers: {
"Authorization": "xxxxxx",
"Content-Type": "application/json"
},
data: data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
var client = new HttpClient();
var request = new HttpRequestMessage(
HttpMethod.Put,
"https://developers.symphonyfintech.in/1interactive/orders/spread"
);
request.Headers.Add("Authorization", "xxxxxx");
var content = new StringContent(
"{\r\n" +
" \"exchangeOrderID\": \"124270000004574\",\r\n" +
" \"productType\": \"NRML\",\r\n" +
" \"action\": \"Buy\",\r\n" +
" \"orderDuration\": \"DAY\",\r\n" +
" \"quantity\": \"75\",\r\n" +
" \"spreadPrice\": 100,\r\n" +
" \"orderID\": \"124270000004574\",\r\n" +
" \"leg1ExchangeSegment\": \"NSEFO\",\r\n" +
" \"leg1ExchangeInstrumentID\": 49953,\r\n" +
" \"leg2ExchangeSegment\": \"NSEFO\",\r\n" +
" \"leg2ExchangeInstrumentID\": 48772,\r\n" +
" \"spreadExchangeInstrumentID\": 12836740,\r\n" +
" \"apiOrderSource\": \"WEB\",\r\n" +
" \"clientID\": \"SYMPH\"\r\n" +
"}",
null,
"application/json"
);
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(
mediaType,
"{\r\n" +
" \"exchangeOrderID\": \"124270000004574\",\r\n" +
" \"productType\": \"NRML\",\r\n" +
" \"action\": \"Buy\",\r\n" +
" \"orderDuration\": \"DAY\",\r\n" +
" \"quantity\": \"75\",\r\n" +
" \"spreadPrice\": 100,\r\n" +
" \"orderID\": \"124270000004574\",\r\n" +
" \"leg1ExchangeSegment\": \"NSEFO\",\r\n" +
" \"leg1ExchangeInstrumentID\": 49953,\r\n" +
" \"leg2ExchangeSegment\": \"NSEFO\",\r\n" +
" \"leg2ExchangeInstrumentID\": 48772,\r\n" +
" \"spreadExchangeInstrumentID\": 12836740,\r\n" +
" \"apiOrderSource\": \"WEB\",\r\n" +
" \"clientID\": \"SYMPH\"\r\n" +
"}"
);
Request request = new Request.Builder()
.url("https://developers.symphonyfintech.in/1interactive/orders/spread")
.method("PUT", body)
.addHeader("Authorization", "xxxxxx")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
SpreadOrder Cancel (DELETE)
Cancels an existing open spread order along with all its associated legs, provided the order has not been fully executed.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| spreadExchangeSegment |
ExchangeSegment
|
Y | Exchange segment of the spread order (e.g., NSEFO) |
| spreadExchangeInstrumentID |
ExchangeInstrumentID
|
Y | Spread instrument token used for querying the order |
| exchangeOrderID |
ExchangeOrderID
|
N | Exchange-generated order identifier |
| orderID |
OrderID
|
N | Unique internal order ID assigned by RMS/system |
| apiOrderSource |
ApiOrderSource
|
N | Source from where the API request originated (e.g., WebAPI) |
Response Body Parameters
| Parameter Name | Type | Description |
|---|---|---|
| OrderID |
OrderID
|
Unique order ID that was deleted |
Response Body JSON
{
"type": "success",
"code": "s-deletespreadorder-0001",
"description": "Spread Order Delete Successfully",
"result": {
"OrderID": "800125184000005256"
}
}
Code Examples
curl --location --request DELETE 'https://developers.symphonyfintech.in/1interactive/orders/spread?spreadExchangeSegment=NSEFO&spreadExchangeInstrumentID=13687399&exchangeOrderID=X_174305899&orderID=1240992685&apiOrderSource=WebAPI' \ --header 'Authorization: xxxxxx' \ --data ''
import requests
url = "https://developers.symphonyfintech.in/1interactive/orders/spread?spreadExchangeSegment=NSEFO&spreadExchangeInstrumentID=13687399&exchangeOrderID=X_174305899&orderID=1240992685&apiOrderSource=WebAPI"
payload = ""
headers = {
"Authorization": "xxxxxx"
}
response = requests.request(
"DELETE",
url,
headers=headers,
data=payload
)
print(response.text)
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://developers.symphonyfintech.in/1interactive/orders/spread?spreadExchangeSegment=NSEFO&spreadExchangeInstrumentID=13687399&exchangeOrderID=X_174305899&orderID=1240992685&apiOrderSource=WebAPI"
method := "DELETE"
payload := strings.NewReader(``)
client := &http.Client{}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "xxxxxx")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
const axios = require("axios");
let data = "";
let config = {
method: "delete",
maxBodyLength: Infinity,
url: "https://developers.symphonyfintech.in/1interactive/orders/spread?spreadExchangeSegment=NSEFO&spreadExchangeInstrumentID=13687399&exchangeOrderID=X_174305899&orderID=1240992685&apiOrderSource=WebAPI",
headers: {
"Authorization": "xxxxxx"
},
data: data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
var client = new HttpClient();
var request = new HttpRequestMessage(
HttpMethod.Delete,
"https://developers.symphonyfintech.in/1interactive/orders/spread?spreadExchangeSegment=NSEFO&spreadExchangeInstrumentID=13687399&exchangeOrderID=X_174305899&orderID=1240992685&apiOrderSource=WebAPI"
);
request.Headers.Add("Authorization", "xxxxxx");
var content = new StringContent("", null, "text/plain");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(
mediaType,
""
);
Request request = new Request.Builder()
.url("https://developers.symphonyfintech.in/1interactive/orders/spread?spreadExchangeSegment=NSEFO&spreadExchangeInstrumentID=13687399&exchangeOrderID=X_174305899&orderID=1240992685&apiOrderSource=WebAPI")
.method("DELETE", body)
.addHeader("Authorization", "xxxxxx")
.build();
Response response = client.newCall(request).execute();
Spread Order Book (GET)
Retrieves the current status of all spread orders placed by the user, including leg-wise details and execution status.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| clientID |
ClientID
|
N | Client ID Mandatory in case of Dealer |
| userID |
userID
|
N | User ID Mandatory |
Response Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| cancelable |
Boolean
|
N | Whether the order can be cancelled |
| editable |
Boolean
|
N | Whether the order can be edited |
| expiration |
Expiration
|
N | Order validity (e.g., DAY) |
| orderID |
OrderID
|
N | Exchange-generated order ID |
| orderNumber |
OrderNumber
|
N | System-generated unique order number |
| orderType |
OrderType
|
N |
OrderType
|
| productType |
ProductType
|
N |
ProductType
|
| receivedTime |
TimeStamp
|
N | Time order was received |
| status |
Status
|
N | Current order status |
| exchange |
Exchange
|
N | Exchange segment (e.g., NSEFO) |
| nowOrderStatus |
NowOrderStatus
|
N | Latest updated status |
| symbolName |
SymbolName
|
N | Symbol of the instrument |
| spreadExchangeInstrumentID |
ExchangeInstrumentID
|
N | Spread Instrument Token |
| participantCode |
ParticipantCode
|
N | Participant Code (if applicable) |
| rejectReason |
Reason
|
N | Reason for rejection (if any) |
Response Body JSON
{
"orders": [
{
"action": "BUY",
"assetType": "Futures",
"dTradingSym": "NIFTY",
"description": "NIFTY 31JUL2025",
"exchange": "NSEFO",
"executionPrice": "",
"filledQuantity": "0",
"limitPrice": "100",
"marketlot": "75",
"quantity": "75",
"remainingQuantity": "75",
"series": "FUTIDX",
"symbol": "53216_NSEFO",
"tickSize": "0.1",
"tradingSymbol": "NIFTY 31JUL2025",
"orderLegStatus": "SpreadFirstLeg",
"nowOrderStatus": "Cancelled",
"expiryDate": "31-07-2025 14:30:00"
},
{
"action": "SELL",
"assetType": "Futures",
"dTradingSym": "NIFTY",
"description": "NIFTY 28AUG2025",
"exchange": "NSEFO",
"executionPrice": "",
"filledQuantity": "0",
"limitPrice": "100",
"marketlot": "75",
"quantity": "75",
"remainingQuantity": "75",
"series": "FUTIDX",
"symbol": "64103_NSEFO",
"tickSize": "0.1",
"tradingSymbol": "NIFTY 28AUG2025",
"orderLegStatus": "SpreadSecondLeg",
"nowOrderStatus": "Cancelled",
"expiryDate": "28-08-2025 14:30:00"
}
]
}
Code Examples
curl --location 'https://developers.symphonyfintech.in/1interactive/orders/spread?accountID=SYMPH' \ --header 'Authorization: xxxxxx'
import requests
url = "https://developers.symphonyfintech.in/1interactive/orders/spread?accountID=SYMPH"
payload = {}
headers = {
"Authorization": "xxxxxx"
}
response = requests.request(
"GET",
url,
headers=headers,
data=payload
)
print(response.text)
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://developers.symphonyfintech.in/1interactive/orders/spread?accountID=SYMPH"
method := "GET"
client := &http.Client{}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "xxxxxx")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
const axios = require("axios");
let config = {
method: "get",
maxBodyLength: Infinity,
url: "https://developers.symphonyfintech.in/1interactive/orders/spread?accountID=SYMPH",
headers: {
"Authorization": "xxxxxx"
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
var client = new HttpClient();
var request = new HttpRequestMessage(
HttpMethod.Get,
"https://developers.symphonyfintech.in/1interactive/orders/spread?accountID=SYMPH"
);
request.Headers.Add("Authorization", "xxxxxx");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
OkHttpClient client = new OkHttpClient().newBuilder().build();
Request request = new Request.Builder()
.url("https://developers.symphonyfintech.in/1interactive/orders/spread?accountID=SYMPH")
.method("GET", null)
.addHeader("Authorization", "xxxxxx")
.build();
Response response = client.newCall(request).execute();
GTT Orders
Place GTT Order (POST)
Places a Good Till Triggered (GTT) order that remains active until a specified trigger condition is met. Once the trigger price is reached, the system automatically places the corresponding market or limit order on the exchange.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| clientID |
ClientID
|
Y | User-specific identification |
| source |
ApiOrderSource
|
Y | API/Platform source of the request |
| stopPrice |
Price
|
Y | Stop-loss trigger price |
| limitPrice |
Price
|
Y | Limit price at which the order should execute |
| orderQuantity |
OrderQuantity
|
Y | Quantity to transact (in units/lots depending on segment) |
| orderSide |
OrderSide
|
Y | BUY or SELL direction of the order |
| exchangeSegment |
ExchangeSegment
|
Y | Exchange segment where the order is placed |
| exchangeInstrumentID |
ExchangeInstrumentID
|
Y | Unique token/identifier for the trading instrument |
Request Body JSON
{
"clientID": "SYMP",
"source": "Twsapi",
"stopPrice": 1300,
"limitPrice": 1320,
"orderQuantity": 75,
"orderSide": "BUY",
"exchangeSegment": "NSECM",
"exchangeInstrumentID": 2885
}
Response Body JSON
{
"type": "success",
"code": "s-gttOrderRequest-0001",
"description": "GTT order request send."
}
Code Examples
curl --location 'https://developers.symphonyfintech.in/1interactive/orders/gttorder' \
--header 'Authorization: xxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"exchangeSegment": "NSECM",
"exchangeInstrumentID": 2885,
"orderSide": "BUY",
"stopPrice": 1300,
"limitPrice": 1320,
"orderQuantity": 75,
"clientID": "SYMP",
"source": "TWSAPI"
}'
import requests
import json
url = "https://developers.symphonyfintech.in/1interactive/orders/gttorder"
payload = json.dumps({
"exchangeSegment": "NSECM",
"exchangeInstrumentID": 2885,
"orderSide": "BUY",
"stopPrice": 1300,
"limitPrice": 1320,
"orderQuantity": 75,
"clientID": "SYMP",
"source": "TWSAPI"
})
headers = {
"Authorization": "xxxxxx",
"Content-Type": "application/json"
}
response = requests.post(url, headers=headers, data=payload)
print(response.text)
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://developers.symphonyfintech.in/1interactive/orders/gttorder"
method := "POST"
payload := strings.NewReader(`{
"exchangeSegment": "NSECM",
"exchangeInstrumentID": 2885,
"orderSide": "BUY",
"stopPrice": 1300,
"limitPrice": 1320,
"orderQuantity": 75,
"clientID": "SYMP",
"source": "TWSAPI"
}`)
client := &http.Client{}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "xxxxxx")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
const axios = require('axios');
let data = JSON.stringify({
"exchangeSegment": "NSECM",
"exchangeInstrumentID": 2885,
"orderSide": "BUY",
"stopPrice": 1300,
"limitPrice": 1320,
"orderQuantity": 75,
"clientID": "SYMP",
"source": "TWSAPI"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://developers.symphonyfintech.in/1interactive/orders/gttorder',
headers: {
'Authorization': 'xxxxxx',
'Content-Type': 'application/json'
},
data: data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
var client = new HttpClient();
var request = new HttpRequestMessage(
HttpMethod.Post,
"https://developers.symphonyfintech.in/1interactive/orders/gttorder"
);
request.Headers.Add("Authorization", "xxxxxx");
var content = new StringContent(
@"{
""exchangeSegment"": ""NSECM"",
""exchangeInstrumentID"": 2885,
""orderSide"": ""BUY"",
""stopPrice"": 1300,
""limitPrice"": 1320,
""orderQuantity"": 75,
""clientID"": ""SYMP"",
""source"": ""TWSAPI""
}",
System.Text.Encoding.UTF8,
"application/json"
);
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n" +
" \"exchangeSegment\": \"NSECM\",\r\n" +
" \"exchangeInstrumentID\": 2885,\r\n" +
" \"orderSide\": \"BUY\",\r\n" +
" \"stopPrice\": 1300,\r\n" +
" \"limitPrice\": 1320,\r\n" +
" \"orderQuantity\": 75,\r\n" +
" \"clientID\": \"SYMP\",\r\n" +
" \"source\": \"TWSAPI\"\r\n" +
"}");
Request request = new Request.Builder()
.url("https://developers.symphonyfintech.in/1interactive/orders/gttorder")
.method("POST", body)
.addHeader("Authorization", "xxxxxx")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
GTT Order Modify (PUT)
Allows modification of an Open existing GTT order by updating trigger price or order parameters
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| clientID |
ClientID
|
Y | Unique client identification code |
| orderSide |
OrderSide
|
Y | BUY/SELL instruction for the order |
| orderSessionType |
OrderSessionType
|
Y | Session type (e.g., GTT, DAY, IOC) |
| exchangeInstrumentID |
ExchangeInstrumentID
|
Y | Unique exchange token / scrip ID |
| exchangeSegment |
ExchangeSegment
|
Y | Exchange segment (e.g., NSECM, NSEFO) |
| appOrderID |
AppOrderID
|
Y | Unique RMS-generated order ID |
| modifiedLimitPrice |
Price
|
N | New modified limit price |
| orderCategoryType |
OrderCategoryType
|
Y | Order category (NORMAL, STOPLOSS, etc.) |
| modifiedOrderType |
OrderType
|
N | Modified order type (Market, Limit, SL, SLM) |
| modifiedProductType |
ProductType
|
N | Modified product type (e.g., NRML, CNC, MIS) |
| modifiedOrderQuantity |
OrderQuantity
|
N | Modified quantity for the order |
| source |
Source
|
N | Source of the request (e.g., TWSAPI, WEB) |
| modifiedStopPrice |
Price
|
N | Modified stop-loss trigger price |
| participationCode |
ParticipationCode
|
N | Order participation code (NONE / DARK / etc.) |
Request Body JSON
{
"clientID": "SYMP",
"orderSide": "BUY",
"orderSessionType": "GTT",
"exchangeInstrumentID": 2885,
"exchangeSegment": "NSECM",
"appOrderID": "1343000794",
"modifiedLimitPrice": 1360,
"orderCategoryType": "NORMAL",
"modifiedOrderType": "Limit",
"modifiedProductType": "NRML",
"modifiedOrderQuantity": 75,
"source": "Twsapi",
"modifiedStopPrice": 1310,
"participationCode": "NONE"
}
Response Body JSON
{
"type": "success",
"code": "s-modifygttOrder-0001",
"description": "Modify GTT order request send."
}
Code Examples
curl --location --request PUT 'https://developers.symphonyfintech.in/1interactive/orders/gttorder' \
--header 'Authorization: xxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"clientID": "SYMP",
"orderSide": "BUY",
"orderSessionType": "GTT",
"exchangeInstrumentID": 2885,
"exchangeSegment": "NSECM",
"appOrderID": "1343000794",
"modifiedLimitPrice": 1360,
"orderCategoryType": "NORMAL",
"modifiedOrderType": "Limit",
"modifiedProductType": "NRML",
"modifiedOrderQuantity": 75,
"source": "Twsapi",
"modifiedStopPrice": 1310,
"participationCode": "NONE"
}'
GTT Order Cancel (DELETE)
Cancels an active GTT order, preventing it from being triggered even if the trigger condition is met in the future.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| clientID |
ClientID
|
Y | Unique client identification code |
| appOrderID |
AppOrderID
|
Y | Unique order ID generated by RMS |
| exchangeSegment |
ExchangeSegment
|
Y | Exchange segment where order is placed (e.g., NSECM) |
| exchangeInstrumentID |
ExchangeInstrumentID
|
Y | Unique token/ID for the trading instrument |
Request Body JSON
{
"type": "success",
"code": "s-cancelgttOrder-0001",
"description": "Cancel GTT order request send."
}
Code Examples
curl --location --request DELETE 'https://developers.symphonyfintech.in/1interactive/orders/gttorder?appOrderID=1343000794&clientID=SYMP&userID=SYMP&exchangeSegment=NSECM&exchangeInstrumentID=2885' \ --header 'Authorization: xxxxxx'
GTT OrderBook (POST)
Fetches the list of all GTT orders placed by the user, along with their trigger conditions, order details, and current status.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| clientID |
ClientID
|
Y | Description Client ID Mandatory |
Response Body Parameters
| Parameter Name | Type | Description |
|---|---|---|
| LoginID |
LoginID
|
User login ID |
| ClientID |
ClientID
|
Client code associated with the order |
| AppOrderID |
AppOrderID
|
Unique application order ID |
| OrderReferenceID |
OrderReferenceID
|
Reference ID sent during order placement |
| GeneratedBy |
GeneratedBy
|
Source that generated the order (TWSAPI, Web, etc.) |
| ExchangeOrderID |
ExchangeOrderID
|
Exchange-generated order ID (if available) |
| OrderCategoryType |
OrderCategoryType
|
NORMAL / SYSTEM / OCO / GTT etc. |
| ExchangeSegment |
ExchangeSegment
|
Exchange segment (e.g., NSECM) |
| ExchangeInstrumentID |
ExchangeInstrumentID
|
Token ID of the trading instrument |
| OrderSide |
OrderSide
|
BUY or SELL |
| OrderType |
OrderType
|
Market / Limit / SL / SL-M |
| ProductType |
ProductType
|
CNC / MIS / NRML |
| TimeInForce |
TimeInForce
|
DAY / IOC / None |
| OrderPrice |
Price
|
Price entered for the order |
| OrderQuantity |
Quantity
|
Total order quantity |
| OrderStopPrice |
StopPrice
|
Stop-loss trigger price |
| OrderStatus |
OrderStatus
|
Current status: New / Filled / Cancelled / Rejected |
| OrderAverageTradedPrice |
Price
|
Average price at which quantity is traded |
| LeavesQuantity |
LeavesQuantity
|
Remaining quantity not yet executed |
| CumulativeQuantity |
CumulativeQuantity
|
Total executed quantity |
| OrderDisclosedQuantity |
DisclosedQuantity
|
Quantity disclosed to the market |
| OrderGeneratedDateTime |
DateTime
|
Order generation timestamp |
| ExchangeTransactTime |
DateTime
|
Exchange transaction timestamp |
| TradingSymbol |
TradingSymbol
|
Symbol name (e.g., RELIANCE) |
| LastUpdateDateTime |
DateTime
|
Last updated timestamp |
| OrderExpiryDate |
DateTime
|
Order validity expiry date |
| CancelRejectReason |
Reason
|
Reason for cancellation or rejection |
| OrderUniqueIdentifier |
OrderUniqueIdentifier
|
Unique identifier sent in request |
| OrderLegStatus |
OrderLegStatus
|
SingleOrderLeg / SpreadFirstLeg / SpreadSecondLeg |
| BoLegDetails |
BoLegDetails
|
BO leg details (if applicable) |
| IsSpread |
Boolean
|
Whether the order is a spread order |
| BoEntryOrderId |
BoEntryOrderId
|
BO entry order reference |
| ApiOrderSource |
ApiOrderSource
|
API source (WEB / TWSAPI etc.) |
| MessageCode |
MessageCode
|
System message code for order update |
| MessageVersion |
MessageVersion
|
Version of the message format |
| TokenID |
TokenID
|
Internal token ID |
| ApplicationType |
ApplicationType
|
Application type flag |
| SequenceNumber |
SequenceNumber
|
Order sequence number |
Response Body JSON
{
"LoginID": "SYMP",
"ClientID": "SYMP",
"AppOrderID": 1343000794,
"OrderReferenceID": "",
"GeneratedBy": "TWSAPI",
"ExchangeOrderID": "",
"OrderCategoryType": "NORMAL",
"ExchangeSegment": "NSECM",
"ExchangeInstrumentID": 2885,
"OrderSide": "BUY",
"OrderType": "Limit",
"ProductType": "CNC",
"TimeInForce": "None",
"OrderPrice": 1350,
"OrderQuantity": 75,
"OrderStopPrice": 1300,
"OrderStatus": "New",
"OrderAverageTradedPrice": "",
"LeavesQuantity": 75,
"CumulativeQuantity": 0,
"OrderDisclosedQuantity": 0,
"OrderGeneratedDateTime": "26-11-2025 14:00:00",
"ExchangeTransactTime": "26-11-2025 14:00:00",
"TradingSymbol": "RELIANCE",
"LastUpdateDateTime": "26-11-2025 14:00:00",
"OrderExpiryDate": "26-11-2026 14:00:00",
"CancelRejectReason": "",
"OrderUniqueIdentifier": "",
"OrderLegStatus": "SingleOrderLeg",
"BoLegDetails": 0,
"IsSpread": "false",
"BoEntryOrderId": "",
"ApiOrderSource": "",
"MessageCode": 9004,
"MessageVersion": 4,
"TokenID": 0,
"ApplicationType": 0,
"SequenceNumber": 0
}
Code Examples
curl --location 'https://developers.symphonyfintech.in/1interactive/orders/gttorderbook?clientID=SYMP' \ --header 'Authorization: XXXXXX'
import requests
url = "https://developers.symphonyfintech.in/1interactive/orders/gttorderbook?clientID=SYMP"
payload = {}
headers = {
"Authorization": "XXXXXX"
}
response = requests.get(url, headers=headers, data=payload)
print(response.text)
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://developers.symphonyfintech.in/1interactive/orders/gttorderbook?clientID=SYMP"
method := "GET"
client := &http.Client{}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "xxxxxx")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
const axios = require('axios');
let config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://developers.symphonyfintech.in/1interactive/orders/gttorderbook?clientID=SYMP',
headers: {
'Authorization': 'xxxxxx'
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
var client = new HttpClient();
var request = new HttpRequestMessage(
HttpMethod.Get,
"https://developers.symphonyfintech.in/1interactive/orders/gttorderbook?clientID=SYMP"
);
request.Headers.Add("Authorization", "xxxxxx");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://developers.symphonyfintech.in/1interactive/orders/gttorderbook?clientID=SYMP")
.method("GET", body)
.addHeader("Authorization", "xxxxxx")
.build();
Response response = client.newCall(request).execute();
Portfolio (POST)
A user's portfolio consists of long-term equity holdings and short-term positions.
Holding (GET)
The Holdings API allows users to check their long-term holdings with the broker. An authorization token must be included with the request.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| clientID |
ClientID
|
N | Client ID Mandatory in case of Dealer |
Response Body Parameters
| Parameter Name | Type | Description |
|---|---|---|
| ClientId |
UserID
|
User specific identification |
| RMSHoldingList | RMSHoldingList | |
| Holdings | Holdings | |
| ISIN |
ISIN
|
The standard ISIN representing stocks listed on multiple exchanges |
| RMSHoldingId |
RMSHoldingId
|
Unique holding ID |
| ExchangeNSEInstrumentId |
ExchangeInstrumentID
|
Exchange Scrip code or Symbol Token is unique identifier |
| ExchangeBSEInstrumentId |
ExchangeInstrumentID
|
Exchange Scrip code or Symbol Token is unique identifier |
| ExchangeMSEInstrumentId |
ExchangeInstrumentID
|
Exchange Scrip code or Symbol Token is unique identifier |
| HoldingType |
HoldingType
|
It represents Holding Type i.e.
HoldingTypes
|
| HoldingQuantity |
Quantity
|
Holding quantity |
| CollateralValuationType |
ValuationType
|
ValuationType
|
| Haircut |
Haircut
|
Haircut refers to the percentage reduction applied to the market value of a security when calculating its collateral value |
| CollateralQuantity |
Quantity
|
Quantities placed as collateral with broker |
| CreatedBy |
CreatedBy
|
User or system identifier that created the holding record |
| LastUpdatedBy |
LastUpdatedBy
|
User or system identifier that last modified or updated the holding record |
| CreatedOn |
CreatedOn
|
Date and time when the holding record was first created |
| LastUpdatedOn |
LastUpdatedOn
|
The date and time when the holding record was last modified or updated |
| UsedQuantity |
Quantity
|
Quantity sold from the net holding quantity |
| IsCollateralHolding |
IsCollateralHolding
|
Indicates whether the holding is being used as collateral for margin or leverage |
| BuyAvgPrice |
Price
|
Average price at which all shares were bought |
| IsBuyAvgPriceProvided |
IsBuyAvgPriceProvided
|
Indicates whether the buy average price for the holding has been provided or not |
| AuthorizeQuantity |
Quantity
|
Quantity Authorized at the depository for sale |
| IsNeedToDelete |
IsNeedToDelete
|
Indicates whether the holding record needs to be deleted or marked for removal from the system |
| CollateralHoldingList | CollateralHoldingList | |
| Holdings | Holdings |
Response Body JSON
{
"type": "success",
"code": "s-portfolio-0012",
"description": "Success holding",
"result": {
"ClientId": "SYMP1",
"RMSHoldingList": [
{
"Holdings": {
"INF457M01133": {
"ISIN": "INF457M01133",
"RMSHoldingId": 21885,
"ClientId": "SYMP1",
"ExchangeNSEInstrumentId": 2328,
"ExchangeBSEInstrumentId": 538057,
"ExchangeMSEIInstrumentId": 0,
"HoldingType": 2,
"HoldingQuantity": 1,
"CollateralValuationType": 1,
"Haircut": 15,
"CollateralQuantity": 1,
"CreatedBy": "ADMIN2",
"LastUpdatedBy": "ADMIN2",
"CreatedOn": "2019-07-06T12:18:21",
"LastUpdatedOn": "2019-07-06T11:39:29",
"UsedQuantity": 0,
"IsCollateralHolding": true,
"BuyAvgPrice": 0,
"IsBuyAvgPriceProvided": false,
"AuthorizeQuantity": 0,
"IsNeedToDelete": false
}
}
}
],
"CollateralHoldingList": [
{
"Holdings": {
"INF457M01133": {
"ISIN": "INF457M01133",
"RMSHoldingId": 21885,
"ClientId": "SYMP1",
"ExchangeNSEInstrumentId": 2328,
"ExchangeBSEInstrumentId": 538057,
"ExchangeMSEIInstrumentId": 0,
"HoldingType": 2,
"HoldingQuantity": 1,
"CollateralValuationType": 1,
"Haircut": 15,
"CollateralQuantity": 1,
"CreatedBy": "ADMIN2",
"LastUpdatedBy": "ADMIN2",
"CreatedOn": "2019-07-06T12:18:21",
"LastUpdatedOn": "2019-07-06T11:39:29",
"UsedQuantity": 0,
"IsCollateralHolding": true,
"BuyAvgPrice": 0,
"IsBuyAvgPriceProvided": false,
"AuthorizeQuantity": 0,
"IsNeedToDelete": false
}
}
}
]
}
}
Code Examples
curl --location 'https://developers.symphonyfintech.in/1interactive/portfolio/holdings' \ --header 'Authorization: xxxxxx'
Position (GET)
The user's portfolio consists of short-term open positions in derivatives (futures and options contracts) and intraday equities.
-
Positions in a portfolio remain open until they are sold or until expiry.
-
Derivative contracts usually expire in a monthly sliding window or a weekly sliding window of three periods, called current, near, and far.
-
Long equity positions are moved to the holding’s portfolio after the settlement day.
- The Positions API returns two sets of positions:
-
Net → The actual, current net position portfolio.
-
Day → A snapshot of buying and selling activity for that particular day.
This distinction is useful for computing profits and losses for trading strategies.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| dayOrNet |
DayOrNet
|
Y |
Net → The actual, current net position portfolio Day → A snapshot of buying and selling activity for that particular day |
| clientID |
ClientID
|
N | Client ID mandatory in case of Dealer |
Response Body Parameters
| Parameter Name | Type | Description |
|---|---|---|
| ExchangeSegment |
ExchangeSegment
|
ExchangeSegment
|
| ExchangeInstrumentID |
ExchangeInstrumentID
|
Exchange Scrip code or Symbol Token is unique identifier |
| ProductType |
ProductType
|
Is the minimum number of shares or units of a security that can be traded on an exchange. |
| Marketlot |
Marketlot
|
Multiplying factor for currency F&O |
| Multiplier |
Multiplier
|
Multiplying factor for currency F&O |
| BuyAveragePrice |
Price
|
Average price at which all shares were bought |
| SellAveragePrice |
Price
|
Average price at which quantities were sold |
| OpenBuyQuantity |
Quantity
|
Total bought quantity |
| OpenSellQuantity |
Quantity
|
Total sold quantity |
| Quantity |
Quantity
|
Net outstanding quantity |
| BuyAmount |
Amount
|
Total buy value of position in rupees |
| SellAmount |
SellAmount
|
Total sell value of position in rupees |
| NetAmount |
NetAmount
|
Outstanding position value in rupees |
| UnrealizedMTM |
UnrealizedMTM
|
It's unrealized profit or loss which has not been booked by client |
| RealizedMTM |
RealizedMTM
|
It's realized profit or loss which has been booked by client |
| MTM |
MTM
|
Mark to market returns (computed based on last close and last traded price) |
| BEP |
BEP
|
It's break even point of position |
| SumOfTradedQuantityAndPriceBuy |
SumOfQuantityAndPrice
|
Total buy value of position in rupees |
| SumOfTradedQuantityAndPriceSell |
SumOfQuantityAndPrice
|
Total sell value of position in rupees |
| statisticsLevel |
StatisticsLevel
|
StatisticsLevel
|
| isInterOpPosition |
IsInterOpPosition
|
Interoperability is enabled or disabled |
| MessageCode |
MessageCode
|
API MessageCode |
| MessageVersion |
MessageVersion
|
API Message Version |
| TokenID |
TokenID
|
API TokenID |
| ApplicationType |
ApplicationType
|
API ApplicationType |
| SequenceNumber |
SequenceNumber
|
API SequenceNumber |
Response Body JSON
{
"type": "success",
"code": "s-portfolio-0001",
"description": "Success position",
"result": [
{
"AccountID": "SYMP1",
"TradingSymbol": "ACC",
"ExchangeSegment": "NSECM",
"ExchangeInstrumentID": 22,
"ProductType": "CNC",
"Marketlot": 1,
"Multiplier": 1,
"BuyAveragePrice": 41.78,
"SellAveragePrice": 41.63,
"OpenBuyQuantity": 10,
"OpenSellQuantity": 0,
"Quantity": 10,
"BuyAmount": 1671,
"SellAmount": 2498,
"NetAmount": 827,
"UnrealizedMTM": 0,
"RealizedMTM": 0,
"MTM": 0,
"BEP": 0,
"SumOfTradedQuantityAndPriceBuy": 1671,
"SumOfTradedQuantityAndPriceSell": 2498,
"statisticsLevel": "ParentLevel",
"isInterOpPosition": "true",
"childPositions": {
"AccountID": "SYMP1",
"TradingSymbol": "ACC",
"ExchangeSegment": "NSECM",
"ExchangeInstrumentID": "22",
"ProductType": "CNC",
"Marketlot": "1",
"Multiplier": "1",
"BuyAveragePrice": "41.78",
"SellAveragePrice": "41.63",
"OpenBuyQuantity": "10",
"OpenSellQuantity": "0",
"Quantity": "10",
"BuyAmount": "1671.00",
"SellAmount": "2498.00",
"NetAmount": "827.00",
"UnrealizedMTM": "0",
"RealizedMTM": "0",
"MTM": "0",
"BEP": "0",
"SumOfTradedQuantityAndPriceBuy": "1671.00",
"SumOfTradedQuantityAndPriceSell": "2498.00",
"statisticsLevel": "ParentLevel",
"isInterOpPosition": "true"
},
"MessageCode": 9002,
"MessageVersion": 1,
"TokenID": 0,
"ApplicationType": 0,
"SequenceNumber": 0
}
]
}
Code Examples
curl --location 'https://developers.symphonyfintech.in/1interactive/portfolio/positions?dayOrNet=daywise' \ --header 'Authorization: xxxxxx'
Position Convert (PUT)
Convert Position API enables users to convert their open positions from NRML (Normal) to MIS (Margin Intraday Square-off) or vice versa, provided there is sufficient margin or funds in the account to complete the conversion.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| exchangeSegment |
DayOrNet
|
Y |
Net → The actual, current net position portfolio Day → A snapshot of buying and selling activity for that particular day |
| exchangeInstrumentID |
ClientID
|
Y | Client ID Mandatory in case of Dealer |
| oldProductType |
ProductType
|
Y |
ProductType
|
| newProductType |
ProductType
|
Y |
ProductType
|
| isDayWise |
IsDayWise
|
Y | IsDayWise position conversion |
| targetQty |
Quantity
|
Y | Quantity that needs to convert |
| statisticsLevel |
StatisticsLevel
|
Y |
StatisticsLevel
|
| isInterOpPosition |
sInterOpPosition
|
Y | Interoperability is enabled or disabled |
Request Body JSON
{
"exchangeSegment": "NSECM",
"exchangeInstrumentID": 2885,
"oldProductType": "NRML",
"newProductType": "MIS",
"isDayWise": true,
"targetQty": 0,
"statisticsLevel": "ParentLevel",
"isInterOpPosition": true
}
Response Body JSON
{
"type": "success",
"code": "s-portfolio-0005",
"description": "success position convert"
}
Code Examples
curl --location --request PUT 'https://developers.symphonyfintech.in/1interactive/portfolio/positions/convert' \
--header 'Authorization: xxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"exchangeSegment": "NSECM",
"exchangeInstrumentID": 2885,
"targetQty": 1,
"isDayWise": true,
"oldProductType": "NRML",
"newProductType": "MIS",
"statisticsLevel":"0",
"isInterOpPosition":false
}'
Margin
The Margin API allows clients to fetch the required margin, available margin, and margin utilization
details for a given user or for a specific trade order.
It helps verify whether sufficient funds are available before placing an order.
Regular Order Margin (POST)
Calculates the margin required to place a regular order based on order details such as exchange, instrument, order type, price, and quantity, before actually placing the order.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| clientID |
ClientID
|
N | Client ID Mandatory in case of Dealer |
| portfolio | Array | Y | |
| exchange |
ExchangeSegment
|
Y | ExchangeSegment |
| exchangeInstrumentId |
ExchangeInstrumentID
|
Y | Exchange Scrip code or Symbol Token is unique identifier |
| productType |
ProductType
|
Y |
ProductType
|
| orderType |
OrderType
|
Y |
OrderType
|
| orderSide |
OrderSide
|
Y |
OrderSide
|
| quantity |
Quantity
|
Y | Quantity to transact. In terms of Lots |
| price |
Price
|
Y | The price to execute the order at |
| stopPrice |
Price
|
Y | The price at which an order should be triggered (SL, SL-M) |
| userID |
UserID
|
Y | User login ID |
| orderSessionType |
---OrderSessionType
|
Y |
Order Session Type
|
Request Body JSON
{
"clientID": "SYMP",
"portfolio": [
{
"exchange": 1,
"exchangeInstrumentId": 2885,
"productType": "NRML",
"orderType": "LIMIT",
"orderSide": "BUY",
"quantity": 1,
"price": 1200,
"stopPrice": 1180,
"userID": "SYMP",
"orderSessionType": "NORMAL"
}
]
}
Response Body Parameters
| Parameter Name | Type | Description |
|---|---|---|
| brokerageDeatils | Object | |
| IsValid |
IsValid
|
Indicates whether the order is valid based on margin checks. `true` means the order can proceed. |
| MarginRequired |
MarginRequired
|
Total margin required (in currency units) to place the order |
| MarginAvailable |
MarginAvailable
|
Total margin currently available in the user’s account |
| MarginShortfall |
MarginShortfall
|
Margin deficit amount if available margin is insufficient. |
| ErrorMessage |
ErrorMessage
|
Error message when `IsValid = false`. Empty string means no error. |
Response Body JSON
{
"type": "success",
"code": "s-calculatemargin-0001",
"description": "Request sent",
"result": {
"brokerageDeatils": {
"IsValid": true,
"MarginRequired": 150,
"MarginAvailable": 9816624.5775,
"MarginShortfall": 0,
"ErrorMessage": ""
}
}
}
Code Examples
curl --location 'https://developers.symphonyfintech.in/1interactive/orders/margindetails' \
--header 'Authorization: xxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"clientID": "SYMP",
"portfolio": [
{
"exchange": 1,
"exchangeInstrumentId": 2885,
"productType": "NRML",
"orderType": "LIMIT",
"orderSide": "BUY",
"quantity": 1,
"price": 1200,
"stopPrice": 1180,
"userID": "SYMP",
"orderSessionType": "NORMAL"
}
]
}'
Modify Regular Order Margin (POST)
Recalculates the margin requirement for a regular order after modifying parameters like price, quantity, Product type helping users understand the updated margin impact before applying the changes.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| clientID |
ClientID
|
N | Client ID Mandatory in case of Dealer |
| orderID |
AppOrderID
|
Y | Unique Order ID as received in Order Entry Response |
| instrumentInformation | Array | Y | Array of Instrument Information |
| exchange |
ExchangeSegment
|
Y | Exchange Segment |
| exchangeInstrumentId |
ExchangeInstrumentID
|
Y | Exchange Scrip code or Symbol Token is unique identifier |
| productType |
ProductType
|
Y |
ProductType
|
| orderType |
OrderType
|
Y |
OrderType
|
| orderSide |
OrderSide
|
Y |
OrderSide
|
| quantity |
Quantity
|
Y | Quantity to transact. In terms of Lots |
| price |
Price
|
Y | Price in Rupees. Up to 4 decimal places |
| stopPrice |
Price
|
Y | Price in Rupees. Up to 4 decimal places. |
| userID |
UserID
|
Y | UserID of investor client |
| orderSessionType |
OrderSessionType
|
Y | Represents order validity such as DAY, IOC, GTD |
Request Body JSON
{
"clientID": "SYMP",
"orderID": "1210910568",
"instrumentInformation": {
"exchange": 1,
"exchangeInstrumentId": "2885",
"orderSide": "BUY",
"orderSessionType": 1,
"productType": "NRML",
"orderType": "LIMIT",
"quantity": 1,
"price": 1200,
"stopPrice": 1190
}
}
Response Body JSON
{
"type": "success",
"code": "s-ModifyOrderMarginQueryRequest-0001",
"description": "Request sent",
"result": {
"brokerageDeatils": {
"IsValid": true,
"MarginRequired": 150,
"MarginAvailable": 9816624.5775,
"MarginShortfall": 0,
"ErrorMessage": ""
}
}
}
Code Examples
curl --location 'https://developers.symphonyfintech.in/1interactive/orders/modifyordermargindetails' \
--header 'Authorization: xxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"clientID": "SYMP",
"orderID": "1210910568",
"instrumentInformation": {
"exchange": 1,
"exchangeInstrumentId": "2885",
"orderSide": "BUY",
"orderSessionType": 1,
"productType": "NRML",
"orderType": "LIMIT",
"quantity": 1,
"price": 1200,
"stopPrice": 1190
}
}'
Cover Order Margin (POST)
Calculates the margin required to place a cover order by considering both the main order and the compulsory stop-loss order, providing the total margin requirement upfront.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| clientID |
ClientID
|
N | Client ID Mandatory in case of Dealer |
| exchange |
ExchangeSegment
|
Y | Exchange Segment |
| exchangeInstrumentId |
ExchangeInstrumentID
|
Y | Exchange Scrip code or Symbol Token is unique identifier |
| entryOrderType |
OrderType
|
Y |
OrderType
|
| orderSide |
OrderSide
|
Y |
OrderSide
|
| quantity |
Quantity
|
Y | Quantity to transact. In terms of Lots |
| entryPrice |
Price
|
Y | The price to execute the order at |
| stopPrice |
Price
|
Y | A stoploss price is the price in a stop order that triggers the creation of a market order. |
Request Body JSON
{
"clientID": "SYMP",
"exchange": 1,
"exchangeInstrumentId": "2885",
"orderSide": "BUY",
"entryOrderType": "LIMIT",
"quantity": 1,
"entryPrice": 1200,
"stopPrice": 1180,
"requestId": 1
}
Response Body Parameters
| Parameter Name | Type | Description |
|---|---|---|
| brokerageDeatils | Object | Contains brokerage, margin, and validation information. |
| IsValid |
IsValid
|
Indicates whether the order is valid based on margin checks. |
| MarginRequired |
MarginRequired
|
Total margin required (in currency units) to place the order. |
| MarginAvailable |
MarginAvailable
|
Total margin currently available in the user’s account. |
| MarginShortfall |
MarginShortfall
|
Margin deficit amount if available margin is insufficient. |
| ErrorMessage |
ErrorMessage
|
Error message when the order is invalid. Empty string means no error. |
Response Body JSON
{
"type": "success",
"code": "s-calculateCoMargin-0001",
"description": "Request sent",
"result": {
"brokerageDeatils": {
"IsValid": true,
"MarginRequired": 1200.94,
"MarginAvailable": 9816624.5775,
"MarginShortfall": 0,
"ErrorMessage": ""
}
}
}
Code Examples
curl --location 'https://developers.symphonyfintech.in/1interactive/orders/comargindetails' \
--header 'Authorization: xxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"clientID": "SYMP",
"exchange": 1,
"exchangeInstrumentId": "2885",
"orderSide": "BUY",
"entryOrderType": "LIMIT",
"quantity": 1,
"entryPrice": 1200,
"stopPrice": 1180,
"requestId": 1
}'
Modify Cover Order Margin (POST)
Recalculates the margin requirement for a cover order when order parameters are modified, reflecting any changes in margin due to updated price, quantity, or stop-loss values.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| clientID |
ClientID
|
N | Client ID Mandatory in case of Dealer |
| exchange |
ExchangeSegment
|
Y | Exchange Segment |
| exchangeInstrumentId |
ExchangeInstrumentID
|
Y | Exchange Scrip code or Symbol Token is unique identifier |
| entryOrderType |
OrderType
|
Y |
OrderType
|
| orderSide |
OrderSide
|
Y |
OrderSide
|
| quantity |
Quantity
|
Y | Quantity to transact. In terms of Lots |
| entryPrice |
Price
|
Y | The price to execute the order at |
| stopPrice |
Price
|
Y | A stoploss price is the price in a stop order that triggers the creation of a market order. |
| orderID |
AppOrderID
|
Y | Unique order ID |
Request Body JSON
{
"clientID": "SYMP",
"exchange": 1,
"exchangeInstrumentId": 2885,
"orderSide": "BUY",
"entryOrderType": "LIMIT",
"quantity": 1,
"entryPrice": 1200,
"stopPrice": 1180,
"requestId": 1,
"orderID": "1410911680"
}
Response Body Parameters
| Parameter Name | Type | Description |
|---|---|---|
| brokerageDeatils | Object | |
| IsValid |
IsValid
|
Indicates whether the order is valid based on margin checks. `true` means the order can proceed. |
| MarginRequired |
MarginRequired
|
Total margin required (in currency units) to place the order. |
| MarginAvailable |
MarginAvailable
|
Total margin currently available in the user’s account. |
| MarginShortfall |
MarginShortfall
|
Margin deficit amount if available margin is insufficient. |
| ErrorMessage |
ErrorMessage
|
Error message when `IsValid = false`. Empty string means no error. |
Response Body JSON
{
"type": "success",
"code": "s-COModifyMarginQueryRequest-0001",
"description": "Request sent",
"result": {
"brokerageDeatils": {
"IsValid": true,
"MarginRequired": 1200,
"MarginAvailable": 9816624.5775,
"MarginShortfall": 0,
"ErrorMessage": ""
}
}
}
Code Examples
curl --location 'https://developers.symphonyfintech.in/1interactive/orders/comodifymargindetails' \
--header 'Authorization: xxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"clientID": "SYMP",
"exchange": 1,
"exchangeInstrumentId": 2885,
"orderSide": "BUY",
"entryOrderType": "LIMIT",
"quantity": 1,
"entryPrice": 1200,
"stopPrice": 1180,
"requestId": 1,
"orderID": "1410911680"
}'
Bracket Order Margin (POST)
Calculates the margin required to place a bracket order by considering the main order along with the associated target and stop-loss orders, giving users clarity on total margin usage before placing the order.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| clientID |
ClientID
|
N | Client ID Mandatory in case of Dealer |
| exchange |
ExchangeSegment
|
Y | Exchange Segment |
| exchangeInstrumentId |
ExchangeInstrumentID
|
Y | Exchange Scrip code or Symbol Token is unique identifier |
| entryOrderType |
OrderType
|
Y |
OrderType
|
| orderSide |
OrderSide
|
Y |
OrderSide
|
| quantity |
Quantity
|
Y | Quantity to transact. In terms of Lots |
| limitPrice |
Price
|
Y | Price in Rupees. Up to 4 decimal places |
| stopLoss |
Price
|
Y | Price in Rupees. Up to 4 decimal places |
| squarOff |
SquarOff
|
Y | Represents the profit-taking offset value |
Request Body JSON
{
"clientID": "SYMP",
"exchange": 1,
"exchangeInstrumentId": 2885,
"orderSide": "BUY",
"entryOrderType": "LIMIT",
"quantity": 1,
"limitPrice": 1200,
"squarOff": 1290,
"stopLoss": 1150
}
Response Body JSON
{
"type": "success",
"code": "s-calculateBoMargin-0001",
"description": "Request sent",
"result": {
"brokerageDeatils": {
"IsValid": true,
"MarginRequired": 1200,
"MarginAvailable": 9816624.5775,
"MarginShortfall": 0,
"ErrorMessage": ""
}
}
}
Code Examples
curl --location 'https://developers.symphonyfintech.in/1interactive/orders/bomargindetails' \
--header 'Authorization: xxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"clientID": "SYMP",
"exchange": 1,
"exchangeInstrumentId": 2885,
"orderSide": "BUY",
"entryOrderType": "LIMIT",
"quantity": 1,
"limitPrice": 1200,
"squarOff": 1290,
"stopLoss": 1150
}'
Exchange Status (GET)
Exchange Status indicates the availability of eligible exchanges for normal trading. It allows users to determine whether they can place an order or not.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| userID |
UserID
|
Y | User specific identification |
Response Body Parameters
| Parameter Name | Type | Description |
|---|---|---|
| exchangeSegment |
ExchangeSegment
|
ExchangeSegment
|
| exchangeMarketType |
MarketType
|
MarketType
|
| exchangeTradingSession |
TradingSession
|
TradingSession
|
Response Body JSON
{
"type": "success",
"code": "s-status-0002",
"description": "Exchange status available",
"result": {
"marketStatus": [
{
"exchangeSegment": "NSECM",
"exchangeMarketType": "AUCTION",
"exchangeTradingSession": "NormalEnd"
},
{
"exchangeSegment": "NSECM",
"exchangeMarketType": "CALLAUCTION2",
"exchangeTradingSession": "PreOpenStart"
},
{
"exchangeSegment": "NSECM",
"exchangeMarketType": "ODDLOT",
"exchangeTradingSession": "NormalEnd"
},
{
"exchangeSegment": "NSECM",
"exchangeMarketType": "NORMAL",
"exchangeTradingSession": "PreClosingStart"
},
{
"exchangeSegment": "NSEFO",
"exchangeMarketType": "NORMAL",
"exchangeTradingSession": "NormalEnd"
},
{
"exchangeSegment": "BSECM",
"exchangeMarketType": "AUCTION",
"exchangeTradingSession": "NormalStart"
},
{
"exchangeSegment": "BSECM",
"exchangeMarketType": "CALLAUCTION2",
"exchangeTradingSession": "NormalEnd"
},
{
"exchangeSegment": "BSECM",
"exchangeMarketType": "NORMAL",
"exchangeTradingSession": "PreClosingStart"
}
]
}
}
Code Examples
curl --location 'https://developers.symphonyfintech.in/1interactive/status/exchange?userID=SYMPTEST' \ --header 'Authorization: xxxxxx'
Exchange Message (GET)
The exchange sends various messages to connected brokers, such as information about bans, circuit limits, and news about listed companies. Users can access messages relevant to them using this API.
URL
Request Body Parameters
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| exchangeSegment |
ExchangeSegment
|
Y | ExchangeSegment |
Response Body Parameters
| Parameter Name | Type | Description |
|---|---|---|
| exchangeSegment |
ExchangeSegment
|
ExchangeSegment
|
| ExchangeTimeStamp |
ExchangeTimeStamp
|
Date and time provided by the exchange when a specific event or message was generated. |
| BroadcastMessage |
BroadcastMessage
|
Message Send by exchange |
Response Body JSON
{
"type": "success",
"code": "s-messages-0001",
"description": "Exchange messages",
"result": {
"messageList": [
{
"ExchangeSegment": 2,
"ExchangeTimeStamp": 1452777915,
"BroadcastMessage": "Listing -> CORPORATE ANNOUNCEMENTS",
"SequenceId": 1904678908069178,
"ExchangeInstrumentID": 0,
"MessageCode": 1506,
"MessageVersion": 8,
"TokenID": 0,
"ApplicationType": 0,
"SequenceNumber": 1904678908069177
}
]
}
}
Code Examples
curl --location 'https://developers.symphonyfintech.in/1interactive/messages/exchange?exchangeSegment=NSECM' \ --header 'Authorization: xxxxxx' \ --data ''
Socket Streaming
Introduction
order to get streaming interactive events, you need to use the socket.io library.
For more
information, you can visit:
https://socket.io/.
Real-Time Streaming Flow
Once the connection is established, real-time streaming can be achieved by listening to the socket for relevant interactive events. You can receive the corresponding streaming data on these events.
Follow the steps below to enable real-time streaming of interactive events:
-
Establish the socket connection.
-
Register interactive events on the socket connection.
-
Listen for real-time interactive events to receive live updates.
Establishment of socket connection
import socketio
url = "https://developers.symphonyfintech.in" # base url
userID = "SYMP" #userID received from login api
token = "xxxxxx" #Token generated from login api
apiType = "INTERACTIVE"
socketio_path = "/1interactive/socket.io" #note:- /1interactive is endpoint you have recieved from hostlookup load balance step
logger = False # or "True"
sio = socketio.Client()
if __name__ == "__main__":
try:
connectionString = f"{url}?token={token}&userID={userID}&apiType={apiType}"
sio.connect(url=connectionString, socketio_path=socketio_path, transports=["websocket"])
sio.wait()
except KeyboardInterrupt:
print("Stopping client...")
sio.disconnect()
except Exception as e:
print("Connection failed:", e)
Note:
Connect
This event triggers when socket connection is successfull.
@sio.on("connect")
def connect():
print("Connection Established")
Joined
If a successful connection is established with the server, this event will be raised to indicate that the user has been connected.
@sio.on("joined")
def on_joined(data):
print("Socket Joined", data)
Error
In case of any error with the server, this event will be raised along with the cause of the error. For example, if you send an incorrect token while connecting, the server will raise this event and disconnect your socket connection.
@sio.on("error")
def on_error(data):
print("Error", data)
Disconnect
In case a socket disconnection occurs with the server, this event will be raised to indicate the disconnection.
@sio.on("disconnect")
def on_disconnect():
print("Disconnected")
Orders
To listen for order state change events such as New, Filled, Partially Filled, etc., register for this event.
@sio.on("ordert")
def on_order(data):
print("Order Received:- ",data)
Below is order object you will receive when any of your order state changes
{
"LoginID": "SYMP1",
"ClientID": "SYMP1",
"AppOrderID": 648468730,
"OrderReferenceID": "",
"GeneratedBy": "WSAPI",
"ExchangeOrderID": "1005239196374108",
"OrderCategoryType": "NORMAL",
"ExchangeSegment": "NSECM",
"ExchangeInstrumentID": 16921,
"OrderSide": "BUY",
"OrderType": "LIMIT",
"ProductType": "NRML",
"TimeInForce": "DAY",
"OrderPrice": 0,
"OrderQuantity": 1,
"OrderStatus": "New",
"OrderAverageTradedPrice": 2615.8,
"LeavesQuantity": 1,
"CumulativeQuantity": 0,
"OrderDisclosedQuantity": 0,
"OrderGeneratedDateTime": "14-05-2021 11:17:29",
"ExchangeTransactTime": "14-05-2021 11:17:30",
"LastUpdateDateTime": "14-05-2021 11:17:29",
"OrderExpiryDate": "01-01-1980 00:00:00",
"CancelRejectReason": "",
"OrderUniqueIdentifier": "454845",
"OrderLegStatus": "SingleOrderLeg",
"IsSpread": false,
"BoLegDetails": "",
"MessageCode": 4,
"MessageVersion": 4,
"ApplicationType": 0,
"SequenceNumber": 0
}
Trade
When any order gets executed (fully or partially filled), a new trade event will be generated. The server will raise trade events, and you can listen to these events by registering for them.
@sio.on("trade")
def on_trade(data):
print("Trade Recieved:- ", data)
Below is trade object you will receive when any trade happens on your account.
{
"LoginID": "YMS",
"ClientID": "YMSCLI",
"AppOrderID": 648468731,
"OrderReferenceID": "",
"GeneratedBy": "TWSAPI",
"ExchangeOrderID": "1005239196374109",
"OrderCategoryType": "NORMAL",
"ExchangeSegment": "NSECM",
"ExchangeInstrumentID": 16921,
"OrderSide": "BUY",
"OrderType": "Limit",
"ProductType": "NRML",
"TimeInForce": "DAY",
"OrderPrice": 0,
"OrderQuantity": 1,
"OrderStatus": "Filled",
"OrderAverageTradedPrice": 44.00,
"LeavesQuantity": 0,
"CumulativeQuantity": 1,
"OrderDisclosedQuantity": 0,
"OrderGeneratedDateTime": "14-05-2021 11:17:29",
"ExchangeTransactTime": "14-05-2021 11:17:30",
"LastUpdateDateTime": "14-05-2021 11:17:29",
"OrderUniqueIdentifier": "454845",
"OrderLegStatus": "SingleOrderLeg",
"LastTradedPrice": 44,
"LastTradedQuantity": 1,
"LastExecutionTransactTime": "14-05-2021 11:17:29",
"ExecutionID": "1320599196383056",
"ExecutionReportIndex": 3,
"IsSpread": false,
"MessageCode": 9005,
"MessageVersion": 4,
"TokenID": 0,
"ApplicationType": 0,
"SequenceNumber": 0
}
Position
If any position change occurs in your account, the server will raise this event to indicate the updated position. By registering for this event, you can track position changes.
@sio.on("position")
def on_position(data):
print("Position Recieved:- ", data)
Below is Position object that you will receive when any position change happens on your account.
{
"LoginID": "SYMP1",
"AccountID": "SYMP1",
"TradingSymbol": "ACC",
"ExchangeSegment": "NSECM",
"ExchangeInstrumentID": "22",
"ProductType": "CNC",
"Multiplier": 1,
"Marketlot": 1,
"BuyAveragePrice": 41.78,
"SellAveragePrice": 41.63,
"LongPosition": 5,
"ShortPosition": 0,
"NetPosition": 5,
"BuyValue": 1671.00,
"SellValue": 2498.00,
"NetValue": 827.00,
"UnrealizedMTM": 0,
"RealizedMTM": 0,
"MTM": 0,
"BEP": 0,
"SumOfTradedQuantityAndPriceBuy": 1671.00,
"SumOfTradedQuantityAndPriceSell": 2498.00,
"StatisticsLevel": "ParentLevel",
"IsInterOpPosition": false,
"childPositions": [{}],
"MessageCode": 9002,
"MessageVersion": 1,
"TokenID": 0,
"ApplicationType": 0,
"SequenceNumber": 0
}
Trade conversion
If any trade conversion occurs in your account, the server will raise this event to indicate the trade conversion status. By registering for this event, you can track the trade conversion status.
@sio.on("tradeConversion")
def on_tradeconversion(data):
print("TradeConversion Recieved:- ", data)
Below is Position object that you will receive when any position change happens on your account.
{
"LoginID": "SYMP1",
"ClientID": "SYMP1",
"Success": true,
"ErrorMessage": "",
"OriginalProduct": "MIS",
"TargetProduct": "NRML",
"OriginalQty": 10,
"TargetQty": 10,
"EntityType": "Client",
"ExchangeSegment": "NSECM",
"ExchangeInstrumentId": 0,
"TargetEntityId": "SYMP1",
"NetValue": -2587.5,
"Status": "PositionConverted",
"RejectionReason": "",
"RejectedBy": "",
"Price": -2587.5,
"NOWTimeStamp": "2021-10-29T17:22:25.945707",
"OrderSide": "Buy",
"IsProOrder": false,
"MessageCode": 9007,
"MessageVersion": 4,
"TokenID": 0,
"ApplicationType": 0,
"SequenceNumber": 0
}
GTT Order
When any GTT order gets executed, a new trade event will be generated. The server will raise trade events & you can listen to this event by registering it.
@sio.on("gttOrder")
def on_gttOrder(data):
print("GTT Order Recieved:- ", data)
Below is the gttOrder object that you will receive when any gttOrder change happens on your account.
{
"LoginID": "SYMP",
"ClientID": "SYMP1",
"AppOrderID": "1311100040",
"OrderReferenceID": "",
"GeneratedBy": "Web",
"ExchangeOrderID": "",
"OrderCategoryType": "NORMAL",
"ExchangeSegment": "NSECM",
"ExchangeInstrumentID": 1333,
"OrderSide": "BUY",
"OrderType": "Limit",
"ProductType": "CNC",
"TimeInForce": "None",
"OrderPrice": 1500,
"TradingSymbol": "HDFCBANK",
"OrderQuantity": 1,
"OrderStopPrice": 1500,
"OrderStatus": "New",
"OrderAverageTradedPrice": "",
"LeavesQuantity": 1,
"CumulativeQuantity": 0,
"OrderDisclosedQuantity": 0,
"OrderGeneratedDateTime": "21-04-2026 16:51:27",
"ExchangeTransactTime": "21-04-2026 16:51:27",
"LastUpdateDateTime": "21-04-2026 16:51:27",
"OrderExpiryDate": "21-04-2026 16:51:27",
"CancelRejectReason": "",
"OrderUniqueIdentifier": "",
"OrderLegStatus": "SingleOrderLeg",
"BoLegDetails": 0,
"IsSpread": false,
"SecurityType": "",
"MessageCode": 9004,
"MessageVersion": 4,
"TokenID": 0,
"ApplicationType": 0,
"SequenceNumber": 0
}
GTT Order Rejection
When any GTT order gets rejected, a new trade event will be generated. The server will raise trade events & you can listen to this event by registering it.
@sio.on("gttOrderRejection")
def on_gttOrderRejection(data):
print("GTT Order Rejection Recieved:- ", data)
Below is gttOrderRejection object that you will receive when any gttOrder rejection change happens on your account.
{
"Type": 783,
"Data": "",
"ErrorString": "Gateway:Freeze Quantity: Required Limit[1000000] Freeze Quantity Limit[6]",
"ClientID": "SYMP",
"UserID": "SYMP1"
}
Market Status Update
marketStatusUpdate
@sio.on("marketStatusUpdate")
def on_marketStatusUpdate(data):
print("marketStatusUpdate Recieved:- ", data)
Below is marketStatusUpdate.
{
"timeStamp": "9-16-2025 1:30:00 PM",
"exchangeSegment": "BSECM",
"marketSession": "NormalStart"
}
Exchange Adapter State
exchangeAdapterState
@sio.on("exchangeAdapterState")
def on_exchangeAdapterState(data):
print("exchangeAdapterState Recieved:- ", data)
Below is exchangeAdapterState.
Logout
When your session is logged out by the server, it will raise this event. By registering for this event, you can track your session state.
@sio.on("logout")
def on_logout(data):
print("Logout Recieved:- ", data)
Note: Here you will not get any data object from the server. This event itself notifies that the session has been closed by the server.
MTM Calculation
MTM represents the realized and unrealized profit or loss calculated using the user’s current position and the instrument’s Last Traded Price (LTP). MTM values are not provided in Interactive API responses; users must compute MTM on their end using current position that can be fetched by GET Position api or Position data recieved on Interactive websocket, LastTradedPrice for particular instrument can be fetched using marketdata apis & websocket. referring the sample logic provided below.
openBuyQty = int(position["OpenBuyQuantity"])
openSellQty = int(position["OpenSellQuantity"])
# Realized MTM
def safe_div(numerator, denominator):
return float(numerator) / float(denominator) if denominator else 0.0
if openBuyQty == 0 or openSellQty == 0:
realizedMTM = 0.0
else:
totalSquaredOffQuantity = min(openBuyQty, openSellQty)
sellWeightedAvgPrice = safe_div(position["SumOfTradedQuantityAndPriceSell"], openSellQty)
buyWeightedAvgPrice = safe_div(position["SumOfTradedQuantityAndPriceBuy"], openBuyQty)
realizedMTM = (
totalSquaredOffQuantity
* (sellWeightedAvgPrice - buyWeightedAvgPrice)
* (float(position["Multiplier"]) * PriceNumerator / PriceDenominator)
)
# Unrealized MTM
if int(position["Quantity"]) > 0:
lastPrice = lastPrice if lastPrice and lastPrice != 0 else closePrice
squareOfPrice = lastPrice
if squareOfPrice == 0.0:
unRealizedMTM = 0.0
else:
buyWeightedAvgPrice = float(position["SumOfTradedQuantityAndPriceBuy"]) / float(position["OpenBuyQuantity"])
unRealizedMTM = abs(int(position["Quantity"])) * (squareOfPrice - buyWeightedAvgPrice) * (float(position["Multiplier"]) * PriceNumerator / PriceDenominator)
else:
lastPrice = lastPrice if lastPrice and lastPrice != 0 else closePrice
squareOfPrice = lastPrice
if squareOfPrice == 0.0:
unRealizedMTM = 0.0
else:
sellWeightedAvgPrice = float(position["SumOfTradedQuantityAndPriceSell"]) / float(position["OpenSellQuantity"])
if not sellWeightedAvgPrice or sellWeightedAvgPrice != sellWeightedAvgPrice:
sellWeightedAvgPrice = 0.0
unRealizedMTM = ( abs(int(position["Quantity"])) * (sellWeightedAvgPrice - squareOfPrice) * (float(position["Multiplier"]) * PriceNumerator / PriceDenominator) )
totalMTM = realizedMTM + unRealizedMTM