gateio / gateapi-go

100 stars 32 forks source link

Futures order amount #46

Open devops35 opened 1 month ago

devops35 commented 1 month ago

I didn't fully understand futures order. For example, I will buy $5 dogecoin. I couldn't understand how to enter 5 dollars into the API. Can you help me? I think I need to set this $5 with another api request. But how and where do I do it?

By looking at the process on the web, I enter size as 1 and price as 0. In this case, it tries to do the same thing I did last time on the web.

revilwang commented 1 month ago

size parameter in FuturesOrder is the number of contracts placed. If you want to input amount in USDT, you need to calculated the size using the quanto_multiplier(which is how much USDT 1 contract represents) in contract detail. For instance, the quanto_multiplier for DOGE_USDT is 10, so you cannot buy $5, because the minimum size is 1, which is 10 USDT