async def wrapper(): async with AsyncPymarketcap(debug=True) as apym: res = await apym._cache_symbols() assert type(res) == dict for symbol, slug in res.items(): assert type(symbol) == str assert type(slug) == str
async def wrapper(): async with AsyncPymarketcap(debug=True) as apym: properties = [ "symbols", "coins", "exchange_names", "exchange_slugs" ] for prop in properties: res = eval("apym.%s" % prop) assert type(res) == list assert len(res) > 0
async def main(): async with AsyncPymarketcap(queue_size=50, consumers=50, debug=True) as apym: async for d in apym.graphs.every_currency(['bitcoin'], start=start, end=end, use_auto_timeframe=True): pprint(d) print(d.keys())
async def graphs_currency(**kwargs): async with AsyncPymarketcap(debug=True, queue_size=50, consumers=50) as apym: currencies = [] show_msg = True async for currency in apym.graphs.every_currency(**kwargs): if show_msg: print("Testing all responses...") show_msg = False currencies.append(currency) return currencies
async def wrapper(): async with AsyncPymarketcap(**asyncparms) as apym: show_msg = True async for (currency) in apym.every_historical(): if show_msg: print("Testing all responses...") show_msg = False res.append(currency) assert_types(currency) assert_consistence(currency) assert isinstance(res, list)
async def wrapper(): async with AsyncPymarketcap(debug=True, queue_size=50, consumers=50) as apym: res = [] show_msg = True async for (currency) in apym.graphs.every_currency(): if show_msg: print("Testing all responses...") show_msg = False res.append(currency) assert_types(currency) assert type(res) == list
async def wrapper(): async with AsyncPymarketcap(**asyncparms) as apym: show_msg = True async for exc in apym.every_exchange(): if show_msg: print("Testing all responses...") show_msg = False res.append(exc) assert_types(exc) assert_consistence(exc) assert isinstance(res, list) with open(cache_file, "w") as f: f.write(json.dumps(res, ensure_ascii=False))
async def wrapper(): async with AsyncPymarketcap(debug=True, queue_size=50, consumers=50) as apym: res = [] show_msg = True async for exc in apym.every_exchange(): if show_msg: print("Testing all responses...") show_msg = False res.append(exc) assert_types(exc) assert_consistence(exc) assert type(res) == list
async def wrapper(): async with AsyncPymarketcap() as apym: res = await apym._cache_symbols() assert len(res) > 0
async def get_all_historical(): async with AsyncPymarketcap(**asyncparms) as apym: async for currency in apym.every_historical(): res.append(currency)
async def wrapper(): async with AsyncPymarketcap(**asyncparms) as apym: sync_interface = apym.sync assert isinstance(sync_interface, Pymarketcap)
async def main(): async with AsyncPymarketcap() as apym: async for currency in apym.every_currency(): print(currency)
async def wrapper(): async with AsyncPymarketcap(debug=True) as apym: sync_interface = apym.sync assert isinstance(sync_interface, Pymarketcap)
async def get_all_exchanges(): async with AsyncPymarketcap(**asyncparms) as apym: async for currency in apym.every_exchange(): res.append(currency)
async def main(): async with AsyncPymarketcap(queue_size=50, consumers=50) as apym: async for currency in apym.every_historical(): res.append(currency)