python 3.x - Vendor pythoncom API Issue -


i trying run vendor sample application, running truedata.requestminutes() function (written in python using comtypes functions) in loop function makes loop execute other commands written within loop , executes api function @ end of loop execution. wanted call api function no. of times after making function wait 1 minute each time. introduced time.sleep(60) command within loop. however, when loop executed system first waits n*60 seconds , executes truedata.requestminutes() function n number of times @ end of n*60 seconds

the below code tries pick stock data reliance stock through truedata.requestminutes() function twice through while loop print command within. instead of picking stock data first , printing counter 'p'. code first prints counter values twice , executes api function.

asymbol = ["reliance"] p=0 while (p<2):  history_symbol in asymbol:       requestidminutes = truedata.requestminutes(history_symbol, datefrom, dateto, 1)  p=p+1  print (p) 

result of code follows:

c:\programdata\anaconda3\python.exe "c:/users/sumit uppal/documents /cplusplus/truedatavelocityexternalcustom.py" velocity has been started 1 2 bardata event. request id  2  bars count:  339 bar:  reliance 2017-08-21 14:53:00 1570.75 1570.8 1569.1 1569.25 3395 0 opened database records created bardata event. request id  1  bars count:  339 bar:  reliance 2017-08-21 14:53:00 1570.75 1570.8 1569.1 1569.25 3395 0 opened database records created 

i don't access vendor api code , trying find solution within python code

please let me know how can resolved.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -