Download as pdf or txt
Download as pdf or txt
You are on page 1of 71

OMEx (ODIN Message Extender) –

API DOCUMENTATION

Version: 1.0.0.11
OMEx (Odin Message Extender) – API Documentation

REVISION HISTORY
Name Date Version Rest Summary of changes
API
Version
Bhushit Anjaria 26/10/2018 1.0.0.0 1.0.0.0 Initial Draft Document
Bhushit Anjaria 27/11/2018 1.0.0.1 1.0.0.1 Added few columns in Trade response
and changed few element names
Bhushit Anjaria 12/12/2018 1.0.0.2 1.0.0.2 API for sync request is added in the
document
Bhushit Anjaria 17/01/2019 1.0.0.3 1.0.0.3 Multileg API added in the document
Dhanashree Gavade 14/06/2019 1.0.0.4 1.0.0.4 Position Conversion
User Status (Login/Market Allowed,
Active/Inactive user, CRP/CFT change,
Password change/Reset, Lock/Unclok,
User logout)
Market Status
Dhanashree Gavade 30/8/2019 1.0.0.5 1.0.0.5 GTD Order Reponses
GTD for sync request/response
Swapnil Nangare 27/09/2019 1.0.0.6 1.0.0.6 Client Order Number field description
updated
Online Stoploss Trigger Response
added

Dhanashree Gavade 04/10/2019 1.0.0.7 1.0.0.7 Sync Rejected Order Request


Sync Rejected Order Response
Dhanashree Gavade 11/10/2019 1.0.0.8 1.0.0.8 User Status - Event Type (User login)

Dhanashree Gavade 15/01/2020 1.0.0.8 1.0.0.8 GTD Order Status table added in
Annexure
GTD Order Response field description
updated.
Note added for Surveillance Failed
orders.
Dhanashree Gavade 30/1/2020 1.0.0.9 1.0.0.9 Order Price added in Online Trade
Response and Sync Trade Response
Change in description of formatting of
Time parameter.
Dhanashree Gavade 03/03/2020 1.0.0.10 1.0.0.10 Sync Position Conversion Request
Sync Position Conversion Response
Dhanashree Gavade 12/02/2020 1.0.0.10 1.0.0.10 Unique Code added in all transactional
packet.
Dhanashree Gavade 22/09/2020 1.0.0.11 1.0.0.11 API Register Response changed.
HeartBeat packet
OMEx (Odin Message Extender) – API Documentation

REVIEW HISTORY
Reviewer Name Doc Version Date sent for Date Review Approved /
Reviewed review Filed Rejected (with
reasons)
Jey Ganesh 1.0.0.0 29/10/2018 30/10/2018 Approved
Jey Ganesh 1.0.0.1 27/11/2018 27/11/2018 Approved
Jey Ganesh 1.0.0.2 12/12/2018 12/12/2018 Approved
Jey Ganesh 1.0.0.3 17/01/2019 17/01/2019 Approved
Giridhar Nayak 1.0.0.4 15/06/2019 15/06/2019 Approved
Giridhar Nayak 1.0.0.5 30/08/2019 30/08/2019 Approved
Giridhar Nayak 1.0.0.6 28/09/2019 28/09/2019 Approved
Giridhar Nayak 1.0.0.7 04/10/2019 04/10/2019 Approved
Giridhar Nayak 1.0.0.8 15/01/2020 15/01/2020 Approved
Giridhar Nayak 1.0.0.9 31/1/2020 31/1/2020 Approved
Giridhar Nayak 1.0.0.10 14/02/2020 14/02/2020 Approved
Giridhar Nayak 1.0.0.11 23/09/2020 23/09/2020 Approved
OMEx (Odin Message Extender) – API Documentation

The Purpose of this Manual


