|
|
|
@ -429,7 +429,7 @@ class Agora(object):
|
|
|
|
|
self.slow_ad_update(to_update)
|
|
|
|
|
|
|
|
|
|
@handle_exceptions
|
|
|
|
|
def get_all_public_ads(self, assets=None):
|
|
|
|
|
def get_all_public_ads(self, assets=None, currencies=None, providers=None):
|
|
|
|
|
"""
|
|
|
|
|
Get all public ads for our listed currencies.
|
|
|
|
|
:return: dict of public ads keyed by currency
|
|
|
|
@ -444,8 +444,10 @@ class Agora(object):
|
|
|
|
|
if not assets:
|
|
|
|
|
assets = self.markets.get_all_assets()
|
|
|
|
|
# Get all currencies we have ads for, deduplicated
|
|
|
|
|
currencies = self.markets.get_all_currencies()
|
|
|
|
|
providers = self.markets.get_all_providers()
|
|
|
|
|
if not currencies:
|
|
|
|
|
currencies = self.markets.get_all_currencies()
|
|
|
|
|
if not providers:
|
|
|
|
|
providers = self.markets.get_all_providers()
|
|
|
|
|
# We want to get the ads for each of these currencies and return the result
|
|
|
|
|
|
|
|
|
|
rates = self.cg.get_price(ids=["monero", "bitcoin"], vs_currencies=currencies)
|
|
|
|
|