Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 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));
 }
Ejemplo n.º 3
0
 //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";
 }