0% found this document useful (0 votes)
378 views

TT API Document PDF

This document describes the TradeTiger API used to communicate with Sharekhan's order management system. It outlines the data types, message headers, transaction codes, authentication process, order requests and responses, report requests and responses that programmers need to follow to interface their applications with TradeTiger. The API provides functionality to get stock/derivative/commodity/currency master data, place orders, get order confirmations, and retrieve various reports.

Uploaded by

Garry Garg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
378 views

TT API Document PDF

This document describes the TradeTiger API used to communicate with Sharekhan's order management system. It outlines the data types, message headers, transaction codes, authentication process, order requests and responses, report requests and responses that programmers need to follow to interface their applications with TradeTiger. The API provides functionality to get stock/derivative/commodity/currency master data, place orders, get order confirmations, and retrieve various reports.

Uploaded by

Garry Garg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 48

TradeTiger API

Lodha IThink Techno Campus,10th Floor - Beta building,


Off JVLR, Opp. Kanjurmarg Station,
Kanjurmarg(E) ,
Mumbai - 400042

The controlled master of this document is on the Sharekhan Ltd computer network. Printed copies
are not controlled. If you are working from a printed copy, please verify with the computer version
to ensure it is the latest revision.
TradeTiger API

Document Revision History

Version Modification
Date Modification Details
No on Page
1.0 November 17, 2011 New Document NA

The controlled master of this document is on the Sharekhan Ltd computer network. Printed
copies are not controlled. If you are working from a printed copy, please verify with the
computer version to ensure it is the latest revision.
TradeTiger API 3

Objective
This document describes the protocol to be used for communicating with Sharekhan
Order Management system using TradeTiger.

Scope
This document is written for system designers and developers of user organizations and
third party software developers who are responsible for the development of the software
to interact with Sharekhan’s Trade Tiger (TT) application. The procedure does not cover
control over process other than Trade Tiger API.

What is an API
Application programming interface (API) is a set of rules and specifications that software
programs can follow to communicate with each other. It serves an interface between
different software programs and facilitates their interaction, similar to the way the user
interface facilitates interaction between human and computers.

Exchange code
Exchange Code Exchange Description
NC NSE Cash National Stock Exchange Equities Segment
BC BSE Cash Bombay Stock Exchange Equities Segment
NF NSE Futures and National Stock Exchange Derivative Segment
Options
MX MCX Multi Commodity Exchange
NX NCDEX National Commodity & Derivative Exchange
RN NSE CURRENCY National Stock Exchange
RM MCX CURRENCY Multi Commodity Exchange
TradeTiger API 4

Abbreviations and Acronyms used


The abbreviations and acronyms used in this document are:
Words Abbreviations/ Acronyms Comment
B Buy
S Sell
SS Sell Against Margin Or Short Sell
BM Buy Margin Margin will be provided based on Sharekhan
Risk System. Order will be squared off 15
Minutes before Market Close
SM Sell Margin Margin will be provided based on Sharekhan
Risk System. Order will be squared off 15
Minutes before Market Close
RMS Risk Management System Unique Registered ID from exchange, once the order
is placed from the particular RMS code. Modify &
Cancel order should be place through the same RMS
Only.
TT TradeTiger
IOC Immediate Or Cancel Order will get executed immediately or it will
get cancelled automatically.
GTD Good Till Date Date has to be before the expiry date.
GTC Good Till Cancellation
GFD Good for the Day
FI Future Index
FS Future Stock
OI Option Index
OS Option Stock
CA Call American
CE Call European
PA Put American
PE Put European
FUT Future
TradeTiger API 5

Contents
OBJECTIVE ................................................................................................................................................. 3
SCOPE......................................................................................................................................................... 3
WHAT IS AN API ........................................................................................................................................ 3
EXCHANGE CODE........................................................................................................................................ 3
ABBREVIATIONS AND ACRONYMS USED..................................................................................................... 4
GUIDELINE FOR PROGRAMMERS ...................................................................................................... 7
DATA TYPES USED ..................................................................................................................................... 7
MESSAGE HEADER ..................................................................................................................................... 7
TRANSACTION CODE USED ........................................................................................................................ 8
AUTHENTICATION ................................................................................................................................... 9
LOGIN......................................................................................................................................................... 9
LOGOFF : .................................................................................................................................................. 11
SCRIP MASTER REQUEST .......................................................................................................................... 12
SCRIP MASTER RESPONSE ........................................................................................................................ 12
Cash Master Item ................................................................................................................................ 13
DerivativeMasterItem ......................................................................................................................... 13
CommodityMasterItem ........................................................................................................................ 14
CurrencyMasterItem ........................................................................................................................... 15
ORDER REQUEST ................................................................................................................................... 16
ORDER REQUEST ...................................................................................................................................... 16
OrderItems .......................................................................................................................................... 16
ORDER RESPONSE ................................................................................................................................. 19
SHAREKHAN ORDER CONFIRMATION ....................................................................................................... 19
OrderConfirmationItem ...................................................................................................................... 20
EXCHANGE ORDER/ TRADE CONFIRMATION ............................................................................................ 21
REPORT REQUEST ................................................................................................................................. 24
REPORT REQUEST..................................................................................................................................... 24
REPORT RESPONSE ............................................................................................................................... 25
REPORT RESPONSE ................................................................................................................................... 25
EQUITYORDERREPORTITEM..................................................................................................................... 25
DERIVATIVEORDERREPORTITEM ............................................................................................................. 27
DPSRREPORTITEM .................................................................................................................................. 29
CASHNETPOSITIONREPORTITEM.............................................................................................................. 30
TURNOVERREPORTITEM .......................................................................................................................... 31
CASHORDERDETAILSREPORTITEM .......................................................................................................... 32
CASHTRADEDETAILSREPORTITEM .......................................................................................................... 33
DERIVATIVEORDERDETAILREPORTITEM ................................................................................................. 34
DERIVATIVETRADEDETAILSREPORTITEM................................................................................................ 36
CASHLIMITREPORTITEM .......................................................................................................................... 37
COMMODITYLIMITREPORTITEM .............................................................................................................. 38
INDICES ..................................................................................................................................................... 38
INDICE REQUEST: ..................................................................................................................................... 38
INDICES RESPONSE: .................................................................................................................................. 39
FEED REQUEST ....................................................................................................................................... 40
TradeTiger API 6

FEED REQUEST ......................................................................................................................................... 40


FEED RESPONSE ....................................................................................................................................... 40
BIDOFFER ................................................................................................................................................ 42
MARKETDEPTH REQUEST ........................................................................................................................ 43
MARKETDEPTH RESPONSE ...................................................................................................................... 43
MESSAGE .................................................................................................................................................. 46
GENERAL MESSAGE: ................................................................................................................................ 46
APPENDIX ................................................................................................................................................. 46
NSE AND BSE EQUITIES ACKNOWLEDGEMENT CODE DESCRIPTION ....................................................... 46
NSE DERIVATIVES ACKNOWLEDGEMENT CODE DESCRIPTION ................................................................ 47
COMMODITIES ACKNOWLEDGEMENT CODE DESCRIPTION ....................................................................... 48
ORDER STATUS ........................................................................................................................................ 48
TradeTiger API 7

Guideline for Programmers

Data Types Used


DataType Size in Bytes Signed/ Unsigned
CHAR 1 Signed
UINT 2 Unsigned
SHORT 2 Signed
LONG 4 Signed
DOUBLE 8 Signed and floating Point

Each structure is prefaced with a MESSAGE_HEADER. Data in the header is fixed for
each transaction code. Message structure consists of two parts namely header and data.
Note:
1) All price values in Commodity, Derivative and Cash are multiplied by 100 and
assigned to LONG (4 Bytes) data type
Ex: Price 1025.55 will be reflected as 102555
2) All price values in Currency are multiplied by 10000 except Strike Price and
Currency Limit Statement Report and assigned to LONG (4 Bytes) data type
Ex: Price 1025.5568 will be reflected as 10255568
3) All Field’s empty spaces are filled by ‘\0’ (Null character)
Ex: Scrip Name = “IFCI\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0” (CHAR[20])
4) The Order Quantity for FNO and Commodity will be Actual Quantity instead of
Lots.
5) GTD is applicable only for Commodity and Derivative not for Cash and Currency

Message Header
The fields of Message Header is described below

Structure MessageHeader
Field Name Description Comment Data Type
MessageLength This field is set to the LONG
length of the entire
message, including the
length of
Message Header.
TransactionCode This field should contain the SHORT
transaction number. This
describes the type of
message sent or received.

If any Structure contains a child structure, the respective child structure will be explained
below parent structure
TradeTiger API 8

Transaction Code Used


