I am relatively new to Python and Software development in general. I have made the following code, and my query at this stage is, How do I connect to CCXT library using a user defined parameter or variable? `
class Exchange:
""" docstring goes here """
def __init__(self, ex_name):
self.name = ex_name
ex_obj = getattr(ccxt, ex_name)
self.ex = ex_obj({
'enableRateLimit': True
})
print(self.ex) # just for checking connection
Exchange('binance')
How do I achieve THIS result?
exchange = ccxt.binance()
print(exchange.fetch_ticker('BTC/BUSD'))
`
How do I get to use the ccxt methods on custom/ user-defined variables or attributes.