Skip to main content

Stocksera API

This is the official API for Stocksera. Visit stocksera at https://stocksera.pythonanywhere.com.

Installation

The package can easily be installed in your terminal by entering

pip install stocksera

Usage

Import the package

import stocksera

Get data from Reddit

reddit = stocksera.Reddit()

# Get total number of mentions on wallstreetbets
df = reddit.wsb_mentions(days=1)

# Get number of mentions of a stock overtime on wallstreetbets
df = reddit.wsb_mentions(ticker="AAPL")

# Get total number of puts/calls mentions on wallstreetbets
df = reddit.wsb_options(days=1)

# Get number of puts/calls mentions of a stock overtime on wallstreetbets
df = reddit.wsb_options(ticker="AAPL")

# Get subreddit count on Reddit
df = reddit.subreddit(ticker="GME")
stock = stocksera.Stock()

# Get SEC fillings of a stock
df = stock.sec_fillings(ticker="AAPL")

# Get news and sentiment of a stock
df = stock.news_sentiment(ticker="AAPL")

# Get recent insider trading of all tickers
df = stock.insider_trading(limit=500)

# Get insider trading of a stock
df = stock.insider_trading(ticker="AAPL")

# Get recent insider trading analysis
df = stock.latest_insider_trading_summary()

# Get stocks with recent consistenly high FTD
df = stock.ftd()

# Get FTD of a stock
df = stock.ftd(ticker="AAPL")

# Get earnings calendar of stocks
df = stock.earnings_calendar()

Get government trades data

government = stocksera.Government()

# Get all senate trades
df = government.senate()

# Get senate trades of a specific person
df = government.senate(name="Thomas H Tuberville")

# Get senate trades of a specific ticker
df = government.senate(ticker="AAPL")

# Get all house trades
df = government.house()

# Get house trades of a specific person
df = government.house(name="Hon. Nancy Pelosi")

# Get house trades of a specific ticker
df = government.house(ticker="AAPL")

Get economic data

government = stocksera.Economy()

# Get reverse repo
df = government.reverse_repo()

# Get daily treasury
df = government.daily_treasury()

# Get inflation
df = government.inflation()

# Get initial jobless claims
df = government.jobless_claims()

# Get retail sales
df = government.retail_sales()

Metadata

Release files for stocksera 0.1.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stocksera 0.1.14
File Size Uploaded
stocksera-0.1.14.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for stocksera 0.1.14
File Interpreter ABI Platform
stocksera-0.1.14-py3-none-any.whl Python 3 none any Details

Total release size: 9.0 kB

Release files / stocksera-0.1.14.tar.gz

Download URL stocksera-0.1.14.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
de854572e0a4f96bdc57466183855d3d312282ef703a6b8e2d87f7751fcaea78
BLAKE2b-256 checksum
How to use checksums
546429ba115dac4028b57d4fa65157488bbcc4fcd238da3b26cc56ea198ef7fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

Release files / stocksera-0.1.14-py3-none-any.whl

Download URL stocksera-0.1.14-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a4200f7cb46a52bd3dc456251f48f99017dcc9d936188f77a040385f8d32abc6
BLAKE2b-256 checksum
How to use checksums
7eff4fe36bac87b864d835dc84a9e546a9e8214ff435e4de27a4767ef1a5224a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

Release history Release notifications | RSS feed

0.1.21

2 release files

0.1.20

2 release files

This release

0.1.14 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page