quantpylib.wrappers.eodhd
Eodhd
__init__(eod_key, **kwargs)
Initialize the Eodhd instance with the API key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
eod_key
|
str
|
API key for accessing the Eodhd API. |
required |
check_exchange_open(exchange, **kwargs)
Check if a specific exchange is open.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
exchange
|
str
|
Exchange name. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
True if the exchange is open, False otherwise. |
get_delisted_tickers_in_exchange(exchange, **kwargs)
Get the list of delisted tickers for a specific exchange.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
exchange
|
str
|
Exchange name. |
required |
Returns:
Type | Description |
---|---|
DataFrame
|
DataFrame containing the list of delisted tickers for the exchange. |
get_exchange_holidays(exchange, **kwargs)
Get the list of holidays for a specific exchange.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
exchange
|
str
|
Exchange name. |
required |
Returns:
Type | Description |
---|---|
DataFrame
|
DataFrame containing the list of holidays for the exchange. |
get_exchange_hours(exchange, **kwargs)
Get the trading hours for a specific exchange.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
exchange
|
str
|
Exchange name. |
required |
Returns:
Name | Type | Description |
---|---|---|
dict |
Trading hours for the exchange. |
get_exchange_tz(exchange, **kwargs)
Get the timezone for a specific exchange.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
exchange
|
str
|
Exchange name. |
required |
Returns:
Name | Type | Description |
---|---|---|
str |
Timezone of the exchange. |
get_supported_exchanges(**kwargs)
Get the list of supported exchanges.
Returns:
Type | Description |
---|---|
DataFrame
|
DataFrame containing the list of supported exchanges. |
get_ticker_dividends(ticker, exchange, **kwargs)
Retrieve dividend data for a ticker.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ticker
|
str
|
The ticker symbol of the asset. |
required |
exchange
|
str
|
The exchange where the asset is traded. |
required |
**kwargs
|
Additional keyword arguments. |
{}
|
Returns:
Type | Description |
---|---|
DataFrame
|
DataFrame containing dividend data for the ticker. |
get_ticker_earnings_history(ticker, exchange='US', **kwargs)
Retrieve earnings history data for a ticker.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ticker
|
str
|
The ticker symbol of the asset. |
required |
exchange
|
str
|
The exchange where the asset is traded. Defaults to "US". |
'US'
|
**kwargs
|
Additional keyword arguments. |
{}
|
Returns:
Type | Description |
---|---|
DataFrame
|
DataFrame containing earnings history data for the ticker. |
get_ticker_earnings_trend(ticker, exchange='US', **kwargs)
Retrieve earnings trend data for a ticker.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ticker
|
str
|
The ticker symbol of the asset. |
required |
exchange
|
str
|
The exchange where the asset is traded. Defaults to "US". |
'US'
|
**kwargs
|
Additional keyword arguments. |
{}
|
Returns:
Type | Description |
---|---|
DataFrame
|
DataFrame containing earnings trend data for the ticker. |
get_ticker_financials(ticker, exchange='US', **kwargs)
Retrieve financial statements data for a ticker.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ticker
|
str
|
The ticker symbol of the asset. |
required |
exchange
|
str
|
The exchange where the asset is traded. Defaults to "US". |
'US'
|
**kwargs
|
Additional keyword arguments. |
{}
|
Returns:
Name | Type | Description |
---|---|---|
dict |
Dictionary containing financial statements data for the ticker. |
get_ticker_fundamentals(ticker, exchange='US', **kwargs)
Get fundamental data for a specific ticker.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ticker
|
str
|
Ticker symbol for the asset. |
required |
exchange
|
str
|
Exchange name. Defaults to "US". |
'US'
|
**kwargs
|
Additional keyword arguments. |
{}
|
Returns:
Name | Type | Description |
---|---|---|
dict |
Fundamental data for the ticker. |
get_ticker_historical_mcap(ticker, exchange, **kwargs)
Retrieve historical market capitalization data for a ticker.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ticker
|
str
|
The ticker symbol of the asset. |
required |
exchange
|
str
|
The exchange where the asset is traded. |
required |
**kwargs
|
Additional keyword arguments. |
{}
|
Returns:
Type | Description |
---|---|
DataFrame
|
DataFrame containing historical market capitalization data for the ticker. |
get_ticker_insider_txn(ticker, exchange='US', **kwargs)
Retrieve insider transaction data for a ticker.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ticker
|
str
|
The ticker symbol of the asset. |
required |
exchange
|
str
|
The exchange where the asset is traded. Defaults to "US". |
'US'
|
**kwargs
|
Additional keyword arguments. |
{}
|
Returns:
Type | Description |
---|---|
DataFrame
|
DataFrame containing insider transaction data for the ticker. |
get_ticker_metadata(ticker, exchange='US', **kwargs)
Retrieve metadata for a ticker.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ticker
|
str
|
The ticker symbol of the asset. |
required |
exchange
|
str
|
The exchange where the asset is traded. Defaults to "US". |
'US'
|
**kwargs
|
Additional keyword arguments. |
{}
|
Returns:
Name | Type | Description |
---|---|---|
dict |
Metadata information for the ticker. |
Notes
If the exchange is "CC", the metadata will be retrieved using the 'get_ticker_fundamentals' function.
get_ticker_shares_stats(ticker, exchange='US', **kwargs)
Retrieve shares statistics for a ticker.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ticker
|
str
|
The ticker symbol of the asset. |
required |
exchange
|
str
|
The exchange where the asset is traded. Defaults to "US". |
'US'
|
**kwargs
|
Additional keyword arguments. |
{}
|
Returns:
Type | Description |
---|---|
DataFrame
|
DataFrame containing shares statistics for the ticker. |
get_ticker_splits(ticker, exchange, **kwargs)
Retrieve split data for a ticker.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ticker
|
str
|
The ticker symbol of the asset. |
required |
exchange
|
str
|
The exchange where the asset is traded. |
required |
**kwargs
|
Additional keyword arguments. |
{}
|
Returns:
Type | Description |
---|---|
DataFrame
|
DataFrame containing split data for the ticker. |
get_ticker_stat_snapshot(ticker, exchange='US', **kwargs)
Retrieve a snapshot of various statistics for a ticker.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ticker
|
str
|
The ticker symbol of the asset. |
required |
exchange
|
str
|
The exchange where the asset is traded. Defaults to "US". |
'US'
|
**kwargs
|
Additional keyword arguments. |
{}
|
Returns:
Name | Type | Description |
---|---|---|
dict |
Snapshot of various statistics for the ticker. |
get_tickers_in_exchange(exchange, **kwargs)
Get the list of tickers for a specific exchange.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
exchange
|
str
|
Exchange name. |
required |
Returns:
Type | Description |
---|---|
DataFrame
|
DataFrame containing the list of tickers for the exchange. |
get_trade_bars(ticker, start, end, granularity, granularity_multiplier, exchange='US', **kwargs)
async
Retrieve trade bars data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ticker
|
str
|
Ticker symbol for the asset. |
required |
start
|
datetime
|
Start datetime for the data retrieval. |
required |
end
|
datetime
|
End datetime for the data retrieval. |
required |
granularity
|
Period
|
Granularity of the data. |
required |
granularity_multiplier
|
int
|
Multiplier for the granularity. |
required |
exchange
|
str
|
Exchange name. Defaults to "US". |
'US'
|
**kwargs
|
Additional keyword arguments. |
{}
|
Returns:
Type | Description |
---|---|
DataFrame
|
DataFrame containing the trade bars data. |
get_trade_ticks(ticker, start, end, exchange='US', **kwargs)
Retrieve ticker ticks data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ticker
|
str
|
Ticker symbol for the asset. |
required |
start
|
datetime
|
Start datetime for the data retrieval. |
required |
end
|
datetime
|
End datetime for the data retrieval. |
required |
exchange
|
str
|
Exchange name. Defaults to "US". |
'US'
|
**kwargs
|
Additional keyword arguments. |
{}
|
Returns:
Type | Description |
---|---|
DataFrame
|
DataFrame containing the ticker ticks data. |
l1_book_subscribe(ticker, handler, endpoint, **kwargs)
async
Stream market data for a given ticker.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ticker
|
str
|
Ticker symbol for the asset. |
required |
endpoint
|
Endpoint for streaming. Valid values are: |
required | |
**kwargs
|
Additional keyword arguments. |
{}
|
l1_book_unsubscribe(ticker, endpoint, **kwargs)
async
Terminate stream for ticker data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ticker
|
str
|
Ticker symbol for the asset. |
required |
endpoint
|
Endpoint for streaming. Valid values are: |
required | |
**kwargs
|
Additional keyword arguments. |
{}
|
query_engine(query, **kwargs)
Perform a query using the Eodhd search engine.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
query
|
str
|
The query string. |
required |
**kwargs
|
Additional keyword arguments. |
{}
|
Returns:
Type | Description |
---|---|
DataFrame
|
DataFrame containing the results of the query. |