Process Transaction Code Comment
Connection 0
Login 1
LogOff 2
Order 11
SharekhanOrderConfirmation 12
ExchangeOrderConfirmation 13
ExchangeTradeConfirmation 14
Scripmaster 21
FeedSubscription 22
FeedUnSubscription 23
MarketDepthSubscripe 24
MarketDepthUnsubscripe 25
MarketDepth 26
Indices 27
Bidoffer 28
CashOrderReport 31
CashDPSRReport 32
CashOrderDetailsReport 33
CashTradeDetailsReport 34
CashLimitReport 35
CashNetPositionReport 36
DerivativeOrderReport 41
DerivativeTurnOverReport 42
DerivativeFOOrderDetailsReport 43
DerivativeFOTradeDetailsReport 44
CommodityMCXOrderDetail 45
CommodityMCXTradeDetail 46
CommodityNCDEXOrderDetail 47
CommodityNCDEXTradeDetail 48
CommodityLimitReport 49
CurrencyNCOrderDetail 50
CurrencyNCTradeDetail 51
CurrencyMCXOrderDetail 52
CurrencyMCXTradeDetail 53
CurrencyLimitReport 54
LiveChart 61
DailyChart 62
IntraDayChart 63
Message 99
TradeTiger API 9

Authentication
Introduction
This section describes how a trader logs on to the trading system. It covers the log on
request and the system responses. The process by which a trader logs on to the trading
system is called logon process. The trader after issuing a sign-on request waits for the
system response. The response could be a successful logon or an error message.

Step 1:- Connecting to TradeTiger


- For the users using third party applications, trade tiger and the third
party application, both of them should be working from the same computer (or laptop).
Also before connecting the third party application, the user must be first logged onto
trade tiger and then only he would be able to get feeds from trade tiger in the third party
application, or would be able to use the API of trade tiger. If the user is not subscribed
for API Trading, then he cannot connect to TradeTiger.

Step 2:- Entering Correct User ID, Password and System IP


- The user has to enter a correct id and password which he has provided
in the running TradeTiger along with the System IP. The system will not accept login
credentials if there is a mismatch in User credentials and the System IP provided through
API and the System IP of TradeTiger.

Login
Structure LoginRequest
Field Name Description Comment Data Type
MessageHeader
Login Id This field should contain CHAR[30]
Login ID of the user/broker
Membership Password This field should contain the CHAR[20]
password entered by the
user. The password should
be alpha numeric (i.e. a
TradeTiger API 10

combination of alphabets
and numbers), and it should
be a minimum of 8
characters and a maximum
of 12 characters. This field
cannot be left blank
Trading Password User has to have a separate CHAR[20]
trading password to log into
trade tiger. This field cannot
be left blank
IP It will capture the system IP CHAR[20]
for future Tracking.

Reserved Reserved for future Default blank CHAR[100]

Sample:
DataLength = 196|Transcode = 1|LoginId = _83|MemberPassword =
12345|TradingPassword = 67895| IP = 192.168.82.55 |Reserved = |
TradeTiger API 11

Structure LoginResponse
Field Name Description Comment Data Type
MessageHeader
Status Code It indicates whether the 0 – Success, SHORT
authentication process is 1- Failure
success or not
Message Send the message to the user Actual Message of CHAR[250]
based on the authentication the Authentication
response. Process
Client Info List [Optional for normal Users]. Client Name, CHAR [N X 75]
For power brokers it is the Customer ID and
list of clients activated for S2KID separated by
API Trading mapped under Comma delimiter.
the specific Admin ID. Single Client Info
Length is 75. N
represents client
count
Reserved Reserved for future Default blank CHAR[100]

Sample:
DataLength = 508|Transcode = 1|StatusCode = 0|Message = SUCCESS|Client Info List =
A Khan,123456,W12345|Reserved = |

Logoff :
Structure LogoffRequest
Field Name Description Comment Data Type
MessageHeader
LoginId This field should contain CHAR[30]
User ID of the user/broker
Reserved Reserved for future Default is blank CHAR[100]
Sample:
DataLength = 196|Transcode = 2|LogInId = shar1283|Reserved = |
TradeTiger API 12

Scrip Master
Introduction
This section describes how to request for downloading the scrip Master for various
exchanges.

Scrip Master Request


Structure ScripMasterRequest
Field Name Description Comment Data Type
MessageHeader
Exchange Code Code for each Refer Exchange Code CHAR[2]
exchange
Reserved Reserved for future Default blank CHAR[100]
Sample:
|DataLength =108| Transcode = 21| Exchange Code = NC| Reserved= |

Scrip Master Response


Structure Scrip Master Response
Field Name Description Comment Data Type
MessageHeader
Exchange Code Code for each Refer Exchange Code in Page 3 CHAR[2]
exchange
Scrip Master List It is followed by the NC and BC structure will be in Structure. Refer
structure for the CashMasterItem, NF will be in Respective Structure
complete DerivativeMasterItem, MX given below.
and NX will be in
CommodityMasterItem and
RN and RN will be in
CurrencyMasterItem
Reserved Reserved for future Default blank CHAR[100]

Sample:
|DataLength =327260| Transcode = 21| Exchange Code = NC| Scrip Master List =
CashMasterItem | Reserved = |
TradeTiger API 13

Cash Master Item


Structure CashMasterItem
Field Name Description Comment Data Type
DataLength LONG
Segment This specifies the segment CHAR[10 ]
which lies in between the
cash, derivatives and
commodity
Scrip Code unique token number for CHAR[10]
each scrip
ScripShortName This field contains Short CHAR[60]
name of the Company.
Reserved Reserved for future Default blank CHAR[100]

Sample:
DataLength = 184 | Segment = EQ | ScripCode = 17604 | ScripShortName = MARG |
Reserved (CompanyName) = MARG LTD. |

DerivativeMasterItem
Structure DerivativeMasterItem
Field Name Description Comment Data Type
DataLength LONG
DerivativeType This specifies the segment FI, FS, OI, OS CHAR[10 ]
which lies in between the
cash, derivatives and
commodity
ScripCode unique token number for CHAR[10]
each scrip
ScripShortName This field contains Short Comprises of CHAR[60]
name of the Company. Company Name,
Expiry date. For
Options it includes
Option Type and
Strike Price
ExpiryDate Date at which scrip will be Format : dd-MMM- CHAR[15]
getting expiry. YYYY
FutOption FUT, OPT CHAR[10]
TradeTiger API 14

StrikePrice The price at which the LONG


option contract can be
exercised.
LotSize Represent the lot size for LONG
the order to be placed
Reserved Reserved for future Default blank CHAR[100]
Sample : |DataLength =217| DerivativeType = OI| Scrip Code = 42368| Scrip Name =
MINIFTY 25-Jan-2012 CE 3900| Expiry Date = 25-Jan-2012 | FutOption =CE|
StrikePrice=390000| LotSize =20| Reserved = |

CommodityMasterItem
Structure CommodityMasterItem
Field Name Description Comment Data Type
DataLength LONG
ScripCode unique token number for CHAR[10]
each scrip
ScripShortName This field contains Short CHAR[60]
name of the Company.
DisplayLotSize Display the lot size. LONG
DisplayLotType Display the lot type. CHAR[20]

ExpiryDate Date at which the contract Format : dd-MMM- CHAR[15]


will expire. YYYY
LotSize Represent the lot size for LONG
the order to be placed.
LotType The unit of Lot(kg, gram) CHAR[10]

Multiplier A multiplier converts the Ex: If value is 1.5 LONG


display qty into order qty. then 15000
PriceTick a minimum amount by which LONG
price of a particular contract
can fluctuate upward or
downward
Reserved Reserved for future Default is blank CHAR[100]
Sample: |DataLength =235|ScripCode = 205993| ScripShortName = CRUDEOIL 21-
May-2012| DisplayLotSize =1| DisplayLotType =BBL| ExpiryDate= 21-May-2012 |
LotSize=100| LotType=BBL| Multiplier= 10000| PriceTick =10000| Reserved=|
TradeTiger API 15

CurrencyMasterItem
Structure DerivativeMasterItem
Field Name Description Comment Data Type
DataLength LONG
CurrencyType This specifies the segment FI, FS, OI, OS CHAR[10 ]
which lies in between the
cash, derivatives and
commodity
ScripCode unique token number for CHAR[10]
each scrip
ScripShortName This field contains Short Comprises of CHAR[60]
name of the Company. Company Name,
Expiry date. For
Options it includes
Option Type and
Strike Price
ExpiryDate Date at which scrip will be Format : dd-MMM- CHAR[15]
getting expiry. YYYY
FutOption FUT, OPT CHAR[10]
StrikePrice The price at which the LONG
option contract can be
exercised.
LotSize Represent the lot size for LONG
the order to be placed
DisplayLotSize Display the lot size. LONG
LotType The unit of Lot(USD, EUR, CHAR[25]
JPY, GBP)
DisplayLotType Display the lot type. CHAR[35]
OFType CHAR[15]
MinimumTradeQty LONG
PriceTick a minimum amount by which CHAR[25]
price of a particular contract
can fluctuate upward or
downward
Multipler A multiplier converts the LONG
display qty into order qty.
TradeTiger API 16

Reserved Reserved for future Default blank CHAR[100]


Sample : DataLength =329 | ScripCode = 1060 | ScripName = USDINR 29-Jul-2013 PE
58 | DerivativeType = OS | ExpiryDate=29-Jul-2013 | FutOption = PE | StrikePrice =
5800 | LotSize = 1 | DisplayLotSize = 0 |LotType = |DisplayLotType = | OFType =
OPTCUR | MinimumTradeQty = 0| PriceTick = 25 | Multipler = 0 |Reserved =

