This is the official API for Stocksera. Visit Stocksera at https://github.com/guanquann/Stocksera. Sign up for free Stocksera API at https://stocksera.pythonanywhere.com/accounts/developers.
The package can easily be installed in your terminal by entering
pip install stocksera
import stocksera
# Sign up for free Stocksera API at https://stocksera.pythonanywhere.com/accounts/developers/
client = stocksera.Client(api_key="YOUR API KEY")
data = client.wsb_mentions(days=1, ticker="AAPL")
Params | Required | Default | Description |
---|---|---|---|
days | No | 1 | number days ago |
ticker | No | stock symbol |
data = client.wsb_options(days=1)
Params | Required | Default | Description |
---|---|---|---|
days | No | 1 | number days ago |
data = client.subreddit(days=50, ticker="GME")
Params | Required | Default | Description |
---|---|---|---|
days | No | 100 | number days ago |
ticker | Yes | GME | stock symbol |
data = client.stocktwits(ticker="AAPL")
Params | Required | Default | Description |
---|---|---|---|
ticker | No | stock symbol |
data = client.sec_fillings(ticker="AAPL", date_from="2022-01-01", date_to="2022-01-31")
Params | Required | Default | Description |
---|---|---|---|
ticker | Yes | AAPL | stock symbol |
date_from | No | YYYY-MM-DD | |
date_to | No | YYYY-MM-DD |
data = client.news_sentiment(ticker="AAPL")
Params | Required | Default | Description |
---|---|---|---|
ticker | Yes | AAPL | stock symbol |
data = client.insider_trading(limit=500, ticker="AAPL", date_from="2022-01-01", date_to="2022-01-31")
Params | Required | Default | Description |
---|---|---|---|
limit | No | 500 | last n records |
ticker | No | AAPL | stock symbol |
date_from | No | YYYY-MM-DD | |
date_to | No | YYYY-MM-DD |
data = client.latest_insider_trading_summary()
data = client.short_volume(ticker="AAPL", date_from="2022-01-01", date_to="2022-01-31")
Params | Required | Default | Description |
---|---|---|---|
ticker | No | stock symbol | |
date_from | No | YYYY-MM-DD | |
date_to | No | YYYY-MM-DD |
data = client.ftd(ticker="AAPL", date_from="2022-01-01", date_to="2022-01-31")
Params | Required | Default | Description |
---|---|---|---|
ticker | No | stock symbol | |
date_from | No | YYYY-MM-DD | |
date_to | No | YYYY-MM-DD |
data = client.borrowed_shares(ticker="AAPL")
Params | Required | Default | Description |
---|---|---|---|
ticker | No | AAPL | stock symbol |
data = client.senate(ticker="AAPL", name="Thomas H Tuberville", date_from="2022-01-01", date_to="2022-01-31")
Params | Required | Default | Description |
---|---|---|---|
ticker | No | stock symbol | |
name | No | name of person | |
date_from | No | YYYY-MM-DD | |
date_to | No | YYYY-MM-DD |
data = client.house(ticker="AAPL", name="Nancy Pelosi", state="CA", date_from="2022-01-01", date_to="2022-01-31")
Params | Required | Default | Description |
---|---|---|---|
ticker | No | stock symbol | |
name | No | name of person | |
state | No | district code | |
date_from | No | YYYY-MM-DD | |
date_to | No | YYYY-MM-DD |
data = client.market_summary(market_type="snp500")
Params | Required | Default | Description |
---|---|---|---|
market_type | Yes | snp500 | snp500/nasdaq100/dia/wsb |
data = client.reverse_repo(days=100)
Params | Required | Default | Description |
---|---|---|---|
days | No | 100 | number days ago |
data = client.daily_treasury(days=100)
Params | Required | Default | Description |
---|---|---|---|
days | No | 100 | number days ago |
data = client.inflation()
data = client.jobless_claims(days=100)
Params | Required | Default | Description |
---|---|---|---|
days | No | 100 | number days ago |
data = client.retail_sales(days=100)
Params | Required | Default | Description |
---|---|---|---|
days | No | 100 | number days ago |
data = client.market_news()
data = client.trading_halts()
data = client.jim_cramer(ticker="AAPL", segment="featured", call="buy")
Params | Required | Default | Description |
---|---|---|---|
ticker | No | all | stock symbol |
segment | No | all | featured/discussed/lightning/guest |
call | No | all | buy/positive/hold/negative/sell |
data = client.short_interest()
data = client.low_float()
data = client.ipo_calendar()
data = client.earnings_calendar(date_from="2022-01-01", date_to="2022-01-31")
Params | Required | Default | Description |
---|---|---|---|
date_from | No | YYYY-MM-DD | |
date_to | No | YYYY-MM-DD |