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 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"; }
public async Task <NewOrderResponse> ExecuteOrder(decimal amount, decimal price, OrderExchange exchange, OrderSymbol symbol, OrderSide side, OrderType type) { NewOrderRequest req = new NewOrderRequest(Nonce, symbol, amount, price, exchange, side, type); string response = await SendRequestAsync(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"; }
public NewOrderResponse ExecuteSellOrderBTC(decimal amount, decimal price, OrderExchange exchange, OrderType type) { return ExecuteOrder(OrderSymbol.BTCUSD, amount, price, exchange, OrderSide.Sell, type); }
public NewOrderResponse ExecuteOrder(string 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 NewOrderResponse ExecuteSellOrderBTC(decimal amount, decimal price, OrderExchange exchange, OrderType type) { return(ExecuteOrder(OrderSymbol.BTCUSD, amount, price, exchange, OrderSide.Sell, type)); }
public NewOrderResponse ExecuteBuyOrderETH(decimal amount, decimal price, OrderExchange exchange, OrderType type) { return(ExecuteOrder(OrderSymbol.ETHUSD, amount, price, exchange, OrderSide.Buy, type)); }
public NewOrderResponse ExecuteSellOrder(string pair, decimal amount, decimal price, OrderExchange exchange, OrderType type) { return(ExecuteOrder(pair, amount, price, exchange, OrderSide.Sell, type)); }