Order Request
Introduction
This section describes how to place an order from other application to TradeTiger.
The order request structure can accept upto 25 orders in a single request.

Order Request
Structure OrderRequest
Field Name Description Comment Data type
MessageHeader
RequestID User defined Id for Each Request. This CHAR[10]
can be used to identify each order request
separately by the client.
OrderCount Represents Number of orders in the SHORT
request
ExchangeCode Code for each exchange Refer Exchange CHAR[2]
Code
OrderType1 OrderTypes specifies the type of orders Ex: NEW/ CHAR[10]
MODIFY/
CANCEL
OrderItems Contains the list of order items Refer OrderItems Structure. Refer
structure given Respective
below Structure given
below
Reserved Reserved for future Default blank CHAR[100]

Sample:
Data Length = 357|Transcode = 11|Request ID = 55555|Order Count = 1|Exchange =
NC|Order Type1 = New|Order Items|Reservered = |

OrderItems
Structure OrderItems
Field Name Description Comment Data Type
DataLength LONG
OrderID Represents unique order id generated for Default Blank for CHAR[20]
each order generated by sharekhan.
New Order
TradeTiger API 17

CustomerID An Id of customer who has currently CHAR[10]


logged in and placed bulk order.
S2KID Unique sharekhan Id generated by CHAR[10]
sharekhan for each customer
ScripToken unique token number for each scrip CHAR[10]

BuySell User needs to specify whether the Ex: B, S, SAM, BM, CHAR[3]
buying/selling order needs to be placed
SM.
OrderQty Represents number of shares entered by For Modification of LONG
customer of particular company while
Partly Executed
placing order
Orders Quantity has
to be (OrderQuantity
– Executed Qty) for
Partly Executed
Orders.
OrderPrice If order type is market then price = 0 LONG
otherwise price=user defined price.
TriggerPrice Price at which order will get triggered and [Optional] Default LONG
ready for Execution. Blank.
DisclosedQty Represents quantity that is to be disclosed [Optional] Default 0. LONG
to public for that order
ExecutedQty Represents quantity at which actual [Optional] Default 0. LONG
transaction got executed. Required for
Modification and cancellation of Partly
Executed orders.
RMSCode Type of RMS Code CHAR[15]

ExecutedPrice Average Price of Partly Executed [Optional] Default 0. LONG


Quantity. Required for Modification and
cancellation of Partly Executed orders.
AfterHour After market hours Y-After Hour, CHAR[1]
N-Normal
GTDFlag Represents the status of Order Validation Default: Compulsory CHAR[5]
in duration. for All Exchanges
Ex:
IOC/GFD/GTD/GTC
GTD Default: Blank for CHAR[25]
Cash and FNO
compulsory for
Commodity
Ex: DD/MM/YYYY

Reserved Reserved for future Default blank CHAR[100]

Sample:
DataLength = 227|OrderID = |Customer Id = 12345|S2KID = |Scrip Token =
1491||BuySell = B|OrderQty = 1|OrderPrice = 2400|TriggerPrice = 0|DisclosedQty =
0|ExecutedQty = 0|RMSCode = |ExecutedPrice = 0|AfterHour = N|GTDFlag = |GTD =
|Reserved = |
TradeTiger API 18

Conditions for Order Entry:

1. If User select Limit Order, Trigger Price should be less than Order Price in case of BUY order. It should be
greater than Order Price in case of SELL/SHORT SELL orders.

2. Market orders are not allowed for options

3. Disclosed Qty must be minimum of 10% of Order qty

4. In Single Request maximum 25 orders can be accepted.

5. The exchange and Order type has to be unique in nature. NSE Cash orders and BSE Cash orders
cannot be placed in Same Request.

6. The Sharekhan order response will be sent based on the same order provided by the user.

7. For Cancel and Modification the RMS Code is mandatory

8. Either Customer ID or S2K ID is mandatory for Order placement. If both are available then
Customer ID will be considered for Processing the order.

9. GTD/GTC is only available for Commodity. Not for Cash, Derivative and Currency Orders.
TradeTiger API 19

Order Response
Introduction
This section describes us how order will get confirmed. This section explains the traders about the
confirmation of Sharekhan, exchange confirmation, and trade order confirmation. So overall this
confirmation is called as the order confirmation.

 Sharekhan Order confirmation


- The Sharekhan confirmation is based on the RMS (Risk management system)
preliminary validation of the order prior sending the order to the exchange.
- The customer will get single response for a single Request. For multiple orders the
sequence of the order will be maintained.

Sharekhan Order Confirmation


Structure SharekhanConfirmation

Field Name Description Comment Data type


MessageHeader
RequestID User defined Id for Each CHAR[10]
Request. This can be used to
identify each order separately
by the client.
ExchangeCode Code for each exchange Refer Exchange CHAR[2]
Code
Count No of Orders placed SHORT

OrderConfirmationItems It consists list of order response Order sequence will Structure


be maintained in the
same way of order
placed.
Reserved Reserved for future Default is blank CHAR[100]

Sample:
DataLength = 1038|Transcode = 11|RequestId = 55555|ExchangeName = NC|Count = 1|
OrderConfirmationItems = OrderConfirmationItem |Reserved = |
TradeTiger API 20

OrderConfirmationItem
Structure OrderConfirmationItem
Field Name Description Comment Data type
DataLength LONG

StatusCode Status Code representing True – Success CHAR[25]


whether order request
False - Failure
successfully processed or
not contains “ERROR” in
case of error occurs while
sending or processing
Bulk order request
Message Contains an error message CHAR[250]

SharekhanOrderID Represents unique order id CHAR[20]


generated for each order

OrderDateTime Time at which sent Format: CHAR[25]


response Cash: DD/MM/YYYY
HH:mm:ss
Der: YYYY-MM-DD
HH:mm:ss.n
RMSCode RMS server Code under CHAR[15]
which the order placed.
Will be used for
modification and
cancellation of orders.
CoverOrderID Child order ID in Default Blank CHAR[20]
Advanced Order.
Reserved Reserved for future Default blank CHAR[100]

Sample:
DataLength = 459|StatusCode = NO_ERROR|Message = |SharekhanOrderID =
243520919|OrderDateTime = 29/11/2011 12:03:27|RMSCode =
SKSIMNSE1|CoverOrderID = |Reserved = |
TradeTiger API 21

 Exchange order confirmation


- Is an Exchange acknowledgement of order received from Sharekhan.

Exchange Order/ Trade Confirmation


-
Structure ExchangeOrderConfir
mation
Field Name Description Comment Datatype

MessageHeader
ExchangeCode Code for each exchange Refer Exchange Code CHAR[2]

AckCode, This is the code number which Refer Appendix SHORT


specifies the exchange
confirmation such as pending,
rejection, modification, cancel.

MsgLength This specifies the data length SHORT


SharekhanOrderID Represents unique order id CHAR[20]
generated for each order

ExchangeOrderId Unique id for confirmation of the CHAR[20]


order.
ExchangeDateTime The date and time of confirmation / Ex: Cash : CHAR[25]
execution in the exchange DD/MM/YYYY
HH:mm:ss

TradeID This is the exchange trade id for CHAR[20]


executed orders.
CustomerId It’s an identification number for the CHAR[10 ]
customer whose order is placed.
ScripToken unique token number for each scrip CHAR[10]

BuySell Type of order. B, S, BM, SM And CHAR[10]


SAM. Refer
Abbreviation
OrderQty Quantity for which the order was LONG
placed.
RemainingQty The balance of the quantity which LONG
is remaining in the order which is
not being executed.
TradeQty The quantity which has been LONG
executed.
DisclosedQty Represents quantity that is to be LONG
disclosed to public for that order
DisclosedRemainingQty The balance amount of the LONG
TradeTiger API 22

quantity which is remaining in the


disclose quantity
OrderPrice If order type is market then price = LONG
0 otherwise price=user defined
price.
TriggerPrice Price at which order will get LONG
triggered and ready for Execution.
TradePrice The price at which the trade occurs. LONG

ExchangeGTD Flag indicating types of order Ex: CHAR[5]


IOC/GFD/GTD/GTC

ExchangeGTDDate If the order is a GTD order then it Default : Blank (or) CHAR[25]
will contain GTD date Ex: DD/MM/YYYY
HH:mm:ss.
ChannelCode, Unique Code of the terminal, in CHAR[10]
which the order was placed

Channel User Login ID/ Admin ID who has CHAR[30]


placed order
ErrorMessage Contains the error message. CHAR[250]

OrderTrailingPrice Used for Advanced orders. It Default 0 for normal LONG


mentions the trailing price for the Orders.
order
OrderTargetPrice Used for Advanced orders. It Default 0 for normal LONG
mentions the target price for Orders.
trailing stoploss order
UpperPrice Used for Advanced Bracket Order. Default 0 for normal LONG
It denotes the upper price for Orders.
target.
ChildSLPrice Used for Advanced Bracket Order. Default 0 for normal LONG
It denotes the stoploss price of the Orders.
second leg.
LowerPrice Used for Advanced Bracket Order. Default 0 for normal LONG
It denotes the lower price for Orders.
target.

