Esempio n. 1
0
        public async Task <Model.Book> GetMarketDepth(MarketId marketId)
        {
            VircurexMarketId vircurexMarketId = (VircurexMarketId)marketId;

            return(VircurexParsers.ParseOrderBook(await CallPublic <JObject>(Method.orderbook,
                                                                             vircurexMarketId.BaseCurrencyCode, vircurexMarketId.QuoteCurrencyCode)));
        }
Esempio n. 2
0
        public async Task <List <MarketTrade> > GetMarketTrades(MarketId marketId)
        {
            VircurexMarketId vircurexMarketId = (VircurexMarketId)marketId;

            return(VircurexParsers.ParseMarketTrades(marketId,
                                                     await CallPublic <JArray>(Method.trades,
                                                                               vircurexMarketId.BaseCurrencyCode, vircurexMarketId.QuoteCurrencyCode, null)));
        }
Esempio n. 3
0
        public async Task <List <MyTrade> > GetOrderExecutions(OrderId orderId)
        {
            VircurexOrderId vircurexOrderId = (VircurexOrderId)orderId;
            List <KeyValuePair <string, string> > parameters = new List <KeyValuePair <string, string> >()
            {
                new KeyValuePair <string, string>(PARAMETER_ORDER_ID, vircurexOrderId.Value.ToString())
            };

            JObject response = await CallPrivate <JObject>(Method.read_orderexecutions, parameters);

            return(VircurexParsers.ParseOrderExecutions(response));
        }
Esempio n. 4
0
        public async Task <List <MyOrder> > GetMyActiveOrders(OrderReleased orderReleased)
        {
            List <KeyValuePair <string, string> > parameters = new List <KeyValuePair <string, string> >()
            {
                new KeyValuePair <string, string>(PARAMETER_ORDER_RELEASED,
                                                  orderReleased == OrderReleased.Unreleased
                        ? ORDER_UNRELEASED.ToString()
                        : ORDER_RELEASED.ToString())
            };

            return(VircurexParsers.ParseMyActiveOrders(await CallPrivate <JObject>(Method.read_orders, parameters)));
        }
Esempio n. 5
0
 public async Task <List <MarketTrade> > GetMarketTrades(VircurexMarketId vircurexMarketId, VircurexOrderId since)
 {
     return(VircurexParsers.ParseMarketTrades(vircurexMarketId,
                                              await CallPublic <JArray>(Method.trades,
                                                                        vircurexMarketId.BaseCurrencyCode, vircurexMarketId.QuoteCurrencyCode, since)));
 }
Esempio n. 6
0
 public async Task <Dictionary <MarketId, Book> > GetMarketOrdersAlt(string quoteCurrencyCode)
 {
     return(VircurexParsers.ParseMarketOrdersAlt(quoteCurrencyCode,
                                                 await CallPublic <JObject>(Method.orderbook_alt, quoteCurrencyCode)));
 }
Esempio n. 7
0
 public async Task <Model.AccountInfo> GetAccountInfo()
 {
     return(VircurexParsers.ParseAccountInfo(await CallPrivate <JObject>(Method.get_balances)));
 }