How do you write python buy and sell?

Author: Two against the wind, Created: 2021-04-27 16:51:55, Updated:

The API documentation only gives the type of the specified number of purchases. def main (: id = exchange.Buy ((100, 1) Log ((id: , id) Please teach me how to write Python full-stock buy and full-stock sell?


More

benseThe exchange.Buy ((("Hip")

The grassAvailable balance/price

ktrader buyPrice = _N(ticker.Sell + spread, ZPrecision) buyAmount = _N(diffAsset / buyPrice, XPrecision) if buyAmount < MinStock: return False exchange.Buy(buyPrice, buyAmount)