Reserved Reserved for future Default blank CHAR[100]

Sample:
Derivative: |DataLength=599| Transcode = 13| ExchangeCode=|
TradeTiger API 23

AckCode=2073|MsgLength=|SharekhanOrderID=58293122|ExchangeOrderID=2011112
900000014|ExchangeDateTime=29/11/201117:00:07| TradeID =|CustomerID=1|
ScripToken=38665|BuySell=S|OrderQty=50|RemainingQty=0|TradeQty=50|DisclosedQt
y=0|DisclosedRemainingQty=0|OrderPrice=483165|TriggerPrice=0|TradePrice=0|Excha
ngeGTD=GFD|ExchangeGTDDate=0|ChannelCode=|ChannelUser=|ErrorMessage=NO_
ERROR| OrderTrailingPrice=0| OrderTargetPrice=0| UpperPrice=0| ChildSLPrice=0|
LowerPrice=0|Reserved=|

Cash:|DataLength=599|Transcode=13|ExchangeCode=EQ|AckCode=21|
MsgLength=|SharekhanOrderID=243520963|ExchangeOrderID=2011112900000053||Ex
changeDateTime=29/11/201117:00:07|TradeID=0|CustomerID=1289592| Scrip Token
=IFCI|BuySell=B|OrderQty=5|RemainingQty=5|TradeQty=0|DisclosedQty=0|Disclosed
RemainingQty=5|OrderPrice=2340|TriggerPrice=0|TradePrice=0||ExchangeGTD=|Excha
ngeGTDDate=20/08/198018:25:29|ChannelCode=PWR_TRD|ChannelUser=84ARUNA
CHALAM|ErrorMessage=Success|OrderTrailingPrice=0|OrderTargetPrice=0|UpperPrice
=0|ChildSLPrice=0| LowerPrice=|Reserved=|
TradeTiger API 24

Report Request
Introduction

If user wants to check the status of the order (i.e. the order is in pending/buy/sell/cancel/In-process)
as well as modify the status of the order, then user request for the order report.

Report Request
Field Name Description Comment Data Type
MessageHeader
Login ID This field should contain User *Mandatory for CHAR[20]
ID of the user/broker PowerBroker User
Optional for Normal
Users
Customer ID Customer Id of the user. *Mandatory for Normal CHAR[10]
User
Optional for
PowerBroker Users
Date Time User has to select the specific Default Blank. CHAR[25]
date to get the order status of Format:
that day.
Scrip Code unique token number for each Default Blank CHAR[10]
scrip
OrderId Is Used to get the details of the Default Blank CHAR[10]
specific order
Reserved Reserved for future Default blank CHAR[100]

Sample: DataLength = 9|TransCode = 31| LoginID = Robert | CustomerID = 983612|


DateTime = |ScripCode = | OrderId = |Reserved =

Note : Transaction code will be differ report to report on MessageHeader,kindly refer the Transaction Code
Used Table .
TradeTiger API 25

Report Response
Introduction

Order response contains information of the previously placed orders for the specific customer or the
all customers (Applicable only for Power broker) mapped under the Powerbroker.

Report Response
Structure SharekhanConfirmation

Field Name Description Comment Data type


MessageHeader
Record Count Number of records LONG

ReportItems It consists list of report response Report sequence Structure


items such as
will be maintained
Equity Order Report Item,
Derivative Order Report Item, in the same way of
DPSR Report
order placed.
Item,CashNetPositionReportItem,
TurnOver Report Item, Cash
Order Details Report Item,Cash
Trade Details report
Item,Derivative Order Details
Report Item,Derivative Trade
Details report Item,Cash Limit
Report Item,Commodity Limit
report Item
Reserved Reserved for future Default is blank CHAR[100]

Sample : DataLength = 469 | Transcode = 31 | ReportItems = reportItems[] | Reserved =

EquityOrderReportItem
Field Name Description Comment Data Type
DataLength Length of the Data LONG
Exchange Code Code for each exchange Refer Exchange CHAR[2]
Code
Order Status It contain status of the order Refer Appendix CHAR[20]
(I.e. order is pending or fully
executed).

Order ID Represents unique order id generated CHAR[20]


for each order by sharekhan.
Exchange Order ID Unique order id of exchange order CHAR[20]
confirmation.
TradeTiger API 26

Exchange Ack Date Date of that day exchange order will Ex: YYYY-MM-DD CHAR[25]
Time confirm. HH:mm:ss.n
Customer ID CHAR[10]

S2KID Unique user’s id generated by share CHAR[10]


khan.
Scrip Token unique token number for each scrip CHAR[10]
BuySell It contain the type of order (i.e. B,S,BM,SM,SS CHAR[2]
buy/sell)
OrderQty This field contains the number of LONG
shares entered by customer of
particular company.
Disclosed Quantity Indicates how many quantity users has LONG
disclosed.

Executed Quantity It contain the number of orders get LONG


executed.
Order Price If order type is market then price = 0 LONG
otherwise price=user defined price.
Executed Price From this field get the price of the LONG
executed orders.
Trigger Price Price at which order will get triggered LONG
RequestStatus It contains the status of request. (i.e. CHAR[15]
request is new/cancel/modify).
Date Time Ex: YYYY-MM-DD CHAR[25]
HH:mm:ss.n
AfterHour After market hours Y,N CHAR[1]
RMS code RMS server code under which the CHAR[15]
order placed.
GoodTill Represents the status of GTD,GTC. Ex: CHAR[5]
IOC/GFD/GTD/GTC
GoodTillDate CHAR[25]
Ex: YYYY-MM-DD
HH:mm:ss.n
Channel Code It contains the type of channel. Like TT, Web, TT CHAR[10]
API.
Channel User It contain the user id who has currently CHAR[20]
logged in.
OrderTrailingPrice Used for Advanced orders. It mentions LONG
the trailing price for the order
OrderTargetPrice Used for Advanced orders. It mentions LONG
the target price for trailing stoploss
order
UpperPrice Used for Advanced Bracket Order. It LONG
denotes the upper price for target.
LowerPrice Used for Advanced Bracket Order. It LONG
denotes the lower price for target.
BracketSLPrice Used for Advanced Bracket Order. It LONG
denotes the stoploss price of the second
leg.
Order_Type It is advanced order type CHAR[25]
i.e Bracket or TSL.
TrailingStatus It can contain any one value out of the CHAR[25]
following Track_inprocess:order is not
TradeTiger API 27

executed because the price is not match


with upper bound or lower bound of
the order price.
Track_ Completed: price is reached
any one of the bound then status
change to the track completed.
CoverOrderID Using this id we can identify the child CHAR[25]
order.
UpperLowerFlag It can contain two values: CHAR[1]
0: represents the upper bound is
reached.
1: Represents the lower bound is
reached.

Reserved Reserved for future Default blank CHAR[100]

Sample: DataLength=459|TransCode=123| ExchangeCode = NC|OrderStatus =


FullyExecuted|OrderID = 243520884|ExchangeOrderID =
2011112800000001|ExchangeAckDateTime =|TradeID =|CustomerID =
123456|S2KID = W78089|ScripToken = 10634|BuySell = B|OrderQty =
1|OrderDisclosedQty = 0|OrderExecutedQty = 1|OrderPrice = 4345|OrderExecutedPrice
= 4205|OrderTriggerPrice = 0|RequestStatus = NEW|OrderDateTime = 2011-11-28
11:04:33.0|AfterHour = N|RMSCode = SKSIMNSE1|GoodTill = GFD|GoodTillDate
=|ChannelCode = PWR_TRD|ChannelUser = SIDPOWERB|OrderTrailingPrice =
0|OrderTargetPrice = 0|UpperPrice = 0|LowerPrice = 0|BracketSLPrice = 0|Order_Type
= NOR|TrailingStatus =|CoverOrderID = 0|UpperLowerFlag = 0 | Reserved =

DerivativeOrderReportItem
Field Name Description Comment Data Type
DataLength Length of the Data LONG
Exchange Code Code for each exchange Refer Exchange CHAR[2]
Code
Order Status It contain status of the order Refer Appendix CHAR[20]
(I.e. order is pending or fully executed).

Order ID Represents unique order id generated for CHAR[20]


each order by sharekhan.
Exchange Order ID Unique order id of exchange order CHAR[25]
confirmation.
Customer ID CHAR[10]
S2KID Unique user’s id. CHAR[25]
Scrip Token unique token number for each scrip CHAR[10]
OrderType It can two types of orders CHAR[10]
i.e Market or Limit
BuySell It contain the type of order (i.e. buy/sell) B,S,BM,SM,SS. CHAR[2]

Order Quantity This field contains the number of shares Total Quantity(No. Of LONG
entered by customer of particular company Lot X Lot Size )
TradeTiger API 28

in multiple of minimum quantity for that


particular script.
Executed Quantity Order executed quantity LONG

Order Price If order type is market then price = 0 LONG


