public async Task <Dictionary <string, Dictionary <string, Dictionary <string, decimal> > > > GetPriceAggregateAsync() { var priceSlugs = await _router.MakeRequest <PriceSlugs>(CryptowatchEndpoints.AggregatePrices); var returnValue = new Dictionary <string, Dictionary <string, Dictionary <string, decimal> > >(); foreach (var priceSlug in priceSlugs) { var slugParts = priceSlug.Key.Split(':'); if (!returnValue.Keys.Contains(slugParts[0])) { returnValue.Add(slugParts[0], new Dictionary <string, Dictionary <string, decimal> >()); } if (!returnValue[slugParts[0]].Keys.Contains(slugParts[1])) { returnValue[slugParts[0]].Add(slugParts[1], new Dictionary <string, decimal>()); } returnValue[slugParts[0]][slugParts[1]].Add(slugParts[2], priceSlug.Value); } return(returnValue); }
public async Task <ListingResult> GetDatabaseList(int perPage = 100, int page = 1) { var parameters = new Dictionary <string, string> { { "per_page", perPage.ToString() }, { "page", page.ToString() } }; return(await _requestRouter.MakeRequest <ListingResult>( Endpoints.Database.List, parameters)); }
public async Task <OnlyData> GetDatasetDataOnly( string databaseShortCode, string datasetShortCode) { var pathReplacements = new List <string>() { databaseShortCode, datasetShortCode }; var response = await _requestRouter.MakeRequest <OnlyDataResponse>( Endpoints.Dataset.DataOnly, null, pathReplacements); return(response.OnlyData); }
public async Task <Response> GetEntireDatatable( string databaseShortCode, string datatableShortCode, string cursor) { var pathReplacements = new List <string>() { databaseShortCode, datatableShortCode }; var parameters = new Dictionary <string, string>(); if (cursor != null) { parameters.Add("qopts.cursor_id", cursor); } return(await _requestRouter.MakeRequest <Response>( Endpoints.Datatable.GetDatatable, parameters, pathReplacements)); }
public async Task <List <PairSummary> > GetAllPairsAsync() { return(await _router.MakeRequest <List <PairSummary> >(CryptowatchEndpoints.AllPairs)); }
public async Task <List <ExchangeSummary> > GetAllExchangesAsync() { return(await _router.MakeRequest <List <ExchangeSummary> >(CryptowatchEndpoints.AllExchanges)); }
public async Task <CryptowatchSystemInfo> CheckCurrentBalanceAsync() { return(await _router.MakeRequest <CryptowatchSystemInfo>(CryptowatchEndpoints.CheckBalance)); }