Hiding client
This commit is contained in:
parent
7d82003db8
commit
9349e4e6d4
|
@ -12,9 +12,11 @@ from .. import secrets
|
|||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
# TODO: Move these into secrets!
|
||||
client = kucoin.client.Client(
|
||||
def get_client():
|
||||
assert secrets.KUCOIN_KEY, 'Missing secret: KUCOIN_KEY'
|
||||
assert secrets.KUCOIN_SECRET, 'Missing secret: KUCOIN_SECRET'
|
||||
assert secrets.KUCOIN_PASS, 'Missing secret: KUCOIN_PASS'
|
||||
return kucoin.client.Client(
|
||||
secrets.KUCOIN_KEY,
|
||||
secrets.KUCOIN_SECRET,
|
||||
secrets.KUCOIN_PASS,
|
||||
|
@ -40,5 +42,5 @@ class KucoinDepositAddresses(Scraper):
|
|||
deduplicate_ignore_columns = ['account.update_time']
|
||||
|
||||
def scrape(self) -> Iterator[Mapping[str, object]]:
|
||||
addresses = client.get_deposit_address('MPC')
|
||||
addresses = get_client().get_deposit_address('MPC')
|
||||
yield addresses_to_data_points(addresses)
|
||||
|
|
Loading…
Reference in New Issue
Block a user