otherwise price=user defined price.
Average Price From this field get the price of the executed LONG
orders.
Date Time Ex: YYYY-MM-DD CHAR[25]
HH:mm:ss.n
RequestStatus It contain status of request(i.e request is CHAR[15]
new/cancel/modify).
Channel Code It contains the type of channel. Like TT,Web,TT API. CHAR[10]
Channel User It contain the user id who has currently CHAR[20]
logged in.
LastModTime It represents the date-time at which the order Ex: YYYY-MM-DD CHAR[25]
details where last modified. HH:mm:ss.n
OpenQty It represents pending order quantity. LONG.

POI Ignore this field CHAR[25]

Disclosed Quantity LONG

MIF Ignore this field CHAR[50]

Trigger Price Default 0 LONG


RMS Code RMS server code under which the order CHAR[15]
placed.
AfterHour After market hours Y,N CHAR[1]

GoodTill Represents the status of IOC, GFD, GTD CHAR[5]


and GTC.
GoodTillDate Format “yyyy-MM- CHAR[25]
DD HH:mm:ss.n”
UpdateDate It represents the date-time at which the order Format “yyyy-MM- CHAR[25]
details where last modified. DD HH:mm:ss.n”
UpdateUser It contain our system status CHAR[25]
Like NOR=order is pending.,TC= order
executed.,COC= canceled order.
CALevel Ignore this field CHAR[15]

AON Order will get executed either for all All or None CHAR[25]
quantity or it will not get executed entirely.
OPOC Ignore this field CHAR[25]

FnoOrderType It represents the normal order type. CHAR[25]

BuySellFlag Ignore this field Y - buy. CHAR[1]


N - sell.
Reserved Reserved for future Default blank CHAR[100]

Sample: DataLength=
=613|TransCode=
=123| ExchangeCode = NF|OrderStatus = Exchange
Rejected|OrderID = 58293083|ExchangeOrderID = 111133200000010|CustomerID =
TradeTiger API 29

95399|S2KID = W78089|ScripToken = 1234|OrderType = Limit |BuySell = B|OrderQty


= 100|OrderExecutedQty = 0|OrderPrice = 244|AveragePrice = 0|OrderDateTime = 2011-
11-28 14:17:01.0|RequestStatus = NEW|ChannelCode = PWR_TRD|ChannelUser =
LoginID|LastModTime = 2011-11-28 14:15:47.0|OpenQty = 100|POI = 0|DisclosedQty =
0|MIF = 0|OrderTriggerPrice = 0|RMSCode = SKDRMCX1|AfterHour = N|GoodTill =
GFD|GoodTillDate = |UpdateDate = 2011-11-28 14:17:02.0|UpdateUser =
FO_AH_NOR|CALevel = 0|AON = N|OPOC = 0|FnoOrderType = NOR|BuySellFlag =
N | Reserved =

DPSRReportItem
Field Name Description Comment Data Type
DataLength Length of the Data LONG

Exchange NC,BC CHAR[2]

CustomerID An id of customer who has CHAR[10]


currently logged in and
placed order.
S2KID Unique user’s id generated CHAR[10]
by share khan.
ScripToken It contains the name of the CHAR[10]
company of which shares are
brought or sell.
Receivable LONG

DpMarginQty Quantities which are moved LONG


from DP to Margin
DP LONG

Pool LONG

MF LONG

Pledge LONG

InvstQty LONG

MarginQty MaxTrade Quantity LONG

AvailableQty LONG

HoldPrice LONG

MktPrice LONG

MktValue LONG

DpMarginValue LONG

Reserved Reserved for future Default blank CHAR[100]


TradeTiger API 30

Sample:- DataLength = 188|Exchange = NC|CustomerID = 95399|S2KID =


W78089|ScripCode = 456|Receivable = 0|DpMarginQty = 0|DP = 1001|Pool = 0|MF =
0|Pledge = 0|InvstQty = 0|MarginQty = 0| AvailableQty = 1001|HoldPrice = 0|MktPrice =
1250|MktValue = 125125|DpMarginValue = 0|Reserved =

CashNetPositionReportItem

Field Name Description Comment DataType


DataLength Length of the Data LONG
Exchange Names of exchange:- Refer Exchange Code CHAR[2]
NF,MX,NX
ScripName This field contains name of the CHAR[100]
Company.
ScripToken unique token number for each CHAR[10]
scrip
Segment CHAR[20]
ProductType CHAR[20]

NetPosition LONG

AVGRate LONG

MKTRate LONG

MTMP Notional profit. LONG

BookedPL Realized profit. LONG

BuyQty It represents quantity bought LONG


today.
AVGBuyRate LONG

BuyValue It is average of purchase price. LONG

SellQty It represents quantity sold today. LONG

AVGSellRate LONG

SellValue It is average of sale price. LONG

DPQty LONG
Reserved Reserved for future Default blank CHAR[100]

Sample: DataLength= 304 | Exchange= NC | ScripName= AMBUJACEM | ScripToken =


1270 | Segment= EQ | ProductType= INVESTMENT | NetPosition= 0 | AVGRate = 0 |
MKTRate= 0 | MTMP= 0 | BookedPL= 0 | BuyQty= 0 | AvgBuyRate= 0 | BuyValue= 0 |
SellQty= 0 | AVGSellRate= 0 |SellValue= 0 | DPQty= 0 | Reserved =
TradeTiger API 31

TurnOverReportItem

Field Name Description Comment DataType


DataLength Length of the Data LONG
Exchange Names of exchange:- Refer Exchange Code CHAR[2]
NF,MX,NX
CustomerID An id of customer who has CHAR[10]
currently logged in and placed
order.
ScripToken unique token number for each CHAR[10]
scrip
S2KID Unique user’s id generated by CHAR[10]
share khan.
OpenQty It represents the previous order LONG
quantity.
BuyQty It represents quantity bought LONG
today.
SellQty It represents quantity sold today. LONG

NetQty NetQty= OpenQty LONG


+ BuyQty
- SellQty.
OpeningRate It represents the previous order LONG
quantity rate.
BuyRate It is average of purchase price. LONG

SaleRate It is average of sale price. LONG

NetRate LONG

IntradayRate LONG

IntradayQty LONG

SqOffQty SqOffQty= OpenQty LONG


+ BuyQty
- SellQty
PrevClose Last day closing price. LONG

MktPrice It is current price. LONG

MTM Notional profit. LONG

Bpl Realized profit. LONG


StatementDate CHAR[25]
OpenSettMTM LONG
NetSettledMTM LONG
BookedSettledMTM LONG
TradeTiger API 32

TotalMTM TotalMTM= MTM LONG


+ OpenSettMTM

TotalBpl TotalBpl= Bpl+ LONG

BookedSettledMTM

InvstType It is of two types:-Invest =trader CHAR[15]


will invest its own money.
MaxTrade=trader will invest
some amount and remaining
amount invested by sharekhan.

Reserved Reserved for future Default blank CHAR[100]

Sample:
DataLength = 256 | Exchange = NF | CustomerID = 313089 | ScripToken = 4568 |
S2KID = 101771| OpenQty = -20 | BuyQty = 20 | SellQty = 0 | NetQty = 0 | OpeningRate
= 507700 | BuyRate = 504000 |SaleRate = 0|NetRate = 0|IntradayRate =5040|IntradayQty
=20|SqOffQty =0|PrevClose =507995|MktPrice =505350|MTM = |Bpl = |StatementDate
=2011-12-05 00:00:00.0|OpenSettMTM =-59|NetSettledMTM =0|BookedSettledMTM =
0|TotalMTM =0|TotalBpl =0|InvstType =INVST|Reserved =

Note: It is only for FNO Derivative and Commodity and Currency


CashOrderDetailsReportItem

Field Name Description Comment DataType


DataLength Length of the Data LONG
OrderDisplayStatus CHAR[15]
Represents unique order id
generated for each order by
OrderID sharekhan. CHAR[20]
Date of that day exchange Ex: YYYY-MM-DD
ExchAckDateTime order will confirm. HH:mm:ss.n CHAR[25]
This field contains the
number of shares entered by
customer of particular
OrderQty company. LONG
If order type is market then
price = 0 otherwise
OrderPrice price=user defined price. LONG
Price at which order will get
OrderTriggerPrice triggered Default 0 LONG
It contain status of
RequestStatus request(i.e request is CHAR[15]
TradeTiger API 33

new/cancel/modify).
Used for Advanced orders.
It mentions the trailing price
OrderTrailingPrice for the order Default 0 LONG
Used for Advanced orders.
It mentions the target price
OrderTargetPrice for trailing stoploss order Default 0 LONG
Used for Advanced Bracket
Order. It denotes the upper
UpperPrice price for target. Default 0 LONG
ChildSLPrice Default 0 LONG
Used for Advanced Bracket
Order. It denotes the lower
LowerPrice price for target. Default 0 LONG
ErrorMsg CHAR[250]
Reserved Reserved for future Default blank CHAR[100]

Sample:- DataLength=461| OrderDisplayStatus = FullyExecuted | OrderID = 243520814|


