Open MightyMaxSaviorOfTheUniverse opened 5 years ago
I was unable to find proper solution for this and that is why I made it in this way:
def make_bid(pair, direction):
threadUpdater = Thread(target=update_reports)
threadUpdater.start()
... (making bid)
def update_reports():
time.sleep(2 * 60)
for k, item in iqoption.portfolio.items():
if item.win == "equal":
continue
... (handle "k" as bid result)
This example ignores cases when result is really "equal", but it is fine for me. It is not a production solution
I was unable to find proper solution for this and that is why I made it in this way:
def make_bid(pair, direction): threadUpdater = Thread(target=update_reports) threadUpdater.start() ... (making bid)
def update_reports(): time.sleep(2 * 60) for k, item in iqoption.portfolio.items(): if item.win == "equal": continue ... (handle "k" as bid result)
This example ignores cases when result is really "equal", but it is fine for me. It is not a production solution
@djumpen @harwee
I've encountered a new problem
What do you do if Portfolio is never populated?
_dictitems([])
In such a situation it is impossible to determine a win, lose or break even.
Is there any other way to determine if a bid has ended and the result?
Hello
I can't seem to find any method that shows you whether you have made a profit or a lose from your last trade, or even if that trade has been concluded
Can anyone point me in the right direction with some working code examples?
Thank you in advance