Closed sword134 closed 3 years ago
Hello,
I am trying to add an expiry time to a stoporder by taking the current time and adding 5 minutes. However on the Oanda trader platform it shows the expiry as tomorrow at a completely different timestamp.
I am using the following code
Cancel_Time = datetime.now() + timedelta(minutes=5) mktOrder_DAX_Long = StopOrderRequest(instrument="DE30_EUR", units=1, price=highest_high, gtdTime=str(Cancel_Time), timeInForce="GTD")
please read the documentation: https://developer.oanda.com/rest-live-v20/primitives-df/#DateTime
That means you should use datetime.utcnow() instead of datetime.now()
Hello,
I am trying to add an expiry time to a stoporder by taking the current time and adding 5 minutes. However on the Oanda trader platform it shows the expiry as tomorrow at a completely different timestamp.
I am using the following code