ExchAckDateTime = 1980-08-20 18:25:23.0| OrderQty = 32| OrderPrice = 4200 |
OrderTriggerPrice =0| RequestStatus = NEW| OrderTrailingPrice = 0| OrderTargetPrice
= 0| UpperPrice = 0| ChildSLPrice = 0| LowerPrice = 0| ErrorMsg = | Reserved =

CashTradeDetailsReportItem
Field Name Description Comment DataType
DataLength Length of the Data LONG
ExchangeCode Code for each exchange Refer Exchange Code CHAR[2]
OrderID Represents unique order CHAR[20]
id generated for each
order by sharekhan.
ExchOrderID Unique order id of CHAR[25]
exchange order
confirmation.
ExchAckDateTime Date of that day exchange Ex: YYYY-MM-DD CHAR[25]
order will confirm. HH:mm:ss.n
TradeDateTime CHAR[25]
InternalTradeID CHAR[15]
TradeID CHAR[20]
CustomerID CHAR[10]
ScripToken It contains the name of CHAR[10]
the company of which
shares are brought or sell.
BuySell It contain the type of B,S,BM,SM,SS CHAR[2]
order (i.e. buy/sell)
TradeQty This field contains the LONG
number of shares traded
by customer of particular
company.
TradePrice LONG
TradeAmount LONG
TradeTiger API 34

TotalTradeAmount LONG
ChannelCode It contains the type of Like TT,Web,TT API. CHAR[10]
channel.
OrsExchangeMarketCode CHAR[10]
Reserved Reserved for future Default blank CHAR[100]

SampleData :- DataLength = 294 |ExchangeCode = NC|OrderID =


243520814|ExchOrderID = 2011112300000025|ExchAckDateTime = 1980-08-20
18:25:23.0|TradeDateTime = 1980-08-20 18:25:23.0|InternalTradeID =
223201668|TradeID = 60|CustomerID = 602269|ScripToken = 1023|BuySell =
B|TradeQty = 1|TradePrice = 4060|TradeAmount = 4060|TotalTradeAmount =
4060|ChannelCode = PWR_TRD|OrsExchangeMarketCode = N|Reserved =

DerivativeOrderDetailReportItem
Field Name Description Comment DataType
DataLength Length of the Data LONG
ExchangeCode Code for each exchange Refer Exchange Code CHAR[2]
OrderStatus It contain status of the Refer Appendix CHAR[20]
order
(I.e. order is pending or
fully executed).

OrderID Represents unique order CHAR[20]


id generated for each
order by sharekhan.
ExchangeOrderID Unique order id of CHAR[20]
exchange order
confirmation.
OrderDateTime Ex: YYYY-MM-DD CHAR[25]
HH:mm:ss.n
CustomerID CHAR[10]
DpClientId CHAR[25]
OrsOrderID CHAR[10]
ScripToken unique token number for CHAR[10]
each scrip
OrderType It can two types of CHAR[10]
orders
i.e Market or Limit
BuySell It contain the type of B,S,BM,SM,SS. CHAR[2]
order (i.e. buy/sell)
OrderQty This field contains the Total Quantity(No. Of Lot LONG
number of shares X Lot Size )
entered by customer of
particular company in
multiple of minimum
quantity for that
particular script.
OrderExecutedQty Order executed quantity LONG

OrderDisclosedQty LONG
OrderMIFQty
TradeTiger API 35

OrderPrice If order type is market LONG


then price = 0 otherwise
price=user defined
price.
OrderTriggerPrice Price at which order will LONG
get triggered
RMSCode RMS server code under CHAR[15]
which the order placed.
AfterHour After market hours Y,N CHAR[1]

BranchTraderID CHAR[15]
AveragePrice LONG
RequestStatus It contain status of CHAR[15]
request(i.e request is
new/cancel/modify).
GoodTill Represents the status of CHAR[5]
IOC, GFD, GTD and
GTC.
GoodTillDate Format “yyyy-MM-DD CHAR[25]
HH:mm:ss.n”
DpId CHAR[10]
OrsExchangeMktCode CHAR[10]
ChannelCode It contains the type of Like TT,Web,TT API. CHAR[10]
channel.
ChannelUser It contain the user id CHAR[20]
who has currently
logged in.
LastModDateTime It represents the date- Ex: YYYY-MM-DD CHAR[25]
time at which the order HH:mm:ss.n
details where last
modified.
OpenQty It represents pending LONG.
order quantity.
PvtOrderInd LONG
ClientAccount CHAR[20]
ClientGroup CHAR[20]
OhEntryDateTime CHAR[25]
WebResponseTime CHAR[25]
FohExitDateTime CHAR[25]
ExchangeAckDateTime CHAR[25]
Brokerage LONG
ParticipantCode CHAR[10]
UpdateDate It represents the date- Format “yyyy-MM-DD CHAR[25]
time at which the order HH:mm:ss.n”
details where last
modified.
UpdateUser It contain our system CHAR[25]
status
Like NOR=order is
pending.,TC= order
executed.,COC=
canceled order.
CALevel Ignore this field CHAR[15]
TradeTiger API 36

AllOrNone Order will get executed All or None CHAR[25]


either for all quantity or
it will not get executed
entirely.
OpenOrClose Ignore this field CHAR[25]
FnoOrderType It represents the normal CHAR[25]
order type.
FnoSquareOff CHAR[25]
Reserved Reserved for future Default blank CHAR[100]
Sample : DataLength = 764 | Exchange = NF | OrderStatus = In-Process | OrderID =
58293142 | ExchangeOrderID = | OrderDateTime =2011-12-01 10:22:31.0 | CustomerID
=602269 |DpClientId = | OrsOrderID=58293142 | ScripToken = 50265 | OrderType =
Limit|BuySell = B | OrderQty = 50 | ExecQty = 0 | OrderDisclosedQty = 0 |
OrderMIFQty = 0 | OrderPrice = 49975500 | TriggerPrice = 0 | RMSCode = SKSIMFO1 |
AfterHour = N | BranchTraderID = 111111111111 | AveragePrice = 0 | RequestStatus =
NEW | GoodTill= GFD | GoodTillDate=2011-12-01 10:22:31.0 | DpId=1 |
OrsExchangeMktCode = N | ChannelCode = PWR_TRD | ChannelUser = LoginID |
LastModDateTime = | OpenQty = 50 | PvtOrderInd = 0 | ClientAccount = | ClientGroup
= | OhEntryDateTime = | WebResponseTime = 0 | FohExitDateTime = |
ExchangeAckDateTime = | Brokerage = 0 | ParticipantCode = 0 | UpdateDate = 2011-12-
01 10:22:31.0 | UpdateUser = SIDPOWERB | CALevel=0 | AllOrNone = N |
OpenOrClose = O | FnoOrderType = NOR | FnoSquareOff = N | Reserved =

DerivativeTradeDetailsReportItem
Field Name Description Comment DataType
DataLength Length of the Data LONG
ExchangeCode Code for each exchange Refer Exchange Code CHAR[2]
InternalTradeId CHAR[15]
TradeId Represents unique trade CHAR[20]
id generated for each
order by sharekhan.
ChannelCode It contains the type of Like TT,Web,TT API. CHAR[10]
channel.
ChannelUser It contain the user id CHAR[20]
who has currently
logged in.
OrderId Represents unique order CHAR[20]
id generated for each
order by sharekhan.
CustomerId CHAR[10]
BuySell It contain the type of B,S,BM,SM,SS. CHAR[2]
order (i.e. buy/sell)
OrsExchMktCode CHAR[10]
ScripToken unique token number CHAR[10]
for each scrip
TradeQty This field contains the LONG
number of shares traded
by customer of
particular company.
TradeTiger API 37

TradePrice Executed Price LONG


TradeAmount Total Executed Amount LONG
TradeDateTime Executed Date Time CHAR[25]
ExchAckDateTime CHAR[25]
Brokerage Descibes the brokerage CHAR[10]
details
TotalTradeAmount Total Executed Amount LONG
UpdateDate It represents the date- CHAR[25]
time at which the order
details where last
modified.
UpdateUser It contain our system CHAR[25]
status
Like NOR=order is
pending.,TC= order
executed.,COC=
canceled order.
CALevel Ignore this field CHAR[15]
Reserved Reserved for future Default blank CHAR[100]

Sample: DataLength = 364 |ExchangeCode = NF | InternalTradeId = 38667168 | TradeId


= 4 | ChannelCode = PWR_TRD | ChannelUser = LoginId | OrderId = 58293127 |
CustomerId = 602269 | BuySell = B | OrsExchMktCode = N | ScripToken = 50265 |
TradeQty = 50 | TradePrice = 47659000 | TradeAmount = 23829500 | TradeDateTime =
2011-11-30 10:47:29.0 | ExchAckDateTime = 2011-11-30 10:47:28.0 | Brokerage = 0 |
TotalTradeAmount = 23829500 | UpdateDate =2011-11-30 10:42:47.0 | UpdateUser =
FO_AH_TC | CALevel = 0 | Reserved =

