Broadcast Messages
π Logon Request (Client to WFH)β
This message is sent by the client for establishing a session with WFH for broadcast subscription. The WFH will authenticate the user by validating
The logon message and respond with a Logon Response message.
| Tag | FieldName | Reqβd | Data type (Max) | Comment |
|---|---|---|---|---|
| MessageHeader | Y | Message header to be filled with message code = 101 | ||
| 67 | User Id | Y | String(10) | Max Len 10 |
| 68 | Password | Y | String(8) | Condition:Password should be between 6 and 8 characters Paasword should be alphanueric Special characters not allowed Eg: ][ ~ @ # $ % ^ & * ( ) - \ + { \ / = ? |
| 401 | API Token Type | O | String(1) | 1 - For Password 2 β Access Token Tag 68 will be used for pwd/token verification |
Logon Req: 63=FIX3.0|64=101|65=75|66=2004-05-04 233022|67=user1|68=123456β
** β οΈ Remarks:**
The format of the row data field in logon request message (sent by Client) is as follows:
- Message Header with logon request message code and length of the row data field
- User Id, max length is 10 char
- Password and New Password should be between 6 and 8 characters
π₯ Logon Response (WFH to Client):β
For every logon request, WFH will send the Logon response message to Client.
| Tag | FieldName | Reqβd | Data type (Max) | Comment |
|---|---|---|---|---|
| MessageHeader | Y | Message header to be filled with message code = 102 | ||
| 70 | Logon Status | Y | Short | Value to identify the logon status. 10000 β Login Successful |
| 97 | Days to Expire | O | Short | No. of days for expire. This will be populated within 15 days of expiry of the account. In this case, the logon status will be 10004. |
| 1 | Market Segment Id | Y | Long | Login allowed for the user. |
Broadcast mechanism is developed over a publish/subscribe model. In order to receive market information, user of the API will need to subscribe to the security as well as the information.
π Multiple Touchline Request (Client to WFH)β
The Market Watch is send by User to subscribe/unsubscribe to the touchline broadcast (best buy qty, buy value, sell qty, sell value.etc) message for any specified security. Request can be send as Multiple Pair of Segment Id and Token. The Response for Multiple touchline Request is Market Snapshot Information.
| Tag | FieldName | Reqβd | Data type (Max) | Comment |
|---|---|---|---|---|
| MessageHeader | Y | Message header to be filled with message code = 206 | ||
| 1 | Segment Id | Y | Long | |
| 7 | Security Code | Y | Long | |
| 49 | Response Type | Y | Short | 1 = Touchline with fixed length native data 0 = Normal touchline |
| 200 | LTP Change | O | Short | 1 β Send Touchline Response on LTP change |
| 230 | Operation Type | Y | Short | 1 β Subscribe 2 - Unsubscribe |
Example:
63=FIX3.0|64=206|65=80|1=1$7=22|1=1$7=1594|1=3$7=505537|1=3$7=500105|1=1$7=5 53|1=3$7=526881|1=3$7=500180|1=1$7=11630|230=1
π₯ Multiple Touchline Response [Response Type = 0] (WFH to Client)β
The Market Watch Response is send by WFH whenever the update is received from exchange for the specified security. This message will give best buy qty, buy price, sell qty, sell value etc.
| Tag | FieldName | Reqβd | Data type (Max) | Comment |
|---|---|---|---|---|
| MessageHeader | Y | Message header to be filled with message code = 209 | ||
| 1 | Segment Id | Y | Long | |
| 7 | Security Code | Y | Long | |
| 2 | Buy Qty | O | Long | |
| 5 | Sell Qty | O | Long | |
| 3 | Buy Price | O | Long | |
| 6 | Sell Price | O | Long | |
| 8 | Last Trade Price | O | Long | |
| 9 | Last Trade Quantity | O | Long | |
| 73 | Last Trade Time | O | String(21) | |
| 74 | Last Update Time | Y | String(21) | |
| 88 | Open Interest | N | Long | |
| 54 | NetChangeFromPrevClose | O | String | In Rs |
| 76 | Close Price | O | Long | |
| 75 | Open Price | O | Long | |
| 77 | High Price | O | Long | |
| 78 | Low Price | O | Long | |
| 79 | Volume | O | Long | |
| 80 | Average Traded Price | O | Long | Average Traded Price currently zero |
| 81 | Total Buy Qty | O | Long | currently zero |
| 82 | Total Sell Qty | O | Long | currently zero |
| 93 | Life Time High | O | Long | currently zero |
| 94 | Life Time Low | O | Long | currently zero |
| 38 | Market Type | O | String | Applicable only for NCDEX spot |
| 465 | Open Interest Percentage | O | Long | |
| 466 | High Open Interest | O | Long | |
| 467 | Low Open Interest | O | Long | |
| 380 | Daily Price Range | O | String | |
| 499 | Trade Execution Range | O | String |
Example:
63=FIX3.0|64=209|65=272|66=04092012 071138|1=1|73=2012-09-04 152908|7=22|79=121758|8=130035|54=-0.63|9=395|80=130117|74=2012-09-04 152908|2=5|3=130035|5=59|6=130100|81=99436|82=82671|76=130860|75=130770|77=1 30770|78=129615|88=|93=0|94=0|393=-8.25|80=130117|380=0-0|499=0-0|399=100
π Multiple Touchline Response [Response Type = 1] (WFH to Client)β
The Market Watch Response is send by WFH whenever the update is received from exchange for the specified security. This message will contain following data.
| Tag | FieldName | Reqβd | Data type (Max) | Comment |
|---|---|---|---|---|
| MessageHeader | Y | Message header to be filled with message code = 51 | ||
| 50 | Native Fixed Length Data | Y | This tag will contain fixed length data as mentioned | |
| Segment Id | Y | Long | ||
| Security Code | Y | Long | ||
| Last Update Time | Y | Long | It is no of seconds that have elapsed since 01/01/1980 | |
| Last Trade Time | Y | Long | It is no of seconds that have elapsed since 01/01/1980 | |
| Last Trade Price | Y | Long | ||
| Buy Qty | Y | Long | ||
| Buy Price | Y | Long | ||
| Sell Qty | Y | Long | ||
| Sell Price | Y | Long | ||
| Open Price | Y | Long | ||
| High Price | Y | Long | ||
| Low Price | Y | Long | ||
| Close Price | Y | Long | ||
| Decimal Locator | Y | Long | ||
| Previous Day Close Price | Y | Long |
Example
63=FIX3.0|64=51|50= {Segment Id Security Code β¦β¦ Previous Day Close Price}
π Best Five Subscription Request (Client to WFH)β
The Best Five Request is send by User to subscribe/Unsubscribe the full broadcast (best five buy qty, buy value, sell qty, sell value) message for specified security, which includes the market depth as provided by the exchange.
| Tag | FieldName | Reqβd | Data type (Max) | Comment |
|---|---|---|---|---|
| MessageHeader | Y | Message header to be filled with message code = 127 | ||
| 1 | Segment Id | Y | Long | |
| 7 | Security Code | Y | Long | |
| 230 | Operation Type | Y | Short | 1 β Subscribe 2 β Unsubscribe |
π€ Best Five Information (WFH to Client)β
The Best Five Response is sent by WFH whenever the update is received from exchange for specified security. This message will give top five buy qty, buy price, sell qty, sell value etc.
| Tag | FieldName | Reqβd | Data type (Max) | Comment |
|---|---|---|---|---|
| MessageHeader | Y | Message header to be filled with message code = 128 | ||
| 1 | Segment Id | Y | Long | |
| 7 | Security Code | Y | Long | |
| 74 | Last Update Time | Y | String(21) | |
| 73 | Last Trade Time | O | String(21) | |
| 8 | Last Trade Price | O | Long | |
| 9 | Last Trade Quantity | O | Long | |
| 81 | Total Buy Qty | O | Long | |
| 82 | Total Sell Qty | O | Long | |
| 76 | Close Price | O | Long | |
| 75 | Open Price | O | Long | |
| 77 | High Price | O | Long | |
| 78 | Low Price | O | Long | |
| 79 | Volume | O | Long | |
| 80 | Average Traded Price | O | Long | Average Traded Price |
| 54 | NetChangeFromPrevClose | O | String | In Rs |
| 88 | Open Interest | N | Long | |
| 380 | Daily Price Range | O | String | |
| 93 | Life Time High | O | Long | |
| 94 | Life Time Low | O | Long | |
| 465 | Open Interest Percentage | O | Long | |
| 466 | High Open Interest | O | Long | |
| 467 | Low Open Interest | O | Long | |
| 499 | Trade Execution Range | O | String | |
| This substructure will repeat 5 times | ||||
| 11 | B/S Flag | Y | Short | 1 for Buy and 2 for Sell |
| 14 | Price | Y | Long | B/S Price |
| 12 | Quantity | Y | Long | B/S Quantity |
| 37 | No. of Orders | Y | Long | This signifies No. Of Buyers Sellers |
Explanation for above Message:
Tag 14, 12 and 37 will be receive 5 times for both Buy and Sell.
βΆοΈ Pause/Resume Request (Client to WFH)β
This method can be use to pause or resume the broadcast subscription for user when portal / app is in minimine mode or broadcast is not needed temporarily. The Pause/Resume message is send by user to WFH. when App is minimized / Activated for any specified security. Request can be send as Multiple Pair of Segment Id and Token.
| Tag | FieldName | Reqβd | Data type (Max) | Comment |
|---|---|---|---|---|
| MessageHeader | Y | Message header to be filled with message code = 106 | ||
| 230 | Operation Type | Y | Short | 1 β Pause 2 β Resume |
Example:
- 63=FIX3.0|64=106|65=80|66=19:02:31|230=1 (for Pause)
- 63=FIX3.0|64=106|65=80|66=19:02:31|230=2 (for Resume)
π·οΈ Multiple LTP Touchline Request (Client to WFH)β
The Market Watch is send by User to subscribe/unsubscribe to the ltp touchline broadcast message for any specified security. Request can be send as Multiple Pair of Segment Id and Token.
| Tag | FieldName | Reqβd | Data type (Max) | Comment |
|---|---|---|---|---|
| MessageHeader | Y | Message header to be filled with message code = 347 | ||
| 1 | Segment Id | Y | Long | |
| 7 | Security Code | Y | Long | |
| 230 | Operation Type | Y | Short | 1 - Subscribe 2 - Unsubscribe |
Example
63=FIX3.0|64=347|65=80|1=1$7=22|1=1$7=1594|1=3$7=505537|1=3$7=500105|1=1$7=5 53|1=3$7=526881|1=3$7=500180|1=1$7=11630|230=1
π LTP Touchline Response (WFH to Client)β
The LTP Touchline Response is send by WFH whenever the update is received from exchange for the specified security. This message will give best LTP, LTT, ClosePrice, Decimal Locator.
| Tag | FieldName | Reqβd | Data type (Max) | Comment |
|---|---|---|---|---|
| MessageHeader | Y | Message header to be filled with message code = 348 | ||
| 1 | Segment Id | Y | Long | |
| 7 | Security Code | Y | Long | |
| 8 | Last Trade Price | O | Long | |
| 74 | Last Update Time | Y | String(21) | |
| 76 | Close Price | O | Long | |
| 399 | Decimal Locator | O | String |
Example
63=FIX3.0|64=348|65=272|66=04092012 071138|1=1|7=22|8=130035|74=2012-09-04 152908|76=130860|399=100