Closed espala closed 2 years ago
Try to learn something about decimal
library. Common operations like
import decimal
price = '0.869'
order_price = decimal.Decimal(price)
print(order_price + 1)
print(order_price / 2)
print(order_price - decimal.Decimal(0.001))
print(order_price * decimal.Decimal('0.3'))
# turn decimal to string
print(str(order_price))
Hello There,
I am using the following api. With the help of this api, I can create an order for any coin at any price I want.
Sometimes I need to get "last price +1" or "last price +3" quickly. Sometimes I need to sell similarly "last price -1" or "last price -3". How can I do this, if you can help I would be glad.
I'm just developing myself in Python and I'm not very good at it. I will learn in time. Please excuse me, my goal is not to want fish, but to learn to fishing. I'm working on it.
I have reviewed many articles in issues on github, but I could not find clear information. Maybe I didn't understand.
tried to derive it by copying the following example from spot.py. But I was not successful. I'm probably missing a lot of things or doing it wrong.
"https://github.com/gateio/gateapi-python/blob/master/example/spot.py"