CashLimitReportItem
Field Name Description Comment DataType
DataLength Length of the Data LONG
CustomerID CHAR[10]
CurrentCashBalance Opening limit LONG
The client has
withdrawn the
PendingWithdrawalRequest amount LONG
Tradable not actual
NonCashLimit amount LONG
The client has
booked the Profit
CashBpl Loss LONG
Notional Profit Loss
CashMTM Cash LONG
LimitAgainstShares LONG
Last two days
CashPreviousSettlementExposure settlement balance LONG
Today’s utilized
IntradayMarginCash margin LONG
FnoMTM Notional Profit Loss LONG
TradeTiger API 38

FNO
FnoPremium LONG
FNO’s booked
FnoBpl ProfitLoss LONG
IntradayMarginFno LONG
IntradayMarginComm LONG
HoldFunds LONG
Total LONG
Reserved Reserved for future Default blank CHAR[100]

Sample:
DataLength = 174 | CustomerID = 602269 | CurrentCashBalance = 1000142200 |
PendingWithdrawalRequest = 0 | NonCashLimit = 10000000 | CashBpl = 0 | CashMTM
= 0 | LimitAgainstShares = 71253 | CashPreviousSettlementExposure = 0 |
IntradayMarginCash = -10032409 | FnoMTM = 0 | FnoPremium = -63563954 | FnoBpl =
-13475975 | IntradayMarginFno = -35759347 | IntradayMarginComm = | HoldFunds = 0
| Reserved =

CommodityLimitReportItem
Field Name Description Comment DataType
DataLength Length of the Data LONG
CustomerID CHAR[10]
CCB LONG
WithDrawn LONG
NCL LONG
MarginforComm LONG
MMTMLoss LONG
Bpl LONG
HoldFunds LONG
NseWithdrawlBal LONG
Applicable only for
PremiumForCurrency Currency LONG
Reserved Reserved for future Default blank CHAR[100]

Sample:- DataLength = 146 | CustomerID = 95399 | CCB = 100000000 | WithDrawn =


0 | NCL = 10000000 | MarginforComm = 0 | MMTMLoss = 0 | Bpl = -20440000 |
HoldFunds =0 | NseWithdrawlBal = | PremiumForCurrency = 0 |Reserved =

INDICES
Indice Request:
Structure Indice Request

Field Name Description Comment Data Type


MessageHeader
TradeTiger API 39

IsSubscribe Boolean Value BOOL


Reserved Reserved for future Default blank CHAR[100]
Sample:
|DataLength=107|Transcode=27|IsSubscribe=True|Reserved=|

Indices Response:
Structure Indices Response

Field Name Description Comment Data Type


MessageHeader
IndexCode Code Of The Index CHAR[10]
ExchangeName Name Of The Exchange CHAR[10]
IndiceName Name of The Index CHAR[25]
IndiceValue Value Of The Index Default 0 LONG
Open Open value Default 0 LONG
High High Value Default 0 LONG
Low Low Value Default 0 LONG
Close Close value Default 0 LONG
PercentChange Percentage Value Of Default 0 LONG
Change
YearHigh Yearly High Default 0 LONG
YearLow Yearly Low Default 0 LONG
NumberOfUpMove Number Of Upward Moves Default 0 LONG
NumberOfDownMove Number of Downward Default 0 LONG
Moves
TurnOver TurnOver Of The Indice Default 0 LONG
ChangeIndicator Upward/Downward +/- 00.00 CHAR[8]
Indicator
LTDate DataTime Format: CHAR[25]
MM/dd/yyyy
HH:mm:ss
Reserved Reserved for future Default is blank CHAR[100]
Sample:
DataLength=228|Transcode=27|IndexCode=25|ExchangeName=RN|IndiceName=EURI
NR|IndiceValue=6971|Open=6976|High=6987|Low=6960|Close=6988|PercentChange=-
24|YearHigh=7216|YearLow=0|NoOfUpMove=0|NoOfDownMove=0|TurnOver=0|Chan
geInd=|LTDate=10/25/2012 14:58:21|Reserved=|
TradeTiger API 40

Feed Request
Introduction
This section describes how to request for feed and receiving response for feed for
various exchanges.

Feed Request
Structure Feed Request

Field Name Description Comment Data Type


MessageHeader
Count No of scrips requested Int16
ScripList It is a list of scrip Format CHAR[][12]
ExchangeCodeScrip
code
Reserved Reserved for future Default blank CHAR[100]

Sample:
Data Length = 608|TransCode = 22|Count1|ScripList = NC22,MX205867|Reserved = |

Note: Maximum Feed request is 400 for Power Broker and 250 for Normal Users

Feed Response
Structure Feed Response
Field Name Description Comment Data Type
MessageHeader
Exchange Code for each exchange CHAR[5]
ScripToken unique token number for CHAR[10]
each scrip
LTPrice Last Traded Price Default value is ‘0’ LONG
LTQuantity Last Traded Quantity LONG
LTDate Last Traded Data Time Format CHAR[25]
MM/dd/yyyy
HH:mm:ss
BidPrice Price offered by Buyer Default ‘0’ LONG
BidQuantity Buying Quantity LONG
OfferPrice Seller’s Offer price Default ‘0’ LONG
OfferQuantity Seller Quantity LONG
TotalTradedQty Sum of Traded Quantity LONG
TradeTiger API 41

TradedQuantity Total traded quantity LONG


AverageTradePrice Average of Traded price Default ‘0’ LONG
Open Today’s Open price Default ‘0’ LONG
High Today’s High Default ‘0’ LONG
Low Today’s Low Default ‘0’ LONG
Close Yesterday Close Price Default ‘0’ LONG
PerChange Percentage change of Default multiplied LONG
LTPrice and close by ‘100’
TurnOver Total traded amount in LONG
Thousands
YearlyHigh 52 week High price Default ‘0’ LONG
YearlyLow 52 week Low price Default ‘0’ LONG
UpperCkt Upper limit for today’s Default ‘0’ LONG
trading
LowerCkt Lower limit for today’s Default ‘0’ LONG
trading
Difference Difference between LTPrice LONG
and Close Price
CostofCarry1 Cost of Carry1 LONG
CostOfCarry2 Cost Of Carry2 LONG
ChangeIndicator Upward/Downward +/- CHAR[10]
Indicator
SpotPrice Spot Price of the future Default ‘0’ LONG
contract
OITime Open Interest Time CHAR[20]
OI Open Interest Default ‘0’ LONG
OIHigh Open Interest High Default ‘0’ LONG
OILow Open Interest Low Default ‘0’ LONG
TotalTrades Total Trades LONG
TradeValueFlag TradeValueFlag CHAR[10]
Trend Trend CHAR[10]
SunFlag SunFlag CHAR[10]
AllnoneFlag Flag of All/None Default Blank CHAR[10]
Tender Tender Default ‘0’ LONG
PriceQuotation PriceQuotation (Only for CHAR[20]
Commodity) in terms of
TradeTiger API 42

Kg/Grams/ltr etc..,
TotalBuyQty Total Buy Quantity LONG
TotalSellQty Total Sell Quantity LONG
SegmentId Ignore this field CHAR[20]
OIDifference OI Difference Default ‘0’ LONG
OIDiffPercentage OI Difference Percentage Default ‘0’ LONG
Reserved Reserved for future Default blank CHAR[100]
Sample:
DataLength = 380|TransCode = 22|Exchange = NC|ScripToken = 1491|LTPrice =
2585|LTQty = 50|LTDate = 12/7/2011 1:16:32 PM|BidPrice = 2580|BidQty =
73484|OfferPrice = 2585|OfferQty = 9028|TotalTradedQty = 11475563|TradedQuantity
= 50|AvgTrdPrice = 2584|Open = 2530|High = 2620|Low = 2525|Close =
2520|PerChange = 258|TurnOver = 296528|YearlyHigh = 7000|YearlyLow =
2075|UpperCkt = 0|LowerCkt = 0|Difference = 65|CostOfCarry1 = 0|CostOfCarry2 =
0|ChangeIndicator = +|SpotPrice = 0|OITime = |OI = 0|OIHigh = 0|OILow =
0|TotalTrades = 0|TradeValueFlag = |Trend = |SunFlag = |AllnoneFlag = |CallPut =
||Tender = 0|PriceQuotation = | ExpiryDate = |TotalBuyQty = 0|TotalSellQty =
0|SegmentId = |OIDifference = 0|OIDiffPercentage = 0|prevOI = |Reserved = |

BidOffer
Structure Feed Response
Field Name Description Comment Data Type
MessageHeader
Exchange Code for each exchange CHAR[5]
ScripToken unique token number for CHAR[10]
each scrip
BidPrice Price offered by Buyer Default ‘0’ LONG
BidQuantity Buying Quantity LONG
OfferPrice Seller’s Offer price Default ‘0’ LONG
OfferQuantity Seller Quantity LONG
TotalBuyQty Total Buy Quantity LONG
TotalSellQty Total Sell Quantity LONG
Reserved Reserved for future Default blank CHAR[100]
Sample:
DataLength=145|TransCode=28|Exchange=NF|ScripCode=53038|BidPrice=290040|Bid
Qty=250|OfferPrice=290075|OfferQty=125|TotalBuyQty=65875|TotalSellQty=
104125|Reserved=|
TradeTiger API 43

MarketDepth
This section describes how to request for MarketDepth for various exchanges.

