public NewOrderResponse ExecuteOrder(OrderSymbol symbol, decimal amount, decimal price, OrderExchange exchange, OrderSide side, OrderType type) { NewOrderRequest req = new NewOrderRequest(Nonce, symbol, amount, price, exchange, side, type); string response = SendRequest(req,"POST"); NewOrderResponse resp = NewOrderResponse.FromJSON(response); return resp; }
public async Task <NewOrderResponse> ExecuteSellOrderAsync(decimal amount, decimal price, OrderExchange exchange, OrderSymbol symbol, OrderType type) { return(await ExecuteOrder(amount, price, exchange, symbol, OrderSide.Sell, type)); }
//public bool is_hidden=false; public NewOrderRequest(string nonce, OrderSymbol symbol, decimal amount, decimal price, OrderExchange exchange, OrderSide side, OrderType type) { this.symbol = EnumHelper.EnumToStr(symbol); this.amount = amount.ToString(CultureInfo.InvariantCulture); this.price = price.ToString(CultureInfo.InvariantCulture); this.exchange = EnumHelper.EnumToStr(exchange); this.side = EnumHelper.EnumToStr(side); this.type = EnumHelper.EnumToStr(type); this.nonce = nonce; this.request = "/v1/order/new"; }