Hello all, today face new problem not reading current real time data

RL0520
Hi all, i was trying to run python program mentioned below time function
from_date = (datetime.datetime.now()- datetime.timedelta(minutes=225)).strftime("%Y-%m-%d %H:%M:%S")
print ("from_date",from_date)
to_date = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
print ("to_date",to_date), i have mentioned time in min 225 due to i want start trade at 2 pm , but now when i am trying to run now at 19:20 i am getting data of 14:00 , is there any problem or i need to change time function.Pls advice......................thanks


  • sujith
    Can you post the actual param that is being sent and data received?
  • RL0520
    From date: 2018-01-04 14:06:51
    To date: 2018-01-04 17:51:51
    [{'date': '2018-01-04T10:00:00+0530', 'open': 3910, 'high': 3946, 'low': 3910, 'close': 3941, 'volume': 5218}, {'date': '2018-01-04T10:15:00+0530', 'open': 3942, 'high': 3944, 'low': 3941, 'close': 3942, 'volume': 1771}, {'date': '2018-01-04T10:30:00+0530', 'open': 3943, 'high': 3943, 'low': 3939, 'close': 3941, 'volume': 1398}, {'date': '2018-01-04T10:45:00+0530', 'open': 3941, 'high': 3941, 'low': 3938, 'close': 3938, 'volume': 573}, {'date': '2018-01-04T11:00:00+0530', 'open': 3938, 'high': 3940, 'low': 3937, 'close': 3937, 'volume': 773}, {'date': '2018-01-04T11:15:00+0530', 'open': 3937, 'high': 3938, 'low': 3935, 'close': 3938, 'volume': 1404}, {'date': '2018-01-04T11:30:00+0530', 'open': 3938, 'high': 3940, 'low': 3937, 'close': 3937, 'volume': 827}, {'date': '2018-01-04T11:45:00+0530', 'open': 3937, 'high': 3938, 'low': 3936, 'close': 3936, 'volume': 415}, {'date': '2018-01-04T12:00:00+0530', 'open': 3936, 'high': 3940, 'low': 3936, 'close': 3939, 'volume': 441}, {'date': '2018-01-04T12:15:00+0530', 'open': 3940, 'high': 3940, 'low': 3936, 'close': 3938, 'volume': 252}, {'date': '2018-01-04T12:30:00+0530', 'open': 3938, 'high': 3940, 'low': 3936, 'close': 3937, 'volume': 558}, {'date': '2018-01-04T12:45:00+0530', 'open': 3937, 'high': 3938, 'low': 3934, 'close': 3935, 'volume': 890}, {'date': '2018-01-04T13:00:00+0530', 'open': 3935, 'high': 3942, 'low': 3934, 'close': 3941, 'volume': 1009}, {'date': '2018-01-04T13:15:00+0530', 'open': 3941, 'high': 3942, 'low': 3937, 'close': 3939, 'volume': 555}, {'date': '2018-01-04T13:30:00+0530', 'open': 3939, 'high': 3940, 'low': 3936, 'close': 3937, 'volume': 495}, {'date': '2018-01-04T13:45:00+0530', 'open': 3937, 'high': 3938, 'low': 3925, 'close': 3926, 'volume': 2941}, {'date': '2018-01-04T14:00:00+0530', 'open': 3926, 'high': 3928, 'low': 3923, 'close': 3924, 'volume': 3026}, {'date': '2018-01-04T14:15:00+0530', 'open': 3924, 'high': 3927, 'low': 3922, 'close': 3924, 'volume': 1251}, {'date': '2018-01-04T14:30:00+0530', 'open': 3923, 'high': 3924, 'low': 3920, 'close': 3923, 'volume': 2120}, {'date': '2018-01-04T14:45:00+0530', 'open': 3923, 'high': 3927, 'low': 3921, 'close': 3926, 'volume': 673}, {'date': '2018-01-04T15:00:00+0530', 'open': 3926, 'high': 3928, 'low': 3925, 'close': 3926, 'volume': 1525}, {'date': '2018-01-04T15:15:00+0530', 'open': 3926, 'high': 3927, 'low': 3922, 'close': 3922, 'volume': 708}, {'date': '2018-01-04T15:30:00+0530', 'open': 3922, 'high': 3923, 'low': 3918, 'close': 3919, 'volume': 1537}, {'date': '2018-01-04T15:45:00+0530', 'open': 3919, 'high': 3923, 'low': 3918, 'close': 3918, 'volume': 1399}, {'date': '2018-01-04T16:00:00+0530', 'open': 3918, 'high': 3920, 'low': 3914, 'close': 3919, 'volume': 2800}, {'date': '2018-01-04T16:15:00+0530', 'open': 3919, 'high': 3920, 'low': 3914, 'close': 3914, 'volume': 1008}, {'date': '2018-01-04T16:30:00+0530', 'open': 3914, 'high': 3915, 'low': 3911, 'close': 3913, 'volume': 1823}, {'date': '2018-01-04T16:45:00+0530', 'open': 3913, 'high': 3917, 'low': 3912, 'close': 3914, 'volume': 1212}, {'date': '2018-01-04T17:00:00+0530', 'open': 3914, 'high': 3920, 'low': 3913, 'close': 3918, 'volume': 1512}, {'date': '2018-01-04T17:15:00+0530', 'open': 3919, 'high': 3922, 'low': 3918, 'close': 3921, 'volume': 1459}, {'date': '2018-01-04T17:30:00+0530', 'open': 3921, 'high': 3925, 'low': 3919, 'close': 3920, 'volume': 1712}, {'date': '2018-01-04T17:45:00+0530', 'open': 3920, 'high': 3922, 'low': 3919, 'close': 3920, 'volume': 233}]

  • sujith
    I got the issue, the response has complete day data. I have informed data team to look into this.
Sign In or Register to comment.