Ejemplo n.º 1
0
        public static async Task <DetailedTickerResponse> QueryDetailedAsync(CurrencyType type)
        {
            var param = new Dictionary <string, object>()
            {
                { "currency_pair", type.ToCurrencyPair() }
            };

            var response = await KorbitCall.GetAsync <DetailedTickerResponse>("/v1/ticker", param);

            return(response);
        }
Ejemplo n.º 2
0
        public static async Task <WalletResponse> QueryWalletAsync(CurrencyType type)
        {
            var param = new Dictionary <string, object>()
            {
                { "currency_pair", type.ToCurrencyPair() }
            };

            var response = KorbitCall.GetAsync <WalletResponse>("v1/user/wallet", param);

            return(await response);
        }
Ejemplo n.º 3
0
        public static async Task <OrderHistoryResponse> QueryOrderHistoryAsync(CurrencyType type, TimePeriod period)
        {
            var param = new Dictionary <string, object>()
            {
                { "currency_pair", type.ToCurrencyPair() },
                { "time", period.ToPeriodString() }
            };

            var response = await KorbitCall.GetAsync <OrderHistoryResponse>("v1/transactions", param);

            return(response);
        }
Ejemplo n.º 4
0
        public static async Task <OrderbookResponse> QueryOrderbookAsync(CurrencyType type)
        {
            var param = new Dictionary <string, object>()
            {
                { "currency_pair", type.ToCurrencyPair() },
                { "category", "all" }
            };

            var response = await KorbitCall.GetAsync <OrderbookResponse>("v1/orderbook", param);

            return(response);
        }
Ejemplo n.º 5
0
        public static async Task <string> PlaceAsk(CurrencyType type, int price, double amount)
        {
            var param = new Dictionary <string, object>()
            {
                { "currency_type", type.ToCurrencyPair() },
                { "type", "limit" },
                { "price", price },
                { "coin_amount", amount }
            };

            var response = await KorbitCall.PostAsync <ExchangeResponse>("v1/user/orders/sell", param);

            return(response.status);
        }