public static async Task <StopOrderResponse> StopOrderAsync(this LunoClient lunoClient, string orderId)
        {
            var stopOrderCriteria = new StopOrderCriteria {
                OrderId = orderId
            };

            return(await lunoClient.PostAsync <StopOrderResponse>(ResourceBase, stopOrderCriteria));
        }
 public static async Task <TickerResponse> GetTickersAsync(this LunoClient lunoClient)
 {
     return(await lunoClient.GetAsync <TickerResponse>(ResourceBase, null));
 }
 public static async Task <CreateOrderResponse> PostLimitOrderAsync(this LunoClient lunoClient, LimitOrderCriteria limitOrderCriteria)
 {
     return(await lunoClient.PostAsync <CreateOrderResponse>(ResourceBase, limitOrderCriteria));
 }
 public static async Task <TradeResponse> GetTradesAsync(this LunoClient lunoClient, string pair, DateTime since)
 {
     return(await lunoClient.GetAsync <TradeResponse>(ResourceBase, $"?pair={pair}&since={since.DateTimeToUnixTimestamp()}"));
 }
        public static async Task <TradeResponse> GetTradesAsync(this LunoClient lunoClient, string pair, double?since = null)
        {
            string queryString = since.HasValue ? $"?pair={pair}&since={since}" : $"?pair={pair}";

            return(await lunoClient.GetAsync <TradeResponse>(ResourceBase, queryString));
        }
 public static async Task <Order> GetOrderAsync(this LunoClient lunoClient, string orderId)
 {
     return(await lunoClient.GetAsync <Order>(resourceUrl : ResourceBase, queryString : $"/{orderId}"));
 }
Ejemplo n.º 7
0
 public static async Task <Ticker> GetTickerAsync(this LunoClient lunoClient, string pair)
 {
     return(await lunoClient.GetAsync <Ticker>(ResourceBase, $"?pair={pair}"));
 }
Ejemplo n.º 8
0
 public static async Task <OrderBook> GetOrderBookAsync(this LunoClient lunoClient, string pair)
 {
     return(await lunoClient.GetAsync <OrderBook>(ResourceBase, $"?pair={pair}"));
 }
 public static async Task <OrdersResponse> GetOrdersAsync(this LunoClient lunoClient)
 {
     return(await lunoClient.GetAsync <OrdersResponse>(ResourceBase, queryString : string.Empty));
 }
 public static async Task <OrdersResponse> GetOrdersAsync(this LunoClient lunoClient, string currencyPair)
 {
     return(await lunoClient.GetAsync <OrdersResponse>(ResourceBase, $"pair={currencyPair}"));
 }
 public static async Task <OrdersResponse> GetOrdersAsync(this LunoClient lunoClient, OrderStates orderState)
 {
     return(await lunoClient.GetAsync <OrdersResponse>(ResourceBase, $"state={orderState}"));
 }
Ejemplo n.º 12
0
 public static async Task <PendingTransactionResponse> GetAccountPendingTransactionsAsync(this LunoClient lunoClient, string accountId)
 {
     return(await lunoClient.GetAsync <PendingTransactionResponse>($"{ResourceBase}/{accountId}/pending", null));
 }
Ejemplo n.º 13
0
 public static async Task <AccountTransactionResponse> GetAccountTransactionsAsync(this LunoClient lunoClient, string accountId, int minRow, int maxRow)
 {
     return(await lunoClient.GetAsync <AccountTransactionResponse>($"{ResourceBase}/{accountId}/transactions", $"?min_row={minRow}&max_row={maxRow}"));
 }
 public static async Task <AccountBalanceResponse> GetAccountBalancesAsync(this LunoClient lunoClient)
 {
     return(await lunoClient.GetAsync <AccountBalanceResponse>(ResourceBase, null));
 }