|
|
@ -429,7 +429,7 @@ class Agora(object):
|
|
|
|
self.slow_ad_update(to_update)
|
|
|
|
self.slow_ad_update(to_update)
|
|
|
|
|
|
|
|
|
|
|
|
@handle_exceptions
|
|
|
|
@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.
|
|
|
|
Get all public ads for our listed currencies.
|
|
|
|
:return: dict of public ads keyed by currency
|
|
|
|
:return: dict of public ads keyed by currency
|
|
|
@ -444,8 +444,10 @@ class Agora(object):
|
|
|
|
if not assets:
|
|
|
|
if not assets:
|
|
|
|
assets = self.markets.get_all_assets()
|
|
|
|
assets = self.markets.get_all_assets()
|
|
|
|
# Get all currencies we have ads for, deduplicated
|
|
|
|
# Get all currencies we have ads for, deduplicated
|
|
|
|
currencies = self.markets.get_all_currencies()
|
|
|
|
if not currencies:
|
|
|
|
providers = self.markets.get_all_providers()
|
|
|
|
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
|
|
|
|
# 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)
|
|
|
|
rates = self.cg.get_price(ids=["monero", "bitcoin"], vs_currencies=currencies)
|
|
|
|