coinrust / crex

A Golang cryptocurrency trading API & Library. Support Binance, BitMEX, Deribit, Bybit, Huobi DM, OKEX Futures and more.
MIT License
501 stars 153 forks source link

Add timeInForce option to place order options #30

Closed evzpav closed 3 years ago

evzpav commented 3 years ago

Hi @frankrap,

I could not open a long order to Binance Futures and I got the following error message:

code=-1102, msg=Mandatory parameter 'timeInForce' was not sent, was empty/null, or malformed."

So I added the time in force as "GTC" as default and added the option to add time in force via the place order options. Doing so fixed it and I could place orders. Kindly let me know if this PR is ok for you or you find a better way to fix this.

Thanks!

Evandro