twelvedata / twelvedata-python

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

[Question] split query example #64

Closed Sinansi closed 1 year ago

Sinansi commented 1 year ago

I am struggling to query split dates. I keep getting errors even with simple arguments. Have you implemented the SplitsEndpoint API?

I tried the following but non is working:

resp = td.get_splits(symbol="AAPL", exchange="NASDAQ", country="US", type="Stock") TypeError: init() got an unexpected keyword argument 'type'

resp = td.get_splits("AAPL") _TypeError: getsplits() takes 1 positional argument but 2 were given

Can you give an example of a split dates query?

PS: I am on the free basic version.

midasSSS commented 1 year ago

This should work: resp = td.get_splits(symbol="AAPL", exchange="NASDAQ", country="US").as_json()