public async Task <List <Document> > ETHScanBatchOHLCV(List <long> timestamps) { try { //Table ETHtable = Table.LoadTable(AmazonDynamoDB, "ETH5MinOHLC"); Table BTCtable = Table.LoadTable(AmazonDynamoDB, "BTC1DayOHLC"); DocumentBatchGet ETHdocumentBatchGet = BTCtable.CreateBatchGet(); foreach (long timestamp in timestamps) { ETHdocumentBatchGet.AddKey(timestamp.ToString()); } await ETHdocumentBatchGet.ExecuteAsync(); return(ETHdocumentBatchGet.Results); } catch { Console.WriteLine("Error connecting to BTC 1 day indicators"); return(null); } }
public async Task <List <Document> > DynamoGetItemsAsync(Amazon.RegionEndpoint endpoint, string table, List <Primitive> hashKeys) { AmazonDynamoDBClient client = new AmazonDynamoDBClient(endpoint); Table dbTable = Table.LoadTable(client, table); DocumentBatchGet batchDocument = dbTable.CreateBatchGet(); foreach (Primitive hashKey in hashKeys) { batchDocument.AddKey(hashKey); } await batchDocument.ExecuteAsync(); return(batchDocument.Results); }