public Task AddAssetPairPriceAsync(AssetPairPrice assetPair) { var tasks = new List <Task> { _database.HashSetAsync(RedisKeys.GetMarketProfileKey(assetPair.AssetPair), assetPair.ToHashEntries()), _database.SetAddAsync(RedisKeys.GetAssetPairsKey(), assetPair.AssetPair) }; return(Task.WhenAll(tasks)); }
private async Task <List <string> > GetAssetPairs() { var assetPairs = await _database.SetMembersAsync(RedisKeys.GetAssetPairsKey()); return(assetPairs.Select(assetPair => (string)assetPair).ToList()); }