okex的原生API,通过type字段 1:开多 2:开空 3:平多 4:平空 就能实现各种交易了。 但通过发明者量化的API怎么写呢? 是下面这样吗?
exchange.SetDirection(“buy”) exchange.Buy(Price, Amount)
exchange.SetDirection(“closebuy”) exchange.Sell(Price, Amount)
exchange.SetDirection(“sell”) exchange.sell(Price, Amount)
exchange.SetDirection(“closesell”) exchange.buy(Price, Amount)