darwinex / dwxconnect

Seamlessly link any Trading Strategy in ANY programming language to Darwinex liquidity via MetaTrader 4 or 5. DWX Connect is your very own, fully customizable Trading API!
BSD 3-Clause "New" or "Revised" License
166 stars 88 forks source link

datetime.utcnow being deprecated #43

Closed stuald closed 6 months ago

stuald commented 6 months ago

Hi guys, through the code - this utcnow is referenced. But its going away. Is it possible to provide the string code to replace with in the client example and api and mql if required?

thanks

elvinex commented 6 months ago

Hi, Thanks for bringing this up. I wasn't aware of it yet. I replaced all occurences with datetime.now(timezone.utc). If you modify your own code, be sure to import timezone: from datetime import timezone You could also just use datetime.now() if you don't care about the time zone.