Closed bpraznik closed 2 years ago
It's a good idea but this won't work. When a new coin is listed, the returned result is a list of dicts containing multiple pairing options for a single coin, for example:
[{'symbol':'FORUSDT', 'price':0.001}, {'symbol':'FORBUSD', 'price':0.001}, {'symbol':'FORBTC', 'price':0.0000001}]
Checking for the first symbol would make it impossible to ensure that you're using your desired pairing option.
Change the get_new_coins function to return the first coin found. Since it is unlikely that more then one coin will appear in a single execution this might shave some time by not needing to loop trough all N coins. Could possibly also put this behind a operation flag.