Closed overstartup closed 2 years ago
this is the solution:
var instruments = api.GetInstruments(OkexInstrumentType.Swap).Data.Where(x => x.SettlementCurrency == "USDT" && x.Instrument == Symbol).FirstOrDefault();
int lotzize = (int)(2789 instruments.ContractValue); decimal size = Math.Round((decimal)(300 Leverage) / lotzize);
Could you please explain to me how I can calculate the order size ? The other question, how I can set the leverage?
For example, I want to order Ethereum : price : 2789 leverage : 40 amount: 300 USDT