twelvedata / twelvedata-python

Twelve Data Python Client - Financial data API & WebSocket
https://twelvedata.com
MIT License
392 stars 57 forks source link

[Bug] get_stock_exchanges_list not working #1

Closed bandor151 closed 4 years ago

bandor151 commented 4 years ago

Describe the bug it is not possible to call the function td.get_stock_exchanges_list()

To Reproduce When using td.get_stock_exchanges_list() python returns:

/usr/local/lib/python3.6/dist-packages/twelvedata/client.py in get_stock_exchanges_list(self)
     44         :rtype: StockExchangesListRequestBuilder
     45         """
---> 46         return StockExchangesListRequestBuilder(ctx=self.ctx)
     47 
     48     def get_forex_pairs_list(self):

NameError: name 'StockExchangesListRequestBuilder' is not defined

Cause of the error The reason for the error is probably because the endpoints are named differently

from .endpoints import (
    StocksListEndpoint,
    StockExchangesListEndpoint,
    ForexPairsListEndpoint,
    CryptocurrenciesListEndpoint,
    CryptocurrencyExchangesListEndpoint,
)

Further notes The same thing seems to apply for some other endpoints.

midasSSS commented 4 years ago

It's fixed on ba49f8931923f583b6a665e98c8ee7f7f45809aa