TT API Document PDF
TT API Document PDF
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
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
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
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
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.
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.
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.
Sample:
|DataLength =327260| Transcode = 21| Exchange Code = NC| Scrip Master List =
CashMasterItem | Reserved = |
TradeTiger API 13
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
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]
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
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
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]
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
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.
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.
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.
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
Sample:
DataLength = 459|StatusCode = NO_ERROR|Message = |SharekhanOrderID =
243520919|OrderDateTime = 29/11/2011 12:03:27|RMSCode =
SKSIMNSE1|CoverOrderID = |Reserved = |
TradeTiger API 21
MessageHeader
ExchangeCode Code for each exchange Refer Exchange Code CHAR[2]
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
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]
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
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).
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]
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 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
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]
Sample: DataLength=
=613|TransCode=
=123| ExchangeCode = NF|OrderStatus = Exchange
Rejected|OrderID = 58293083|ExchangeOrderID = 111133200000010|CustomerID =
TradeTiger API 29
DPSRReportItem
Field Name Description Comment Data Type
DataLength Length of the Data LONG
Pool LONG
MF LONG
Pledge LONG
InvstQty LONG
AvailableQty LONG
HoldPrice LONG
MktPrice LONG
MktValue LONG
DpMarginValue LONG
CashNetPositionReportItem
NetPosition LONG
AVGRate LONG
MKTRate LONG
AVGSellRate LONG
DPQty LONG
Reserved Reserved for future Default blank CHAR[100]
TurnOverReportItem
NetRate LONG
IntradayRate LONG
IntradayQty LONG
BookedSettledMTM
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 =
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]
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]
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).
OrderDisclosedQty LONG
OrderMIFQty
TradeTiger API 35
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
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
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]
INDICES
Indice Request:
Structure Indice Request
Indices Response:
Structure Indices Response
Feed Request
Introduction
This section describes how to request for feed and receiving response for feed for
various exchanges.
Feed Request
Structure Feed Request
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
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
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
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.