Beispiel #1
0
        public async Task PrintPlaceOrder()
        {
            Models.Orders.NewOrder order = new Models.Orders.NewOrder("eth_mxn", "buy", "limit")
            {
                Major = "0.03631629",
                Price = "3496.01"
            };
            var response = await apiClient.PlaceOrderAsync(order);

            if (response.Success)
            {
                Console.WriteLine(JsonConvert.SerializeObject(response.Payload));
            }
            else
            {
                Console.WriteLine(JsonConvert.SerializeObject(response.Error));
            }
        }
        public async Task <ApiResponse <OrderCreated> > PlaceOrderAsync(Models.Orders.NewOrder order)
        {
            string endpoint = $"/{apiVersion}/orders/";

            return(await SendRequest <OrderCreated>(HttpMethod.Post, endpoint, JsonConvert.SerializeObject(order)));
        }