This document describes the interface message to be used to with the ODIN™ Trading engine using a
web based or a client application.
No part of this document may be copied, reproduced, stored in a retrieval system, or transmitted, in
any form or by any means whether, electronic, mechanical, or otherwise without the prior written
permission of 63 moons technologies limited (formerly Financial Technologies India Limited.

Although 63MT has made every effort to provide accurate information at the date of publication, it
does not give any representations or warranties as to the accuracy, reliability or completeness of the
information in this document. Accordingly, 63MT, its subsidiaries and their employees, officers and
contractors shall not, to the extent permitted by law, be liable for any direct or indirect loss arising in
any way (including by way of negligence) from or in connection with anything provided in or omitted
from this document or from any action taken, or inaction, in reliance on this document.

63MT reserves the right to amend details in this document at any time and without notice.
OMEx (Odin Message Extender) – API Documentation

The Target Audience


This document is written for information technology personnel of user organizations and third-party
software developers.
Within these groups of users, the manual is aimed at two audiences:
• system designers and programmers
• business analysts
System designers and programmers are the primary target audience as they will be responsible for the
development of software using the WEB REST API.
Business analysts are the secondary target audience of this manual

Change Notification
This document is available from 63 Moons technologies Ltd. on a subscription basis. It is supplied to
Open Interface users as part of their contractual arrangements relating to the use of WEB REST API.
Updates to this Manual will be issued periodically to all manual holders incorporating notified changes
and referencing the revised version.

Change Implementation
In general, changes to Open Interface messages and values will be implemented by releasing a new
software version on the implementation date. Users will be required to move over to the new version
on the implementation date, and the old version will not be supported after that date. However, there
may be circumstances in which the previous version will be maintained for a short period to facilitate
the transition. This will be advised when the change is notified.
OMEx (Odin Message Extender) – API Documentation

CONTENTS

1 General Guidelines ................................................................................................................. 8


2 Authentication ......................................................................................................................... 9
2.1 Authentication Request Parameters ................................................................................. 9
2.2 Authentication Response Parameters ............................................................................ 10
3 Register API Request ........................................................................................................... 11
3.1 Register .......................................................................................................................... 11
3.1.1 Register API Request Parameters ........................................................................... 11
3.1.2 Register Response ................................................................................................... 12
3.2 Logon Request for Web Socket...................................................................................... 13
3.2.1 Login Response to web socket ................................................................................ 14
4 Online Order Response ........................................................................................................ 15
4.1 Online Order Response .................................................................................................. 15
4.1.1 Online Order Response ........................................................................................... 15
5 Online Trade Response ........................................................................................................ 18
5.1 Online Trade Response ................................................................................................. 18
5.1.1 Online Trade Response ........................................................................................... 18
6 Online Multi Leg Order Response ........................................................................................ 21
6.1 Online Multi Leg Order Response .................................................................................. 21
7 Sync Orders.......................................................................................................................... 24
7.1 Sync Order Request ....................................................................................................... 24
7.2 Sync Order Response .................................................................................................... 25
8 Sync Trades ......................................................................................................................... 29
8.1 Sync Trade Request ....................................................................................................... 29
8.2 Sync Trade Response .................................................................................................... 29
9 Sync Multi Leg Orders .......................................................................................................... 33
9.1 Sync Multi Leg Order Request ....................................................................................... 33
9.2 Sync Multi Leg Orders Response ................................................................................... 34
10 Position Conversion ............................................................................................................ 38
10.1 Position Conversion ..................................................................................................... 38
10.1.1 Position Conversion ............................................................................................... 38
11 User / Market Status ........................................................................................................... 41
OMEx (Odin Message Extender) – API Documentation

11.1 User Status................................................................................................................... 42


11.2 Market Status ............................................................................................................... 43
12 Online GTD Order Response ............................................................................................. 44
12.1 Online GTD Order Response ....................................................................................... 44
12.1.1 Online GTD Order Response ................................................................................. 44
13 Sync GTD Orders ............................................................................................................... 47
13.1 Sync GTD Order Request ............................................................................................ 47
13.2 Sync GTD Order Response.......................................................................................... 48
14 Online Stoploss Trigger Response ..................................................................................... 52
14.1 Online Stoploss Trigger Response ............................................................................... 52
14.1.1 Online Stoploss Trigger Response ......................................................................... 52
15 Sync Rejected Orders......................................................................................................... 55
15.1 Sync Rejected Order Request ...................................................................................... 55
15.2 Sync Rejected Order Response ................................................................................... 57
16 Sync Position Conversion ................................................................................................... 61
16.1 Sync Position Conversion Request .............................................................................. 61
16.2 Sync Position Conversion Response ........................................................................... 62
17 HeartBeat ........................................................................................................................... 66
17.1 HeartBeat Packet ......................................................................................................... 66
18 Annexure ............................................................................................................................ 67
OMEx (Odin Message Extender) – API Documentation

1 General Guidelines

1. The API call listed below will work on HTTP Request and Response basis. Each of the requests
and responses will be in specific JSON format.
2. JSON values in request and response are string values.
3. All the API requests should have the Request Id as part of the request body. ODIN TPA system
will echo back the request id in the response for the calling system to identify the
requests\transactions uniquely.
4. Request should contain the base64 encoded system access key (shall be shared manually) as a
part of request body and will be used as authentication for security.
5. API Calling format is as mentioned below
https://< domain name >/OTPA/V1/<apiname>
Method: POST
Domain_Name: This will be server details where the server is hosted.
6. Odin TPA system will expose the following REST API calls:
a. Authenticate
b. RegisterAPIRequest
c. LoginToWebSocket
7. Rest Request Parameters
Following are the parameters required for request in JSON format.
All the requests after the Authentication Request should contain the Authorization Token to be passed in
REST Request header.
Note:
➢ Authorization Token is the token which is received from OTPA as jToken in
Authentication Response (Refer: Authentication response in section 2.2).
➢ Authorization Token will be blank in case of Authentication Request.
8. In case online order and trade message send request to third party web hook is failed
then system would try to make an attempt to push messages to the web hook for ‘n’
(configurable) number of times. In case all the attempts to web hook are failed then
OTPA web service will declare this third-party app as disconnected and will not send
any further online order and trade messages. To start receiving online order and trade
messages third party system must resend authentication and registration request again.
9. Price will be multiplied by Decimal locator Provided by exchange in scrip master. For
example, for NSECDS & BSECDS price is multiplied by 10,000,000(1 Crore) and for
MCXSX Currency segment price is multiplied by 10,000 (10 thousand)
OMEx (Odin Message Extender) – API Documentation

2 Authentication
API Name Authenticate
URL <protocol>://<domain name>/<VirtualDir>/<URL>

Example:
https://localhost:8080/OTPA/V1/Authenticate

Description Invoke this API to get the authorization token to use any further API requests.
“API key” and “secret key” are required to generate the authorization token.

The authorization token is valid for one day i.e. till 11:59:59 PM on the day it
is created. The user must get a new authorization token every day and has to
use the latest token for the subsequent requests.

2.1 Authentication Request Parameters


Following are the parameters required for request in JSON format.
Common parameters referred to as Request Info throughout the document are as mentioned below.

Parameter Data Type Description


jAPIKey varchar(255) api key provided by 63
moons
jSecretKey varchar(255) secret key provided by 63
moons
jRequestID varchar(255) Echo back field

Example:
Request = {
jAPIKey: <API Key>,
jSecretKey: <Secret Key>,
jRequestID: < Echo back field >
}
OMEx (Odin Message Extender) – API Documentation

2.2 Authentication Response Parameters


ResponseObject property contains below parameters in JSON object.

Parameter Data Type Description


jRequestID varchar(255) Echo back field
jResponseID varchar(255) System generated alpha numeric id
jStatuscode Int 1= Success, -1 = Failure
jErrorString varchar(255) Free Flowing Error Message
jToken varchar(512) Unique Token Number which should be
passed in further requests as part of
Authorization Token.

Example:
Response = {
jRequestID : <Echo back field>,
jResponseID : <System generated alpha numeric id>,
jStatuscode : <1= Success, -1 = Failure>,
jErrorString : <Free Flowing Error Message>,
jToken: <should be passed in further request. Valid till 11:59pm>,
}
OMEx (Odin Message Extender) – API Documentation

3 Register API Request

3.1 Register
API Name RegisterAPIRequest
URL <protocol>://<domain name>/<VirtualDir>/<URL>

Example:
https://localhost:8080/OTPA/V1/RegisterAPIRequest

Description This message is sent by the client for creating a session with the system. The trading
engine will authenticate the user by validating the request and respond with a
response message. Registration Request must contain jToken received in
Authentication Request response

3.1.1 Register API Request Parameters


Request comprises of the following

Parameter Data Type Mandatory / Description


Optional
jRequestID varchar M Echo back field
(255)
jToken varchar M Authentication token received in Authentication
(512) response
jConnMode Int M 1 = Response to the web hook
2 = Response to the web socket
jURL varchar O Web hook URL is mandatory in case
(512) jConnectionMode is 1

Example:
request: {

jRequestID: <ServerID>,
jToken: <Token>,
jConnMode : <response_mode>,
URL: <Web hook URL>
}
OMEx (Odin Message Extender) – API Documentation

3.1.2 Register Response


ResponseObject property contains below parameters in JSON object.
Parameter (Key) Data Type Description
jRequestID varchar (255) Echo back field
jResponseID varchar (255) System generated alpha numeric id
jWebSocketDetail varchar (512) In case Registration mode is Web Socket then this field
will contain web socket detail.

<ws/wss>://<domain name / IP address>:<port>


jStatusCode Int 1= Success, -1 = Failure
jHeartbeatIntervalInSecs Int After provided timeinterval ,system will send
HeartBeatPacket if no other message is available to
sent.
jErrorString varchar (512) Free Flowing Error Message

Example:
response: {

jRequestID: <ServerID>,
jResponseID: <response_id>,
jWebSocketDetail: <ws/wss>://<domain name / IP address>:<port>,
jStatuscode : <1= Success, -1 = Failure>,
jHeartbeatIntervalInSecs: <TimeInterval>,
jErrorString : <Free Flowing Error Message>
}
OMEx (Odin Message Extender) – API Documentation

3.2 Logon Request for Web Socket

API Name LoginToWebSocket


URL <protocol>://<domain name:port>/<VirtualDir>/<URL>
Example:
https://localhost:8080/OTPA/V1/LoginToWebSocket

Description This request is for checking socket connectivity. Once logon request is successful O
start sending online order and trade messages. Login Request must contain jToken
received in Authentication Request response

Request comprises of the following elements:

Parameter Data Type Description


jMessageType varchar(15) WEB_LOGON_REQ should
be sent as request message
type
jAPIKey varchar(255) api key provided by 63
moons
jSecretKey varchar(255) secret key provided by 63
moons
jToken varchar (512) Authentication token received
in Authentication response
jRequestID varchar(255) Echo back field

Example:
Socket Logon Request = {
jMessageType: “WEB_LOGON_REQ”,
jAPIKey: <API Key>,
jSecretKey: <Secret Key>,
jToken: <Token received in the Authentication Response>,
jRequestID: < Echo back field >
}
OMEx (Odin Message Extender) – API Documentation

3.2.1 Login Response to web socket


ResponseObject property contains below parameters in JSON object. Response shall be sent in the web socket in
which login request is received.

Parameter Data Type Description


jMessageType varchar(15) WEB_LOGON_RES will be sent as
response message type
jRequestID varchar(255) Echo back field
jResponseID varchar(255) System generated alpha numeric id
jStatuscode Int 1= Success, -1 = Failure
jErrorString varchar(255) Free Flowing Error Message

Example:
Socket Logon Response = {
jMessageType: “WEB_LOGON_RES”,
jRequestID : <Echo back field>,
jResponseID : <System generated alpha numeric id>,
jStatuscode : <1= Success, -1 = Failure>,
jErrorString : <Free Flowing Error Message>
}
OMEx (Odin Message Extender) – API Documentation

4 Online Order Response

4.1 Online Order Response


Name Online Order Response
Description Online order response to the third party

4.1.1 Online Order Response


ResponseObject property contains key named objJSONRows with below parameters in an JSON objects.
Parameter (Key) Data Type Description
MessageType Varchar(10) ORD_NRML
ManagerID Int Manager Id
OrderNumber varchar(50) For order entry request must be 0. In case of
Modification/Cancellation request, this needs to be filled
before sending
CliOrderNumber Int Gateway/Client order number[System Generated]
Exchange varchar(10) Exchange for which order is to be placed
ScripCode Int Scrip code
Symbol varchar(20) Exchange provided Security symbol
Series varchar(3) Exchange provided Security Series
InstrumentName varchar(20) Instrument name provided in security information.
Valid value will as given bellow
Equity = blank
Future Index = FUTIDX
Interest Rate Future = FUTINT
Future Stock = FUTSTK
Option Index = OPTIDX
Option Stock = OPTSTK
MCX/NCDEX Futures = FUTCOM
MCXSpot = COM
NCDEXSpot = COMDTY
NSE Currency Future = FUTCUR, FUTIRD, FUTIRT, OPTCUR
NSE Currency Spot = INDEX, UNDCUR, UNDIRD, UNDIRT

ExpiryDate varchar(10) Expiry Date


OMEx (Odin Message Extender) – API Documentation

Ddmmmyyyy e.g 24JUN2004


Applicable for Future and option segment only
StrikePrice int Exchange provided Strike price
(in multiples of 100)
Applicable for options only
Option_Type varchar(2) Option Type
Applicable for options only
Buy_Sell int Value: 1 → Buy
2 → Sell
OrderOriginalQty int Total Quantity of an Order
e.g 12500
PendingQty int Pending quantity
TradedQTY Int Traded Quantity
DQ int Disclose quantity
Specifies the quantity that has to be disclosed to the
market e.g 2500
DQRemaining int Disclose quantity Remaining
OrderPrice int Specifies the price in paise at which the order is placed.

TriggerPrice int Trigger Price at which Stop loss Order should be active in
market. This field is applicable only for a StopLoss order

OrderType int Order Type


MarketType Int Normal = 1
Auction = 2
PreOpen = 3
OrderStatus int OrderStatus
Reason varchar(255) Rejection Reason
OrderValidity int Validity
Days Int Number of days
ProCli Int Value: 2 → PRO
1 → Client
UserID Varchar(16) Exchange User Id
PartCode varchar(25) Participant ID
OrderEntryTime datetime Date and Time will be 24 Hour Format like:
15Jun2019 15.25.15
LastModifiedTime Datetime Time when order was confirmed
CPID varchar(6) CP Id
UCC varchar(6) Alias UCC Code
Product Varchar(5) ProductType of the order
InitiatedBy varchar(25) Initiated from application
OMEx (Odin Message Extender) – API Documentation

ModifiedBy varchar(25) Modified from application


InitiatedByUserId varchar(25) Initiated from user id
ModifiedByUserId varchar(25) Modified from user id
LegIndicator varchar(25) Blank value
UserRemarks varchar(10) User Remarks
Misc varchar(10) Values will be:
SPO-LMT, SPO-MKT, PO-MKT, PO-LMT
SpreadFlag varchar(10) Normal order = 0
Spread order = 1
SpreadPrice int Spread Price
AMOOrderID varchar(30) Order id for AMO/ EqGTD orders otherwise blank
GTDOrderStatus int GTDOrderStatus
MessageSequenceNumber Int64 Running Message Sequence Number. For order’s latest
status always consider max sequence number.
UniqueCode varchar(12) Alphanumeric value with special characters.

Note: Consider order status of 2nd packet for status updation in case of Surveillance rejected order
OMEx (Odin Message Extender) – API Documentation

5 Online Trade Response

5.1 Online Trade Response

Name Online Trade Response


Description Online trade response to the third party

5.1.1 Online Trade Response


ResponseObject property contains key named objJSONRows with below parameters in an JSON objects
Parameter (Key) Data Type Description
MessageType Varchar(10) TRD_MSG
ManagerID Int Manager Id
TradeNumber int Trade No
OrderNumber varchar(50) For order entry request must be 0. In
case of Modification/Cancellation
request, this needs to be filled before
sending
CliOrderNumber Int Gateway/Client order number[System
Generated]
Exchange varchar(10) Exchange
ScripCode Int Scrip code
Symbol varchar(20) Exchange provided Security symbol
Series varchar(3) Exchange provided Security Series
InstrumentName varchar(20) Instrument name provided in security
information.
Valid value will as given bellow
Equity = blank
Future Index = FUTIDX
Interest Rate Future = FUTINT
Future Stock = FUTSTK
Option Index = OPTIDX
Option Stock = OPTSTK
MCX/NCDEX Futures = FUTCOM
MCXSpot = COM
NCDEXSpot = COMDTY
NSE Currency Future = FUTCUR,
OMEx (Odin Message Extender) – API Documentation

FUTIRD, FUTIRT, OPTCUR


NSE Currency Spot = INDEX, UNDCUR,
UNDIRD, UNDIRT

ExpiryDate varchar(10) Expiry Date


Ddmmmyyyy e.g 24JUN2004
Applicable for Future and option
segment only
StrikePrice int Exchange provided Strike price
(in multiples of 100)
Applicable for options only
Option_Type varchar(2) Option Type
Applicable for options only
Buy_Sell int Value: 1 → Buy
2 → Sell
TradeQty Int Traded Quantity
TradedPrice int Trade price in paisa.
45065 (in multiples of 100)
OrderOriginalQty int Total Quantity of an Order
e.g 12500
PendingQty int Pending quantity
DQ int Disclose quantity
Specifies the quantity that has to be
disclosed to the market e.g 2500
DQRemaining int Disclose quantity Remaining
QuantityTradedToday Int Total no of quantity traded inclusive of
the current trade quantity
OrderType int Order Type
Days Int Number of days
ProCli Int Value: 2 → PRO
1 → Client
UserID Varchar(16) Exchange User Id
PartCode varchar(25) Participant ID
TradeTime datetime Date and Time will be 24 Hour Format
like: 15Jun2019 15.25.15
OrderTime datetime Date and Time will be 24 Hour Format
like: 15Jun2019 15.25.15
OrderLastModifiedTime Datetime Time when order was confirmed
OMEx (Odin Message Extender) – API Documentation

CPID varchar(6) CP Id
UCC varchar(6) Alias UCC Code
Product Varchar(5) ProductType of the order
InitiatedBy varchar(25) Initiated from application
ModifiedBy varchar(25) Modified from application
InitiatedByUserId varchar(25) Initiated from user id
ModifiedByUserId varchar(25) Modified from user id
LegIndicator varchar(25) Normal Order = Blank
Spread Order = Blank
MAIN LEG INDICATOR = 9;
SL LEG INDICATOR = 10;
PROFIT LEG INDICATOR = 11;
UserRemarks varchar(10) User Remarks
Misc varchar(10) Values will be:
SPO-LMT, SPO-MKT, PO-MKT, PO-LMT

SpreadFlag varchar(10) Normal order = 0


Spread order = 1
SpreadPrice Int Spread Price
MessageSequenceNumber Int64 Running Message Sequence Number
OrderPrice int Order Price (Fresh order/ Modified
order) in paisa.
UniqueCode varchar(12) Alphanumeric value with special
characters.
OMEx (Odin Message Extender) – API Documentation

6 Online Multi Leg Order Response

6.1 Online Multi Leg Order Response


Name OnlineMultiLegOrderResponse
Description Online Multi Leg order response to the third party

Multileg Orders Details Responses

Parameter (Key) Data Type Description


MessageType Varchar(10) MULTILEG_ORDER_MSG
ManagerID Int Manager Id
CliOrderNumber Int Gateway/Client order number[System
Generated]
Exchange varchar (10) Exchange
OrderType Varchar(50) Order Type
BookType Varchar(10) Book type E.g. RL
OrderStatus Varchar (15) Order status
Reason Varchar(300) Reason code of rejection.
OrderValidity Order Validity.
ProCli Int Pro or Cli Flag
Values:
2 – PRO
1 - CLI
UserID Varchar (10) Exchange UserID
PartCode Varchar (12) Participant code
OrderEntryTime varchar (10) Order Entry Time in date – time –
15Jun2018 15.25.15
LastModifiedTime varchar (10) Order Last Modified Date & time – 15 Jun
2018 15.25.15
Alias varchar (5) Alias ID Otherwise blank
InitiatedBy varchar(25) Initiated from application
ModifiedBy varchar(25) Modified from application
InitiatedByUserId varchar(25) Initiated from user id
ModifiedByUserId varchar(25) Modified from user id
OMEx (Odin Message Extender) – API Documentation

PriceDifference int Price Difference of Spread tokens


1stExchangeOrderNumber Int First leg Exchange Order Number
1stLegScripToken Int First leg Scrip Token Number
1stLegSymbol Varchar (13) First Leg Security Name
1stLegInstrumentName Varchar (6) First Leg InstrumentName
1stLegExpiryDate Varchar (10) First Leg Expiry Date
Ddmmmyyyy e.g 24JUN2004
Applicable for Future and option segment
only For other blank
1stLegStrikePrice int First Leg Strike Price
(in paisa)
Applicable for options only For other -1
1stLegOptionType Varchar (2) First Leg Option Type
1stLegBuySell int First Leg Buy Or Sell Flag
Values:
1 – Buy
2 – Sell
1stLegOrderOriginalQty Int First Leg Order Original Quantity
1stLegPendingQty Int First Leg Pending Quantity
1stLegTradedQty Int First Leg Traded Quantity
1stLegOrderPrice int First Leg Order Price (In paisa). Not Applicable
for spread.
1stLegProduct Varchar(5) ProductType of the order
2ndExchangeOrderNumber Int Second leg Exchange Order Number
2ndLegScripToken Int Second leg Scrip Token Number
2ndLegSymbol Varchar (13) Second Leg Security Name
2ndLegInstrumentName Varchar (6) Second Leg InstrumentName
2ndLegExpiryDate Varchar (10) Second Leg Expiry Date
Ddmmmyyyy e.g 24JUN2004
Applicable for Future and option segment
only. For other blank
2ndLegStrikePrice int Second Leg Strike Price
(in paisa)
Applicable for options only. For other -1
2ndLegOptionType Varchar (2) Second Leg Option Type
2ndLegBuySell int Second Leg Buy or Sell Flag
Values:
1 – Buy
2 – Sell
OMEx (Odin Message Extender) – API Documentation

2ndLegOrderOriginalQty Int Second Leg Order Original Quantity


2ndLegPendingQty Int Second Leg Pending Quantity
2ndLegTradeQty Int Second Leg Traded Quantity
2ndLegOrderPrice int Second Leg Order Price (In Paisa). Not Applicable
for spread.
2ndLegProduct Varchar(5) ProductType of the order
3rdExchangeOrderNumber Int Third leg Exchange Order Number
3rdLegScripToken Int Third leg Scrip Token Number
3rdLegSymbol Varchar (13) Third Leg Security Name
3rdLegInstrumentName Varchar (6) Third Leg InstrumentName
3rdLegExpiryDate Varchar (10) Third Leg Expiry Date
Ddmmmyyyy e.g 24JUN2004
Applicable for Future and option segment
only. For other blank
3rdLegStrikePrice int Third Leg Strike Price
(in Paisa)
Applicable for options only For other -1
3rdLegOptionType Varchar (2) Third Leg Option Type
3rdLegBuySell int Third Leg Buy Or Sell Flag
Values:
1 – Buy
2 – Sell
3rdLegOrderOriginalQty Int Third Leg Order Original Quantity
3rdLegPendingQty Int Third Leg Pending Quantity
3rdLegTradedQty Int Third Leg Traded Quantity
3rdLegOrderPrice int Third Leg Order Price (In Paisa). Not Applicable
for spread.
3rdLegProduct Varchar(5) ProductType of the order
UserRemarks varchar (10) Remarks provided by User
Prot% Valid only for BSE. Applicable for nMarket
Orders.
MessageSequenceNumber Int (64) Running Message Sequence Number
UniqueCode varchar(12) Alphanumeric value with special characters.
OMEx (Odin Message Extender) – API Documentation

7 Sync Orders

7.1 Sync Order Request


API Name SyncOrders
URL <protocol>://<domain name:port>/<VirtualDir>/<URL>
Example:
https://localhost:8080/OTPA/V1/ SyncOrders

Description This request is for Sync all orders available in the system. On receiving Sync Order
request system will send state based order information messages. Sync Order
Request must contain jToken received in Authentication Request response

Request comprises of the following elements:

Parameter Data Type Description


jMessageType varchar(15) SYNC_ORDER _REQ should
be sent as request message
type
jManagerID varchar (50) Manager Identification
Number.
jCustomerId varchar (50) Customer ID assigned to user
jExchange Int Exchange
jToken varchar (512) Authentication token received
in Authentication response
jEntrySequenceNumber Int(64) Last Received Sequence
Number. Default 0 will be
considered if not provided.
jRequestID varchar(255) Echo back field

Example:
Socket Logon Request = {
jMessageType: “SYNC_ORDER_REQ”,
jManagerID: <MANAGER1>,
jCustomerId: <MEMBER>,
jToken: <Token received in the Authentication Response>,
jEntrySequenceNumber: <max sequence no>
jRequestID: < Echo back field >
}
OMEx (Odin Message Extender) – API Documentation

7.2 Sync Order Response

Parameter Data Type Description


jManagerId varchar (50) UserID assigned to user
jCustomerId varchar (50) Customer ID assigned to user
jLastSyncedPacket Int 1 = Last packet
jNoOfRecords Int Number of records
jOrderMessage Order Detail structure Array of order message with
the size received in
NoOfRecords
jRequestID varchar(255) Echo back field
jResponseID varchar(255) System generated alpha
numeric id

Order Detail structure:

Parameter (Key) Data Type Description


Order Number int Unique Order No

Cli Order Number Int Gateway/Client order number[System Generated]

Exchange varchar (10) Exchange


Scrip Token int Scrip Token

Symbol float Exchange provided Security Scrip name


Series varchar (3) Exchange provided Security Series
InstrumentName varchar (20) Instrument name provided in security information. Valid
value will as given bellow
Equity = blank
Future Index = FUTIDX
Interest Rate Future = FUTINT
Future Stock = FUTSTK
Option Index = OPTIDX
Option Stock = OPTSTK
MCX/NCDEX Futures = FUTCOM
MCXSpot = COM
OMEx (Odin Message Extender) – API Documentation

NCDEXSpot = COMDTY
NSE Currency Future = FUTCUR, FUTIRD, FUTIRT,
OPTCUR
NSE Currency Spot = INDEX, UNDCUR, UNDIRD, UNDIRT
Expiry Date varchar (10) Expiry Date
Ddmmmyyyy e.g 24JUN2004
Applicable for Future and option segment only. For other
blank
Strike Price float Exchange provided Strike price (in Rs.).
Applicable for options only. For other -1
Option Type varchar (2) Option Type Applicable for options only. For other blank
Buy Sell int Buy Sell Flag
Values:
1 – Buy
2 – Sell
Order Original Qty Int Original Quantity

Pending Qty Int Pending Quantity

TradedQTY Int Traded Quantity


DQ Int Disclosed Quantity
Order Price float Order Price (In Rs.)

Trigger Price float Trigger Price (In Rs.)

Order Type varchar (10) Order Type

Order Status Varchar (15) Order Status

Reason Varchar (300) Reason of rejection.


Order Validity Varchar (100) Order Validity

Pro/Cli Int Pro or Cli Flag


Values:
1 – CLI
2 - PRO
User ID Varchar (10) Client code. For Pro it should be blank
OMEx (Odin Message Extender) – API Documentation

DealerCode Varchar (5) Unique user identification Code.

Part Code Varchar (12) Participant code. Otherwise blank

Order Entry Time varchar (10) Order Entry Time in date – time – 15Jun2018 15.25.15

Last Modified Time varchar (10) Order Last Modified Date & time – 15 Jun 2018 15.25.15

Alias varchar (5) Alias ID Otherwise blank


Product varchar (5) ProductType of the order
Initiated By varchar (25) Initiated By E.g. ADMIN, NET NET etc
Modified By varchar (25) Modified By E.g. ADMIN, NET NET etc
Initiated By User Id varchar (10) Initiated by User Id

Modified By User Id varchar (10) Modified by User Id

Leg Indicator Int Spread Leg indicator

LocationID varchar (5) Location Id (PIN CODE + NSECTCLBRANCH ID+ NSECTCLID


+ALGO FLAG + VENDOR CODE)
User Remarks varchar (50) Remarks provided by User

Misc varchar (50) Miscellaneous details


Values will be:
SPO-LMT, SPO-MKT, PO-MKT, PO-LMT
SpreadFlag Int Spread Flag
Value: 1 → Spread
0 → Normal
Spread Price float Spread Price (In Rs.)

AMO Order ID Varchar (50) Order id for AMO/ EqGTD orders otherwise blank

SequenceNo Int(64) Incremental Number.


ManagerId Int Manager Id
OMEx (Odin Message Extender) – API Documentation

Days Int Number Of Days


UniqueCode varchar(12) Alphanumeric value with special characters.

Example:
jData: {
"ManagerID": "KOTAL_10.0.0.1",

"CustomerId ": “KOTAK”,

“NoOfRecords” : 6
“OrderDetail” : [

{“MessageCode” : 2000, “OrderNumber” : 1, … … … … … …},

{“MessageCode” : 2000, “OrderNumber” : 2, … … … … … …},

{“MessageCode” : 2000, “OrderNumber” : 3, … … … … … …},

{“MessageCode” : 2000, “OrderNumber” : 4, … … … … … …},

{“MessageCode” : 2000, “OrderNumber” : 5, … … … … … …},

{“MessageCode” : 2000, “OrderNumber” : 6, … … … … … …}


]
}
OMEx (Odin Message Extender) – API Documentation

8 Sync Trades

8.1 Sync Trade Request


API Name SyncTrades
URL <protocol>://<domain name:port>/<VirtualDir>/<URL>
Example:
https://localhost:8080/OTPA/V1/ SyncTrades

Description This request is for Sync all trades available in the system. On
receiving Sync Trade request system will send trade information
messages. Sync Trade Request must contain jToken received in
Authentication Request response

Request comprises of the following elements:

Parameter Data Type Description


jMessageType varchar(15) SYNC_ORDER _REQ should
be sent as request message
type
jManagerID varchar (50) Manager Identification
Number.
jCustomerId varchar (50) Customer ID assigned to user
jExchange Int Exchange
jToken varchar (512) Authentication token received
in Authentication response
jEntrySequenceNumber Int(64) Last Received Sequence
Number. Default 0 will be
considered if not provided.
jRequestID varchar(255) Echo back field

8.2 Sync Trade Response


Parameter Data Type Description
jManagerId varchar (50) UserID assigned to user
OMEx (Odin Message Extender) – API Documentation

jCustomerId varchar (50) Customer ID assigned to user


jLastSyncedPacket Int 1 = Last packet
jNoOfRecords Int Number of records
jTradeMessage Trade Detail structure Array of trade message with
array the size received in
NoOfRecords
jRequestID varchar(255) Echo back field
jResponseID varchar(255) System generated alpha
numeric id

Trade Detail structure:

Parameter (Key) Data Type Description


Trade Number int Trade No
Order Number int Unique Order No
Cli Order Number Int Gateway/Client order number[System Generated]
Exchange varchar (10) Exchange
Scrip Token int Scrip Token
Symbol float Exchange provided Security Scrip name
Series varchar (3) Exchange provided Security Series
InstrumentName varchar (20) Instrument name provided in security information. Valid
value will as given bellow
Equity = blank
Future Index = FUTIDX
Interest Rate Future = FUTINT
Future Stock = FUTSTK
Option Index = OPTIDX
Option Stock = OPTSTK
MCX/NCDEX Futures = FUTCOM
MCXSpot = COM
NCDEXSpot = COMDTY
NSE Currency Future = FUTCUR, FUTIRD, FUTIRT,
OPTCUR
NSE Currency Spot = INDEX, UNDCUR, UNDIRD, UNDIRT
OMEx (Odin Message Extender) – API Documentation

Expiry Date varchar (10) Expiry Date


Ddmmmyyyy e.g 24JUN2004
Applicable for Future and option segment only. For
other blank
Strike Price float Exchange provided Strike price
(in Rs.)
Applicable for options only. For other -1
Option Type varchar (2) Option Type Applicable for options only. For other
blank
Buy Sell int Buy Sell Flag
Values:
1 – Buy
2 – Sell
TradedQty Int Traded Quantity
TradedPrice float Traded Price (In Rs.)
Order Type varchar (10) Order Type
Pro/Cli int Pro or Cli Flag
Values:
2 – PRO
1 - CLI
User ID Varchar (10) Client code. For Pro it should be blank
DealerCode Varchar (5) Unique user identification Code
Part Code Varchar (12) Participant code Otherwise blank
TradeTime varchar (10) Trade Time in date – time – 15Jun2018 15.25.15
Modify Time varchar (10) Modified Time in date – time – 15Jun2018 15.25.15
Alias varchar (5) Alias ID Otherwise blank
Product varchar (5) ProductType of the order
Initiated By varchar (25) Initiated By E.g. ADMIN, NET NET etc
Modified By varchar (25) Modified By E.g. ADMIN, NET NET etc
Initiated By User Id varchar (10) Initiated by User Id
Modified By User Id varchar (10) Modified by User Id
Leg Indicator int Spread Leg indicator
LocationID varchar (5) Location Id (PIN CODE + NSECTCLBRANCH ID+ NSECTCLID
+ALGO FLAG + VENDOR CODE) it Can be blank
User Remarks varchar (10) Remarks provided by User
Misc varchar (50) Miscellaneous details
Values will be:
SPO-LMT, SPO-MKT, PO-MKT, PO-LMT
OMEx (Odin Message Extender) – API Documentation

SpreadFlag int Spread Flag


Value: 1 → Spread
0 → Normal
Spread Price float Spread Price (In Rs.)
SequenceNo Int(64) Unique Sequence Number
Orde Price float Order Price (Fresh Order / Modified Order) (In Rs.)
UniqueCode varchar(12) Alphanumeric value with special characters.
OMEx (Odin Message Extender) – API Documentation

9 Sync Multi Leg Orders

9.1 Sync Multi Leg Order Request


API Name SyncTrades
URL <protocol>://<domain name:port>/<VirtualDir>/<URL>
Example:
https://localhost:8080/OTPA/V1/ SyncMultiLegOrders

Description This request is for Sync all multi leg orders available in the system.
On receiving Sync multi leg orders request system will send multi
leg orders information messages. Sync multi leg orders Request
must contain jToken received in Authentication Request response

Request comprises of the following elements:

Parameter Data Type Description


jMessageType varchar(15) SYNC_ORDER _REQ should
be sent as request message
type
jManagerID varchar (50) Manager Identification
Number.
jCustomerId varchar (50) Customer ID assigned to user
jExchange Int Exchange
jToken varchar (512) Authentication token received
in Authentication response
jEntrySequenceNumber Int(64) Last Received Sequence
Number. Default 0 will be
considered if not provided.
jRequestID varchar(255) Echo back field
OMEx (Odin Message Extender) – API Documentation

9.2 Sync Multi Leg Orders Response

Parameter Data Type Description


jManagerId varchar (50) UserID assigned to user
jCustomerId varchar (50) Customer ID assigned to user
jLastSyncedPacket Int 1 = Last packet
jNoOfRecords Int Number of records
jOrderMessage Multi Leg Order Detail Array of order message with
structure the size received in
NoOfRecords
jRequestID varchar(255) Echo back field
jResponseID varchar(255) System generated alpha
numeric id

Multileg Orders Details Responses

Parameter (Key) Data Type Description


Cli Order Number Int Gateway/Client order number[System Generated]
Exchange varchar (10) Exchange
Order Type Varchar(50) Order Type
Book Type Varchar(10) Book type E.g. RL
Order Status Varchar (15) Order status
Reason Varchar(300) Reason code of rejection.
Order Validity Order Validity.
Int Pro or Cli Flag
Values:
2 – PRO
Pro/Cli 1 - CLI
User ID Varchar (10) Client code. For Pro it should be blank
DealerCode Varchar (5) Unique user identification Code
Part Code Varchar (12) Participant code
Order Entry Time varchar (10) Order Entry Time in date – time – 15Jun2018 15.25.15
Last Modified Time varchar (10) Order Last Modified Date & time – 15 Jun 2018 15.25.15
OMEx (Odin Message Extender) – API Documentation

Alias varchar (5) Alias ID Otherwise blank


InitiatedBy varchar (25) Initiated from application E.g. ADMIN, NET NET etc
ModifiedBy varchar(25) Modified from application
InitiatedByUserId varchar (25) Initiated from User Id
ModifiedByUserId varchar (25) Modified from User Id
Price Difference Float Price Difference of Spread tokens
1st Exchange Order Number Int First leg Exchange Order Number
1st Leg Scrip Token Int First leg Scrip Token Number
1st Leg Symbol Varchar (13) First Leg Security Name
1st Leg InstrumentName Varchar (6) First Leg InstrumentName
Varchar (10) First Leg Expiry Date
Ddmmmyyyy e.g 24JUN2004
Applicable for Future and option segment only For other
1st Leg Expiry Date blank
float First Leg Strike Price
(in Rs)
1st Leg Strike Price Applicable for options only For other -1
1st Leg Option_Type Varchar (2) First Leg Option Type
int First Leg Buy Or Sell Flag
Values:
1 – Buy
1st Leg Buy_Sell 2 – Sell
1st Leg Order Original Qty Int First Leg Order Original Quantity
1st Leg Pending Qty Int First Leg Pending Quantity
1st Leg TradedQTY Int First Leg Traded Quantity
1st Leg Order Price Float First Leg Order Price (In Rs)
1st Leg Product Type varchar (5) ProductType of the order
2nd Exchange Order Number Int Second leg Exchange Order Number
2nd Leg Scrip Token Int Second leg Scrip Token Number
2nd Leg Symbol Varchar (13) Second Leg Security Name
2nd Leg InstrumentName Varchar (6) Second Leg InstrumentName
2nd Leg Expiry Date Varchar (10) Second Leg Expiry Date
OMEx (Odin Message Extender) – API Documentation

Ddmmmyyyy e.g 24JUN2004


Applicable for Future and option segment only. For other
blank
float Second Leg Strike Price
(in Rs)
2nd Leg Strike Price Applicable for options only. For other -1
2nd Leg Option_Type Varchar (2) Second Leg Option Type
int Second Leg Buy or Sell Flag
Values:
1 – Buy
2nd Leg Buy_Sell 2 – Sell
2nd Leg Order Original Qty Int Second Leg Order Original Quantity
2nd Leg Pending Qty Int Second Leg Pending Quantity
2nd Leg TradedQTY Int Second Leg Traded Quantity
2nd Leg Order Price Float Second Leg Order Price (In Rs)
2nd Leg Product Type Varchar(5) ProductType if the order
3rd Exchange Order Number Int Third leg Exchange Order Number
3rd Leg Scrip Token Int Third leg Scrip Token Number
3rd Leg Symbol Varchar (13) Third Leg Security Name
3rd Leg InstrumentName Varchar (6) Third Leg InstrumentName
Varchar (10) Third Leg Expiry Date
Ddmmmyyyy e.g 24JUN2004
Applicable for Future and option segment only. For other
3rd Leg Expiry Date blank
float Third Leg Strike Price
(in Rs)
3rd Leg Strike Price Applicable for options only For other -1
3rd Leg Option_Type Varchar (2) Third Leg Option Type
int Third Leg Buy Or Sell Flag
Values:
1 – Buy
3rd Leg Buy_Sell 2 – Sell
3rd Leg Order Original Qty Int Third Leg Order Original Quantity
OMEx (Odin Message Extender) – API Documentation

3rd Leg Pending Qty Int Third Leg Pending Quantity


3rd Leg TradedQTY Int Third Leg Traded Quantity
3rd Leg Order Price Float Third Leg Order Price (In Rs)
3rd Leg ProductType Varchar(5) ProductType of the order
varchar (5) Location Id (PIN CODE + NSECTCLBRANCH ID+ NSECTCLID
LocationID +ALGO FLAG + VENDOR CODE)
User Remarks varchar (50) Remarks provided by User
varchar (50) Miscellaneous details
Values will be:
Misc SPO-LMT, SPO-MKT, PO-MKT, PO-LMT
nSettlementDays valid only for BSE. Applicable for
Prot% nMarket = 1. Divide by 100 otherwise 0
SequenceNo Int(64) Unique Sequence Number
UniqueCode varchar(12) Alphanumeric value with special characters.
OMEx (Odin Message Extender) – API Documentation

10 Position Conversion

10.1 Position Conversion


Name Position Conversion
Description Position conversion to the third party

10.1.1 Position Conversion


ResponseObject property contains key named objJSONRows with below parameters in an JSON objects.
Parameter (Key) Data Type Description
MessageType Varchar(10) POS_CONV
ManagerID Int Manager Id
OrderNumber varchar(50) NA
CliOrderNumber Int Position Conversion Serial number
Exchange varchar(10) Exchange for which order is to be placed
ScripCode Int Scrip code
Symbol varchar(20) Exchange provided Security symbol
Series varchar(3) Exchange provided Security Series
InstrumentName varchar(20) Instrument name provided in security information.
Valid value will as given bellow
Equity = blank
Future Index = FUTIDX
Interest Rate Future = FUTINT
Future Stock = FUTSTK
Option Index = OPTIDX
Option Stock = OPTSTK
MCX/NCDEX Futures = FUTCOM
MCXSpot = COM
NCDEXSpot = COMDTY
NSE Currency Future = FUTCUR, FUTIRD, FUTIRT, OPTCUR
NSE Currency Spot = INDEX, UNDCUR, UNDIRD, UNDIRT

ExpiryDate varchar(10) Expiry Date


Ddmmmyyyy e.g 24JUN2004
Applicable for Future and option segment only
StrikePrice int Exchange provided Strike price
(in multiples of 100)
Applicable for options only
OMEx (Odin Message Extender) – API Documentation

Option_Type varchar(2) Option Type


Applicable for options only
Buy_Sell Int Value: 1 → Buy
2 → Sell
OrderOriginalQty Int Total Quantity of an Order
e.g 12500
PendingQty Int NA
TradedQTY Int NA
DQ Int NA
DQRemaining Int NA
OrderPrice int NA
TriggerPrice int NA

OrderType Int OrderType


MarketType Int NA
OrderStatus Int Values : 0 – Position conversion successful
1 – Position conversion failure
Reason varchar(255) Rejection Reason
OrderValidity Int NA
Days Int NA
ProCli Int Value: 2 → PRO
1 → Client
UserID Varchar(16) NA
PartCode varchar(25) NA
OrderEntryTime Datetime NA
LastModifiedTime Datetime Time when order was confirmed
CPID varchar(6) NA
UCC varchar(6) Alias UCC Code
Product Varchar(5) PositionConversionProductType of the order
InitiatedBy varchar(25) Initiated from application
ModifiedBy varchar(25) Modified from application
InitiatedByUserId varchar(25) Initiated from user id
ModifiedByUserId varchar(25) Modified from user id
LegIndicator varchar(25) NA
UserRemarks varchar(10) NA
Misc varchar(10) NA
SpreadFlag varchar(10) NA
SpreadPrice int NA
AMOOrderID varchar(30) NA
OMEx (Odin Message Extender) – API Documentation

GTDOrderStatus int NA
MessageSequenceNumber Int64 Running Message Sequence Number. For order’s latest
status always consider max sequence number.
UniqueCode varchar(12) Alphanumeric value with special characters.
OMEx (Odin Message Extender) – API Documentation

11 User / Market Status


ResponseObject property contains below parameters in JSON object.
Parameter (Key) Data Type Description
jMessageType varchar (255) Message Type
jMessageHeader varchar (255) It contains Manager Id
jData varchar (512) It will contain Event Type, Branch ID, User ID and Data
(depending on message Type)

Example:
jData: {
"MsgType": "USD_IND",

"MsgHeader" : {"ManagerId”:O1},

“Data” : {“EventType” : 1, “BranchId” : 12345, “UserId”:1111…..}


}
OMEx (Odin Message Extender) – API Documentation

11.1 User Status


Name User Status
Description Change in User status indication to Third Party

User Status Details


Parameter (Key) Data Type Description

Message Type varchar(10) USR_IND


Manager ID Int Manager ID
Branch ID varchar(25) Branch ID
User ID varchar(25) Dealer ID
Value:
1 - User gets Locked
2 - User gets Unlocked
3 - Password Change
4 - CFT Template
5 - CFT mapping
6 - CRP Template
7 - CRP Mapping
8 - User gets Logout
9 - Dealer Update
Event Type int 10 - User gets LogIn
This will contain data in following case
i. Event Type = 5 , It contains Template
Name i.e. changed
ii. Event Type = 7 , It contains Template
Name i.e. changed
iii. Event Type = 8 / 10 , It contains
Machin IP / Mac IP
iv. Event Type = 9 , It contains login
allowed , market data allowed
segment and Dealer Active/Suspend
Data Varchar(255) details
OMEx (Odin Message Extender) – API Documentation

11.2 Market Status

Parameter
Data Type Description
(Key)
MessageType Varchar(10) MKT_STAT
ManagerID Int Manager Id
BranchID varchar(25) Branch ID
1 – Normal Market Open
2 – Normal Market Close
3 – Pre-Open
4 - Pre-Open Close
5- Auction Market Open
6- Auction Market Close
7- Auction Market Open
8 - Post Trade / Close Open
9 - Post Trade / Close Close
10 - Special Market Open
Event Type int 11 - Special Market Close

refer MarketSegment ID’s


Data Varchar(255) Provided in API Annexure
OMEx (Odin Message Extender) – API Documentation

12 Online GTD Order Response

12.1 Online GTD Order Response


Name Online GTD Order Response
Description Online GTD order response to the third party

12.1.1 Online GTD Order Response


ResponseObject property contains key named objJSONRows with below parameters in an JSON objects.

Parameter (Key) Data Type Description


MessageType Varchar(10) GTD_ORD_NRML
ManagerID Int Manager Id
OrderNumber varchar(50) For order entry request must be 0. In case of
Modification/Cancellation request, this needs to be filled
before sending
CliOrderNumber Int Gateway/Client order number[System Generated]
Exchange varchar(10) Exchange for which order is to be placed
ScripCode Int Scrip code
Symbol varchar(20) Exchange provided Security symbol
Series varchar(3) Exchange provided Security Series
InstrumentName varchar(20) Instrument name provided in security information.
Valid value will as given bellow
Equity = blank
Future Index = FUTIDX
Interest Rate Future = FUTINT
Future Stock = FUTSTK
Option Index = OPTIDX
Option Stock = OPTSTK
MCX/NCDEX Futures = FUTCOM
MCXSpot = COM
NCDEXSpot = COMDTY
NSE Currency Future = FUTCUR, FUTIRD, FUTIRT, OPTCUR
NSE Currency Spot = INDEX, UNDCUR, UNDIRD, UNDIRT

ExpiryDate varchar(10) Expiry Date


Ddmmmyyyy e.g 24JUN2004
Applicable for Future and option segment only
OMEx (Odin Message Extender) – API Documentation

StrikePrice int Exchange provided Strike price


(in multiples of 100)
Applicable for options only
Option_Type varchar(2) Option Type
Applicable for options only
Buy_Sell int Value: 1 → Buy
2 → Sell
OrderOriginalQty int Total Quantity of an Order
e.g 12500
PendingQty int Pending quantity
TradedQTY Int Traded Quantity
DQ int Disclose quantity
Specifies the quantity that has to be disclosed to the
market e.g 2500
DQRemaining int Disclose quantity Remaining
OrderPrice int Specifies the price in paise at which the order is placed.

TriggerPrice int Trigger Price at which Stop loss Order should be active in
market. This field is applicable only for a StopLoss order

OrderType int Order Type


MarketType Int Normal = 1
Auction = 2
PreOpen = 3
OrderStatus int OrderStatus
Reason varchar(255) Rejection Reason
OrderValidity int Validity
Days Int Number of days
ProCli Int Value: 2 → PRO
1 → Client
UserID Varchar(16) Exchange User Id
PartCode varchar(25) Participant ID
OrderEntryTime datetime Date and Time will be 24 Hour Format like:
15Jun2019 15.25.15
LastModifiedTime Datetime Time when order was confirmed
CPID varchar(6) CP Id
UCC varchar(6) Alias UCC Code
Product Varchar(5) ProductType of the order
InitiatedBy varchar(25) Initiated from application
ModifiedBy varchar(25) Modified from application
InitiatedByUserId varchar(25) Initiated from user id
OMEx (Odin Message Extender) – API Documentation

ModifiedByUserId varchar(25) Modified from user id


LegIndicator varchar(25) Blank value
UserRemarks varchar(10) User Remarks
Misc varchar(10) Values will be:
SPO-LMT, SPO-MKT, PO-MKT, PO-LMT
SpreadFlag varchar(10) Normal order = 0
Spread order = 1
SpreadPrice int Spread Price
AMOOrderID varchar(30) Order id for AMO/ EqGTD orders otherwise blank
GTDOrderStatus int GTDOrderStatus
MessageSequenceNumber Int64 Running Message Sequence Number. For order’s latest
status always consider max sequence number.
UniqueCode varchar(12) Alphanumeric value with special characters.
OMEx (Odin Message Extender) – API Documentation

13 Sync GTD Orders

13.1 Sync GTD Order Request


API Name SyncGTDOrders
URL <protocol>://<domain name:port>/<VirtualDir>/<URL>
Example:
https://localhost:8080/OTPA/V1/SyncGTDOrders

Description This request is for Sync all GTD orders available in the system. On receiving Sync GTD
Order request system will send state based order information messages. Sync GTD
Order Request must contain jToken received in Authentication Request response

Request comprises of the following elements:

Parameter Data Type Description


jMessageType varchar(15) SYNC_GTD_ORDER _REQ
should be sent as request
message type
jManagerID varchar (50) Manager Identification
Number.
jCustomerId varchar (50) Customer ID assigned to user
jExchange Int Exchange
jToken varchar (512) Authentication token received
in Authentication response
jEntrySequenceNumber Int(64) Last Received Sequence
Number. Default 0 will be
considered if not provided.
jRequestID varchar(255) Echo back field

Example:
Socket Logon Request = {
jMessageType: “SYNC_GTD_ORDER_REQ”,
jManagerID: <MANAGER1>,
jCustomerId: <MEMBER>,
jToken: <Token received in the Authentication Response>,
jEntrySequenceNumber: <max sequence no>
jRequestID: < Echo back field >
}
OMEx (Odin Message Extender) – API Documentation

13.2 Sync GTD Order Response

Parameter Data Type Description


jManagerId varchar (50) UserID assigned to user
jCustomerId varchar (50) Customer ID assigned to user
jLastSyncedPacket Int 1 = Last packet
jNoOfRecords Int Number of records
jOrderMessage GTD Order Detail Array of order message with
structure the size received in
NoOfRecords
jRequestID varchar(255) Echo back field
jResponseID varchar(255) System generated alpha
numeric id

GTD Order Detail structure:

Parameter (Key) Data Type Description


Order Number int Unique Order No

Cli Order Number Int Gateway/Client order number[System Generated]

Exchange varchar (10) Exchange


Scrip Token int Scrip Token

Symbol float Exchange provided Security Scrip name


Series varchar (3) Exchange provided Security Series
InstrumentName varchar (20) Instrument name provided in security information. Valid
value will as given bellow
Equity = blank
Future Index = FUTIDX
Interest Rate Future = FUTINT
Future Stock = FUTSTK
Option Index = OPTIDX
Option Stock = OPTSTK
MCX/NCDEX Futures = FUTCOM
MCXSpot = COM
OMEx (Odin Message Extender) – API Documentation

NCDEXSpot = COMDTY
NSE Currency Future = FUTCUR, FUTIRD, FUTIRT,
OPTCUR
NSE Currency Spot = INDEX, UNDCUR, UNDIRD, UNDIRT
Expiry Date varchar (10) Expiry Date
Ddmmmyyyy e.g 24JUN2004
Applicable for Future and option segment only. For other
blank
Strike Price float Exchange provided Strike price
(in Rs).
Applicable for options only. For other -1
Option Type varchar (2) Option Type Applicable for options only. For other blank
Buy Sell int Buy Sell Flag
Values:
1 – Buy
2 – Sell
Order Original Qty Int Original Quantity

Pending Qty Int Pending Quantity

TradedQTY Int Traded Quantity


DQ Int Disclosed Quantity
Order Price Float Order Price (In Rs)

Trigger Price Float Trigger Price (In Rs)

Order Type varchar (10) Order Type

Order Status Varchar (15) OrderStatus

Reason Varchar (300) Reason of rejection.


Order Validity Varchar (100) Order Validity

Pro/Cli Int Pro or Cli Flag


Values:
1 – CLI
2 - PRO
User ID Varchar (10) Client code. For Pro it should be blank
OMEx (Odin Message Extender) – API Documentation

DealerCode Varchar (5) Unique user identification Code.

Part Code Varchar (12) Participant code. Otherwise blank

Order Entry Time varchar (10) Order Entry Time in date – time – 15Jun2018 15.25.15

Last Modified Time varchar (10) Order Last Modified Date & time – 15 Jun 2018 15.25.15

Alias varchar (5) Alias ID Otherwise blank


Product varchar (5) ProductType of the order
Initiated By varchar (25) Initiated By E.g. ADMIN, NET NET etc
Modified By varchar (25) Modified By E.g. ADMIN, NET NET etc
Initiated By User Id varchar (10) Initiated by User Id

Modified By User Id varchar (10) Modified by User Id

Leg Indicator Int Spread Leg indicator

LocationID varchar (5) Location Id (PIN CODE + NSECTCLBRANCH ID+ NSECTCLID


+ALGO FLAG + VENDOR CODE)
User Remarks varchar (50) Remarks provided by User

Misc varchar (50) Miscellaneous details


Values will be:
SPO-LMT, SPO-MKT, PO-MKT, PO-LMT
SpreadFlag Int Spread Flag
Value: 1 → Spread
0 → Normal
Spread Price Float Spread Price (In Rs)

AMO Order ID Varchar (50) Order id for AMO/ EqGTD orders otherwise blank

SequenceNo Int(64) Incremental Number.


OMEx (Odin Message Extender) – API Documentation

ManagerId Int Manager Id


Days Int Number Of Days
GTDOrderStatus int GTDOrderStatus
UniqueCode varchar(12) Alphanumeric value with special characters.

Example:
jData: {
"ManagerID": "KOTAL_10.0.0.1",

"CustomerId ": “KOTAK”,

“NoOfRecords” : 6
“OrderDetail” : [

{“MessageCode” : 2000, “OrderNumber” : 1, … … … … … …},

{“MessageCode” : 2000, “OrderNumber” : 2, … … … … … …},

{“MessageCode” : 2000, “OrderNumber” : 3, … … … … … …},

{“MessageCode” : 2000, “OrderNumber” : 4, … … … … … …},

{“MessageCode” : 2000, “OrderNumber” : 5, … … … … … …},

{“MessageCode” : 2000, “OrderNumber” : 6, … … … … … …}


]
}
OMEx (Odin Message Extender) – API Documentation

Online Stoploss Trigger Response

14.1 Online Stoploss Trigger Response

Name Online Stoploss Trigger Response


Description Online Stoploss Trigger response to the third party

14.1.1 Online Stoploss Trigger Response


ResponseObject property contains key named objJSONRows with below parameters in an JSON objects
Parameter (Key) Data Type Description
MessageType Varchar(10) SL_TRIGGER
ManagerID Int Manager Id
TradeNumber int Trade No
OrderNumber varchar(50) For order entry request must be 0. In
case of Modification/Cancellation
request, this needs to be filled before
sending
CliOrderNumber Int Gateway/Client order number[System
Generated]
Exchange varchar(10) Exchange
ScripCode Int Scrip code
Symbol varchar(20) Exchange provided Security symbol
Series varchar(3) Exchange provided Security Series
InstrumentName varchar(20) Instrument name provided in security
information.
Valid value will as given bellow
Equity = blank
Future Index = FUTIDX
Interest Rate Future = FUTINT
Future Stock = FUTSTK
Option Index = OPTIDX
Option Stock = OPTSTK
MCX/NCDEX Futures = FUTCOM
MCXSpot = COM
NCDEXSpot = COMDTY
OMEx (Odin Message Extender) – API Documentation

NSE Currency Future = FUTCUR,


FUTIRD, FUTIRT, OPTCUR
NSE Currency Spot = INDEX, UNDCUR,
UNDIRD, UNDIRT

ExpiryDate varchar(10) Expiry Date


Ddmmmyyyy e.g 24JUN2004
Applicable for Future and option
segment only
StrikePrice int Exchange provided Strike price
(in multiples of 100)
Applicable for options only
Option_Type varchar(2) Option Type
Applicable for options only
Buy_Sell int Value: 1 → Buy
2 → Sell
TradeQty Int Traded Quantity
TradedPrice int Trade price in Paisa.
45065 (in multiples of 100)
OrderOriginalQty int Total Quantity of an Order
e.g 12500
PendingQty int Pending quantity
DQ int Disclose quantity
Specifies the quantity that has to be
disclosed to the market e.g 2500
DQRemaining int Disclose quantity Remaining
QuantityTradedToday Int Total no of quantity traded inclusive of
the current trade quantity
OrderType int Order Type
Days Int Number of days
ProCli Int Value: 2 → PRO
1 → Client
UserID Varchar(16) Exchange User Id
PartCode varchar(25) Participant ID
TradeTime datetime Date and Time will be 24 Hour Format
like: 15Jun2019 15.25.15
OrderTime datetime Date and Time will be 24 Hour Format
like: 15Jun2019 15.25.15
OMEx (Odin Message Extender) – API Documentation

OrderLastModifiedTime Datetime Time when order was confirmed


CPID varchar(6) CP Id
UCC varchar(6) Alias UCC Code
Product Varchar(5) ProductType of the order
InitiatedBy varchar(25) Initiated from application
ModifiedBy varchar(25) Modified from application
InitiatedByUserId varchar(25) Initiated from user id
ModifiedByUserId varchar(25) Modified from user id
LegIndicator varchar(25) Normal Order = Blank
Spread Order = Blank
MAIN LEG INDICATOR = 9;
SL LEG INDICATOR = 10;
PROFIT LEG INDICATOR = 11;
UserRemarks varchar(10) User Remarks
Misc varchar(10) Values will be:
SPO-LMT, SPO-MKT, PO-MKT, PO-LMT

SpreadFlag varchar(10) Normal order = 0


Spread order = 1
SpreadPrice int Spread Price
MessageSequenceNumber Int64 Running Message Sequence Number
UniqueCode varchar(12) Alphanumeric value with special
characters.
OMEx (Odin Message Extender) – API Documentation

15 Sync Rejected Orders

15.1 Sync Rejected Order Request


API Name SyncRejectedOrders
URL <protocol>://<domain name:port>/<VirtualDir>/<URL>
Example:
https://localhost:8080/OTPA/V1/ SyncRejectedOrderDetails

Description This request is for Sync all rejected orders available in the system. On receiving Sync
Rejected Order request system will send state based order information messages.
Sync Rejected Order Request must contain jToken received in Authentication
Request response

Request comprises of the following elements:

Parameter Data Type Description


jMessageType varchar(15) SYNC_ORDER _REQ should
be sent as request message
type
jManagerID varchar (50) Manager Identification
Number.
jCustomerId varchar (50) Customer ID assigned to user
jExchange Int Exchange
jToken varchar (512) Authentication token received
in Authentication response
jEntrySequenceNumber Int(64) Last Received Sequence
Number. Default 0 will be
considered if not provided.
jRequestID varchar(255) Echo back field
OMEx (Odin Message Extender) – API Documentation

Example:
Socket Logon Request = {
jMessageType: “SYNC_ORDER_REQ”,
jManagerID: <MANAGER1>,
jCustomerId: <MEMBER>,
jToken: <Token received in the Authentication Response>,
jEntrySequenceNumber: <max sequence no>
jRequestID: < Echo back field >
}
OMEx (Odin Message Extender) – API Documentation

15.2 Sync Rejected Order Response

Parameter Data Type Description


jManagerId varchar (50) UserID assigned to user
jCustomerId varchar (50) Customer ID assigned to user
jLastSyncedPacket Int 1 = Last packet
jNoOfRecords Int Number of records
jOrderMessage Order Detail structure Array of order message with
the size received in
NoOfRecords
jRequestID varchar(255) Echo back field
jResponseID varchar(255) System generated alpha
numeric id

Rejected Order Detail structure:

Parameter (Key) Data Type Description


Order Number int Unique Order No

Cli Order Number Int Gateway/Client order number[System Generated]

Exchange varchar (10) Exchange


Scrip Token int Scrip Token

Symbol float Exchange provided Security Scrip name


Series varchar (3) Exchange provided Security Series
InstrumentName varchar (20) Instrument name provided in security information. Valid
value will as given bellow
Equity = blank
Future Index = FUTIDX
Interest Rate Future = FUTINT
Future Stock = FUTSTK
Option Index = OPTIDX
Option Stock = OPTSTK
MCX/NCDEX Futures = FUTCOM
MCXSpot = COM
OMEx (Odin Message Extender) – API Documentation

NCDEXSpot = COMDTY
NSE Currency Future = FUTCUR, FUTIRD, FUTIRT,
OPTCUR
NSE Currency Spot = INDEX, UNDCUR, UNDIRD, UNDIRT
Expiry Date varchar (10) Expiry Date
Ddmmmyyyy e.g 24JUN2004
Applicable for Future and option segment only. For other
blank
Strike Price float Exchange provided Strike price
(in Rs).
Applicable for options only. For other -1
Option Type varchar (2) Option Type Applicable for options only. For other blank
Buy Sell int Buy Sell Flag
Values:
1 – Buy
2 – Sell
Order Original Qty Int Original Quantity

Pending Qty Int Pending Quantity

TradedQTY Int Traded Quantity


DQ Int Disclosed Quantity
Order Price Float Order Price (In Rs)

Trigger Price Float Trigger Price (In Rs)

Order Type varchar (10) Order Type

Order Status Varchar (15) Order Status

Reason Varchar (300) Reason of rejection.


Order Validity Varchar (100) Order Validity

Pro/Cli Int Pro or Cli Flag


Values:
1 – CLI
2 - PRO
User ID Varchar (10) Client code. For Pro it should be blank
OMEx (Odin Message Extender) – API Documentation

DealerCode Varchar (5) Unique user identification Code.

Part Code Varchar (12) Participant code. Otherwise blank

Order Entry Time varchar (10) Order Entry Time in date – time – 15Jun2018 15.25.15

Last Modified Time varchar (10) Order Last Modified Date & time – 15 Jun 2018 15.25.15

Alias varchar (5) Alias ID Otherwise blank


Product varchar (5) ProductType of the order
Initiated By varchar (25) Initiated By E.g. ADMIN, NET NET etc
Modified By varchar (25) Modified By E.g. ADMIN, NET NET etc
Initiated By User Id varchar (10) Initiated by User Id

Modified By User Id varchar (10) Modified by User Id

Leg Indicator Int Spread Leg indicator

LocationID varchar (5) Location Id (PIN CODE + NSECTCLBRANCH ID+ NSECTCLID


+ALGO FLAG + VENDOR CODE)
User Remarks varchar (50) Remarks provided by User

Misc varchar (50) Miscellaneous details


Values will be:
SPO-LMT, SPO-MKT, PO-MKT, PO-LMT
SpreadFlag Int Spread Flag
Value: 1 → Spread
0 → Normal
Spread Price Float Spread Price (In Rs)

AMO Order ID Varchar (50) Order id for AMO/ EqGTD orders otherwise blank

SequenceNo Int(64) Incremental Number.


OMEx (Odin Message Extender) – API Documentation

ManagerId Int Manager Id


Days Int Number of days
UniqueCode varchar(12) Alphanumeric value with special characters.

Example:
jData: {
"ManagerID": "KOTAL_10.0.0.1",

"CustomerId ": “KOTAK”,

“NoOfRecords” : 6
“OrderDetail” : [

{“MessageCode” : 2000, “OrderNumber” : 1, … … … … … …},

{“MessageCode” : 2000, “OrderNumber” : 2, … … … … … …},

{“MessageCode” : 2000, “OrderNumber” : 3, … … … … … …},

{“MessageCode” : 2000, “OrderNumber” : 4, … … … … … …},

{“MessageCode” : 2000, “OrderNumber” : 5, … … … … … …},

{“MessageCode” : 2000, “OrderNumber” : 6, … … … … … …}


]
OMEx (Odin Message Extender) – API Documentation

16 Sync Position Conversion

16.1 Sync Position Conversion Request


API Name SyncPositionConversionOrders
URL <protocol>://<domain name:port>/<VirtualDir>/<URL>
Example:
https://localhost:8080/OTPA/V1/ SyncPositionConverion

Description This Position Conversion request is for Sync all position conversion orders available in
the system. On receiving Sync Position Conversion Order request system will send
state based order information messages. Sync Position Conversion Order Request
must contain jToken received in Authentication Request response

Request comprises of the following elements:

Parameter Data Type Description


jMessageType varchar(15) SYNC_POS _CON should be
sent as request message
type
jManagerID varchar (50) Manager Identification
Number.
jCustomerId varchar (50) Customer ID assigned to user
jExchange Int Exchange
jToken varchar (512) Authentication token received
in Authentication response
jEntrySequenceNumber Int(64) Last Received Sequence
Number. Default 0 will be
considered if not provided.
jRequestID varchar(255) Echo back field

Example:
Socket Logon Request = {
jMessageType: “SYNC_POS_CONV”,
jManagerID: <MANAGER1>,
jCustomerId: <MEMBER>,
jToken: <Token received in the Authentication Response>,
jEntrySequenceNumber: <max sequence no>
jRequestID: < Echo back field >
}
OMEx (Odin Message Extender) – API Documentation

16.2 Sync Position Conversion Response

Parameter Data Type Description


jManagerId varchar (50) UserID assigned to user
jCustomerId varchar (50) Customer ID assigned to user
jLastSyncedPacket Int 1 = Last packet
jNoOfRecords Int Number of records
jOrderMessage Order Detail structure Array of order message with
the size received in
NoOfRecords
jRequestID varchar(255) Echo back field
jResponseID varchar(255) System generated alpha
numeric id

Sync Position Conversion structure:

Parameter (Key) Data Type Description


Order Number int NA

Cli Order Number Int Position Conversion Serial Number

Exchange varchar (10) Exchange


Scrip Token int Scrip Token

Symbol float Exchange provided Security Scrip name


Series varchar (3) Exchange provided Security Series
InstrumentName varchar (20) Instrument name provided in security information. Valid
value will as given bellow
Equity = blank
Future Index = FUTIDX
Interest Rate Future = FUTINT
Future Stock = FUTSTK
Option Index = OPTIDX
Option Stock = OPTSTK
MCX/NCDEX Futures = FUTCOM
OMEx (Odin Message Extender) – API Documentation

MCXSpot = COM
NCDEXSpot = COMDTY
NSE Currency Future = FUTCUR, FUTIRD, FUTIRT,
OPTCUR
NSE Currency Spot = INDEX, UNDCUR, UNDIRD, UNDIRT
Expiry Date varchar (10) Expiry Date
Ddmmmyyyy e.g 24JUN2004
Applicable for Future and option segment only. For other
blank
Strike Price float Exchange provided Strike price
(in Rs).
Applicable for options only. For other -1
Option Type varchar (2) Option Type Applicable for options only. For other blank
Buy Sell int Buy Sell Flag
Values:
1 – Buy
2 – Sell
Order Original Qty Int Original Quantity

Pending Qty Int NA

TradedQTY Int NA
DQ Int NA
Order Price Float NA

Trigger Price Float NA

Order Type varchar (10) Order Type

Order Status Varchar (15) Order Status

Reason Varchar (300) Rejection reason


Order Validity Varchar (100) NA

Pro/Cli Int Pro or Cli Flag


Values:
1 – CLI
2 - PRO
OMEx (Odin Message Extender) – API Documentation

User ID Varchar (10) NA

DealerCode Varchar (5) Unique user identification Code.

Part Code Varchar (12) NA

Order Entry Time varchar (10) NA

Last Modified Time varchar (10) Order Last Modified Date & time – 15 Jun 2018 15.25.15

Alias varchar (5) Alias ID Otherwise blank


Product varchar (5) PositionConversionProductType of the order
Initiated By varchar (25) Initiated By E.g. ADMIN, NET NET etc
Modified By varchar (25) Modified By E.g. ADMIN, NET NET etc
Initiated By User Id varchar (10) Initiated by User Id

Modified By User Id varchar (10) Modified by User Id

Leg Indicator Int NA

LocationID varchar (5) Location Id (PIN CODE + NSECTCLBRANCH ID+ NSECTCLID


+ALGO FLAG + VENDOR CODE)
User Remarks varchar (50) NA

Misc varchar (50) NA


SpreadFlag Int NA
Spread Price Float NA

AMO Order ID Varchar (50) NA

SequenceNo Int(64) Incremental Number.


ManagerId Int Manager Id
Days Int NA
OMEx (Odin Message Extender) – API Documentation

UniqueCode varchar(12) Alphanumeric value with special characters.

Example:
jData: {
"ManagerID": "KOTAL_10.0.0.1",

"CustomerId ": “KOTAK”,

“NoOfRecords” : 6
“OrderDetail” : [

{“MessageCode” : 2000, “OrderNumber” : 1, … … … … … …},

{“MessageCode” : 2000, “OrderNumber” : 2, … … … … … …},

{“MessageCode” : 2000, “OrderNumber” : 3, … … … … … …},

{“MessageCode” : 2000, “OrderNumber” : 4, … … … … … …},

{“MessageCode” : 2000, “OrderNumber” : 5, … … … … … …},

{“MessageCode” : 2000, “OrderNumber” : 6, … … … … … …}


]
OMEx (Odin Message Extender) – API Documentation

17 HeartBeat

17.1 HeartBeat Packet

Message comprises of the following element:

Parameter Data Type Description


jMessageType varchar(15) HEARTBEAT should be sent after
jHeartbeatIntervalInSecs (provided in API register
response ) if no data is available to sent. If user
misses 3 continueous HeartBeat packet , it
indicates that OMEx has restarted and user has to
attempt relogin.

Example:
HeartBeat Packet = {
jMessageType: “HEARTBEAT”
}
OMEx (Odin Message Extender) – API Documentation

18 Annexure

MarketSegment ID’s:
Exchange Market Segment ID
NSE Cash 1
NSE Derivatives 2
BSE Cash 3
BSE Derivatives 4
MCX Futures 5
MCX Spot 6
NCDEX Futures 7
NCDEX Spot 8
MCX SX Currency Futures 11
MCX SX Currency SPOT 12
NSECDS Futures 13
NSECDS SPOT 14
MSX Cash 15
MSX Derivatives 16
BSE OFS 25
NSE-OFS 33
ICEX 34
BSECDS CUR 38

Option Type:
Parameter Parameter Name
CE European Call
PE European Put
CA American Call
PA American Put
OMEx (Odin Message Extender) – API Documentation

Order Type:
Abbreviation Description Value
RL Regular Lot Limit 1
RL MKT Regular Lot market 2
SL Stop Loss Limit 3
SL MKT Stop Loss market 4
OL Odd Lot 5
CA / AU Call Auction / Auction 7
BL Block Deal 8

Product Type:
Product type Value
Margin / Intraday M
DELIVERY / Carryforward D
MTF MF
PTST PT
MarginPlus MP
Bracket Order B
AMO Margin / AMO AM
Intraday
AMO Delivery / AMO AD
Carryforward
OFS O
OMEx (Odin Message Extender) – API Documentation

Position Conversion Product Type:


Product type Value
MARGIN_TO_DELIVERY_ORDER 16
DELIVERY_TO_MARGIN_ORDER 32
PTST_TO_DELIVERY_ORDER 128
DELIVERY_TO_PTST_ORDER 256
MARGIN_TO_PTST_ORDER 512
MARGIN_TO_MTF_ORDER 1024
DELIVERY_TO_MTF_ORDER 2048
PTST_TO_MARGIN_ORDER 4096
MTF_TO_MARGIN_ORDER 16384
MTF_TO_DELIVERY_ORDER 32768
MTF_TO_PTST_ORDER 65536
PTST_TO_MTF_ORDER 131072
BRACKET_TO_DELIVERY_ORDER 262144

Validity:
Validity Value
DAY 1
GTD 2
GTC 3
IOC 4
EOSESS 1
EOTODY 2
EOSTLM 3
EOS 5
FOK 6
GTT 7
FAK 8
GTM 9
GTW 10
OMEx (Odin Message Extender) – API Documentation

AON 11
ATBEST 12

Order Status:
Value Status
1 CLIENT XMITTED
2 GATEWAY XMITTED
3 OMS XMITTED
4 EXCHANGE XMITTED
5 PENDING
6 CANCELLED
7 EXECUTED
8 ADMIN PENDING
9 GATEWAY REJECT
10 OMS REJECT
11 ORDER ERROR
12 FROZEN
13 M.PENDING [MINIADMINPENDING]
14 A.ACCEPT [ADMINACCEPT]
15 A.REJECT [ADMINREJECT]
16 A.MODIFY [ADMINMODIFY]
17 A.CANCEL [ADMINCANCEL]
18 AMO SUBMITTED
19 AMO CANCELLED
20 COMPLETED
21 STOPPED
22 CONVERTED
OMEx (Odin Message Extender) – API Documentation

GTD Order Status:


Value Status
1 Active
2 Completed
3 Withdraw
4 Expired
5 Rejected

User Status:
Parameter Parameter Name
A Active
V Inactive
S Suspend

You might also like