I'm new to python and am facing some issue when i tried to connect using OpenQuoteContext. I've referred to the video on Youtube and it seems that everyone are able to call the method "OpenQuoteContxt" but I'm getting an error.
from futu import *
quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)
ret, data, page_req_key = quote_ctx.request_history_kline('HK.00700', start='2019-09-11', end='2019-09-18', max_count=5) # 5 per page, request the first page
Traceback (most recent call last): File "C:\Users\andyq\PycharmProjects\trading\Momo_API.py", line 3, in <module> quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111) NameError: name 'OpenQuoteContext' is not defined
Hi All
I'm new to python and am facing some issue when i tried to connect using OpenQuoteContext. I've referred to the video on Youtube and it seems that everyone are able to call the method "OpenQuoteContxt" but I'm getting an error.
Youtube Link: https://www.youtube.com/watch?v=qnNzQO2LOtE
Below is the my code and error:
Traceback (most recent call last): File "C:\Users\andyq\PycharmProjects\trading\Momo_API.py", line 3, in <module> quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111) NameError: name 'OpenQuoteContext' is not defined