MarketDepth Request
Structure ScripMasterRequest
Field Name Description Comment Data Type
MessageHeader
Exchange Code Code for each Refer Exchange Code CHAR[5]
exchange
Scrip Code unique token number CHAR[10]
for each scrip
Reserved Reserved for future Default blank CHAR[100]
Sample:
DataLength=121|Transcode=25|Exchange=NC|ScripCode=1491|Reserved=|

MarketDepth Response
Structure Scrip Master Response
Field Name Description Comment Data Type
MessageHeader
Exchange Code Code for each Refer Exchange Code CHAR[5]
exchange
Exchange Name Of The CHAR[10]
Exchange
LastTradedTime Last Traded Time CHAR[25]
Scrip Code unique token number CHAR[10]
for each scrip
TotalBuyQuantity Total Buy Quantity Default 0 LONG

TotSellQuantity Total Sell Quantity Default 0 LONG

BuyPrice1 Buy Price Default 0 LONG

BuyQuantity1 Buy Quantity Default 0 LONG

BuyNumberOfOrder1 Total Number Of Default 0 LONG


orders
BuyPrice2 Buy Price Default 0 LONG
TradeTiger API 44

BuyQuantity2 Buy Quantity Default 0 LONG

BuyNumberOfOrder2 Total Number Of Default 0 LONG


orders
BuyPrice3 Buy Price Default 0 LONG

BuyQuantity3 Buy Quantity Default 0 LONG

BuyNumberOfOrder3 Total Number Of Default 0 LONG


orders
BuyPrice4 Buy Price Default 0 LONG

BuyQuantity4 Buy Quantity Default 0 LONG

BuyNumberOfOrder4 Total Number Of Default 0 LONG


orders
BuyPrice5 Buy Price Default 0 LONG

BuyQuantity5 Buy Quantity Default 0 LONG

BuyNumberOfOrder5 Total Number Of Default 0 LONG


orders
SellPrice1 Sell Price Default 0 LONG

SellQuantity1 Sell Quantity Default 0 LONG

SellNumberOfOrder1 Total Number Of Default 0 LONG


orders
SellPrice2 Sell Price Default 0 LONG

SellQuantity2 Sell Quantity Default 0 LONG

SellNumberOfOrder2 Total Number Of Default 0 LONG


orders
SellPrice3 Sell Price Default 0 LONG
TradeTiger API 45

SellQuantity3 Sell Quantity Default 0 LONG

SellNumberOfOrder3 Total Number Of Default 0 LONG


orders
SellPrice4 Sell Price Default 0 LONG

SellQuantity4 Sell Quantity Default 0 LONG

SellNumberOfOrder4 Total Number Of Default 0 LONG


orders
SellPrice5 Sell Price Default 0 LONG

SellQuantity5 Sell Quantity Default 0 LONG

SellNumberOfOrder5 Total Number Of Default 0 LONG


orders
Reserved Reserved for future Default blank CHAR[100]

Sample:
DataLength=284|Transcode=26|ExchangeCode=NC|Exchange=NseCash|
LastTradedTime =12/01/2011
12:42:39|ScripCode=1491|TotBuyQuantity=1037142|TotSellQuantity=2165484|BuyPric
e1=2380|BuyQuantity1=16141|BuyNumberOfOrder1=24|BuyPrice2=2375|BuyQuantity2
=38376|BuyNumberOfOrder2=48|BuyPrice3=2370|BuyQuantity3=147724|BuyNumber
OfOrder3=86|BuyPrice4=2365|BuyQuantity4=15300|BuyNumberOfOrder4=25|BuyPrice
5=2360|BuyQuantity5=41068|BuyNumberOfOrder5=86|SellPrice1=2385|SellQuantity1=
36120|SellNumberOfOrder1=13|SellPrice2=2390|SellQuantity2=60888|SellNumberOfOr
der2=39|SellPrice3=2395|SellQuantity3=74332|SellNumberOfOrder3=40|SellPrice4=240
0|SellQuantity4=105191|SellNumberOfOrder4=181|SellPrice5=2405|SellQuantity5=535
55|SellNumberOfOrder5=48|Reserved=|
TradeTiger API 46

Message
General Message:
Structure Message
Field Name Description Comment Data Type
Message Header LONG
RequestedTransCode Requested transaction Default is -1 SHORT
code of client
Message Code unique number for SHORT
identifying the message
Message CHAR[250]
Reserved Reserved for future Default blank CHAR[100]
Sample:
DataLength = 260|Transcode = 99|RequestedTranscode = 1|MessageCode = 0|Message =
Login Credentials Not Matching with TradeTiger. Kindly login with same Credentials
used in TradeTiger|Reserved = |

Appendix
NSE and BSE Equities Acknowledgement Code Description
Ack Code Description
1 NEW_ORDER_CONFIRMATION [New Order is confirmed by Exchange].
2 NEW_ORDER_REJECTION [New Order is rejected by Exchange].
3 MODIFY_ORDER_CONFIRMATION [Modify Order is confirmed by Exchange].
4 MODIFY_ORDER_REJECTION [Modify Order is rejected by Exchange].
5 CANCEL_ORDER_CONFIRMATION [Cancel Order is confirmed by Exchange].
6 CANCEL_ORDER_REJECTION [Cancel Order is rejected by Exchange].
7 TRADE_CONFIRMATION [Trade confirmed by Exchange].
8 EXPIRED_ORDER [Order is expired by Exchange].
9 SURVEILLENCE_REJECTION [Kind of rejection from order Routing System (FT)]
10 TRIGGER_CONFIRMATION [Order triggered by Exchange].
11 FREEZE_TO_CONTROL [Order is freezed due to price or order value].
12 ENGINE_REJECTION [Order rejected by Order Routing System (FT)].
13 RMM_REJECTED [Order rejected by the Sharekhan Risk Management System].
14 RMM_REJECTED [Order rejected by the Sharekhan Risk Management System].
15 NEW_ORDER_REJECTION [New Order is rejected by Exchange].
16 NEW_ORDER_CONFIRMATION_TRADE_MODIFICATION
17 NEW_ORDER_REJECTION_TRADE_MODIFICATION
18 ADV_ORDER_MODIFY_CONFIRMATION [Adv Order Modify confirmation by
Exchange]
19 ADV_ORDER_CANCEL_CONFIRMATION[Adv Order Cancel confirmation by
Exchange]
20 ADV_ORDER_TRAIL_CONFIRMATION[Adv Order Trail confirmation by Exchange]
21 ORDERPRICE_CONFIRMATION
TradeTiger API 47

NSE Derivatives Acknowledgement Code Description


Ack Code Description
2073 NEW_ORDER_CONFIRMATION [New Order is confirmed by Exchange].
2231 NEW_ORDER_REJECTION [New Order is rejected by Exchange].
2074 MODIFY_ORDER_CONFIRMATION [Modify Order is confirmed by Exchange].
2042 MODIFY_ORDER_REJECTION [Modify Order is rejected by Exchange].
2075 CANCEL_ORDER_CONFIRMATION [Cancel Order is confirmed by Exchange].
2072 CANCEL_ORDER_REJECTION [Cancel Order is rejected by Exchange].
2222 TRADE_CONFIRMATION [Trade confirmed by Exchange].
2212 TRIGGER_CONFIRMATION [Order triggered by Exchange].
2170 FREEZE_TO_CONTROL [Order is freezed due to price or order value].
2142 MODIFY_ORDER_REJECTION_2[Modify Order is rejected by Sharekhan].
2172 CANCEL_ORDER_REJECTION_2 [Cancel Order is rejected by Sharkehan].
2331 NEW_ORDER_REJECTION_2 [New Order is rejected by Sharekhan].
TradeTiger API 48

Commodities Acknowledgement Code Description


Ack Code Description
2073 NEW_ORDER_CONFIRMATION [New Order is confirmed by Exchange].
2231 NEW_ORDER_REJECTION [New Order is rejected by Exchange].
2074 MODIFY_ORDER_CONFIRMATION [Modify Order is confirmed by Exchange].
2042 MODIFY_ORDER_REJECTION [Modify Order is rejected by Exchange].
2075 CANCEL_ORDER_CONFIRMATION [Cancel Order is confirmed by Exchange].
2072 CANCEL_ORDER_REJECTION [Cancel Order is rejected by Exchange].
2222 TRADE_CONFIRMATION [Trade confirmed by Exchange].
2212 TRIGGER_CONFIRMATION [Order triggered by Exchange].
2170 FREEZE_TO_CONTROL [Order is freezed due to price or order value].

Order Status
Order Status Description
Pending Order is in processing state in Exchange
FullyExecuted Order is processed Successfully for All quantity.
PartlyExecuted Order is processed Successfully for partial quantity. Remaining Quantity is in
Processing State. The user can modify or Cancel the remaining quantity.
In Process Problem in sending order to the Exchange. Has to be cancelled and Replace the
order.
Cancelled Order has cancelled in the exchange
Freezed Order is freezed due to price or order value
Rejected Order is rejected based on limit available or order price.
Triggered The Stop loss order got triggered in Exchange.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy