示例#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)));
        }
示例#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)));
        }
示例#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));
        }
示例#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)));
        }
示例#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)));
 }
示例#6
0
 public async Task <Dictionary <MarketId, Book> > GetMarketOrdersAlt(string quoteCurrencyCode)
 {
     return(VircurexParsers.ParseMarketOrdersAlt(quoteCurrencyCode,
                                                 await CallPublic <JObject>(Method.orderbook_alt, quoteCurrencyCode)));
 }
示例#7
0
 public async Task <Model.AccountInfo> GetAccountInfo()
 {
     return(VircurexParsers.ParseAccountInfo(await CallPrivate <JObject>(Method.get_balances)));
 }