Login Page - Create Account

Support Board


Date/Time: Sat, 28 Dec 2024 22:28:47 +0000



dtc protocol historical price data request

View Count: 1086

[2016-04-26 08:11:59]
User352015 - Posts: 5
Hi,
i am developing one server using DTC protocol. my immediate requirement is for historical price data .. below is the structure.i just wanted to know in that structure t_DateTime StartDateTime and t_DateTime EndDateTime is in which format. can anyone please help me on this.


struct s_HistoricalPriceDataRequest
  {
    uint16_t Size;
    uint16_t Type;

    int32_t RequestID;
    char Symbol[SYMBOL_LENGTH];
    char Exchange[EXCHANGE_LENGTH];
   char SecurityType[10];
   char Maturity[7];
   char StrikePrice[7];
   char PutOrCall[3];
    HistoricalDataIntervalEnum RecordInterval;
    t_DateTime StartDateTime;
    t_DateTime EndDateTime;
    uint32_t MaxDaysToReturn;
    uint8_t UseZLibCompression;
    uint8_t RequestDividendAdjustedStockData;
    uint8_t Flag_1;

    s_HistoricalPriceDataRequest()
    {
      Clear();
    }

    uint16_t GetMessageSize();
    void CopyFrom(void * p_SourceData);
    void Clear()
    {
      memset(this, 0, sizeof(s_HistoricalPriceDataRequest));
      Type = HISTORICAL_PRICE_DATA_REQUEST;
      Size = sizeof(s_HistoricalPriceDataRequest);
    }

    int32_t GetRequestID();
    void SetSymbol(const char* NewValue);
    const char* GetSymbol();
    void SetExchange(const char* NewValue);
    const char* GetExchange();
   void SetSecurityType(const char* NewValue);
   const char* GetSecurityType();
void SetMaturity(const char* NewValue);
   const char* GetMaturity();
   void SetStrikePrice(const char* NewValue);
   const char* GetStrikePrice();
void SetPutOrCall(const char* NewValue);
   const char* GetPutOrCall();
    HistoricalDataIntervalEnum GetRecordInterval();
    t_DateTime GetStartDateTime();
    t_DateTime GetEndDateTime();
    uint32_t GetMaxDaysToReturn();
    uint8_t GetUseZLibCompression();
    uint8_t GetRequestDividendAdjustedStockData();
    uint8_t GetFlag_1();
  };
[2016-04-26 17:48:43]
Sierra Chart Engineering - Posts: 104368
This is documented here:
https://dtcprotocol.org/index.php?page=doc/doc_DTCMessageDocumentation.php#t_DateTime

Also we can see that you have modified the structure above from the standard DTC Protocol structure. So the structure you created is not going to work with the protocol.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2016-04-27 04:34:17]
User352015 - Posts: 5
thank you very much for reply..yes i have modified the structure.i have more question.. in the above structure there is member called char Symbol[SYMBOL_LENGTH]. when i was testing with client application, in symbol field the value was something "USDINR", which i guess it is a symbol name. this name can be across all the symbols.will not come to know it is option token or not. how to resolve this ?
[2016-04-27 04:37:29]
Sierra Chart Engineering - Posts: 104368
This does not sound right.

The Symbol will be set to the symbol historical data is being requested for.

Refer to step 16 here:
https://www.sierrachart.com/index.php?page=doc/doc_DTC_TestClient.php#TestClientInstructions
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2016-04-27 07:08:31]
User352015 - Posts: 5
Hi,
In historical price data request there are fields
[char] Symbol  
The Symbol historical price data is requested for.

[char] Exchange  
Optional: The exchange for the Symbol.

If we want historical data for a specific expiry what data will be sent in the symbol field.

Presently we are getting the symbol as USDINR. This symbol will have multiple expiry dates, strike prices, option type.

So if we get only the symbol name are we supposed to respond for all the combinations?

Regards,
Prashant
[2016-04-27 07:57:13]
Sierra Chart Engineering - Posts: 104368
In this case you need to combine all of these together into the Symbol field:
USDINR. This symbol will have multiple expiry dates, strike prices, option type.

For example:
Symbol = [Underlying symbol]-[Expiration date]-[Strike price]-[Call or Put]
Exchange = [Exchange]

This is a very typical way to do this. You can look at any data feed, and an option symbol is a single text string (a single unit of data).
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2016-04-27 07:58:25
[2016-04-27 08:12:25]
Sierra Chart Engineering - Posts: 104368
Refer to this section here for more details:

https://dtcprotocol.org/index.php?page=doc/doc_DTCMessageDocumentation.php#Symbols
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2016-04-27 09:56:38]
User352015 - Posts: 5
sorry to bother you. i was testing the same sequenece from sierra test client application. i had put the code in debug to check what values i get from client application.. below is the debug output.. if the you below symbol field as come only EUH16. i am not able to identify is this option or future symbol and also Exchange field has come null. is this correct ?

(gdb) p sHistoricalPriceDataReq
$2 = {Size = 120, Type = 800, RequestID = 1, Symbol = "EUH16", '\0' <repeats 58 times>, Exchange = '\0' <repeats 15 times>,
RecordInterval = DTC::INTERVAL_1_DAY, StartDateTime = 6260577976870502400, EndDateTime = 0, MaxDaysToReturn = 0,
UseZLibCompression = 0 '\0', RequestDividendAdjustedStockData = 0 '\0', Flag_1 = 0 '\0'}
[2016-04-30 10:30:01]
Sierra Chart Engineering - Posts: 104368
Yes this is correct.

Sierra Chart does not use the Exchange unless the delimiter is specified by the server. Refer to:
https://dtcprotocol.org/index.php?page=doc/doc_DTCMessages_AuthenticationConnectionMonitoringMessages.php#Messages-LOGON_RESPONSE
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2016-04-30 10:36:24

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account