Introduction
API Reference
The Quiver API is based on REST, has resource-oriented URLs, returns JSON-encoded responses, and returns standard HTTP response codes.
The base url for the API is: https://api.quiverquant.com/beta/
Authentication
You must include a valid authentication token in the header of all queries (which can be found on your account dashboard). The account associated with the given authorization token must have access to the required tier of requested dataset, or else the query will return an error.
Examples
Using cURL to get historical Senate trades for Apple
curl -X GET "https://api.quiverquant.com/beta/historical/senatetrading/aapl"
-H "accept: application/json"
-H "X-CSRFToken: TyTJwjuEC7VV7mOqZ622haRaaUr0x0Ng4nrwSRFKQs7vdoBcJlK9qjAS69ghzhFu"
-H 'Authorization: Token {Your Authorization Token}'
Using Python to get all recent trades by U.S. Representatives
import requests
url = "https://api.quiverquant.com/beta/live/housetrading"
headers = {'accept': 'application/json',
'X-CSRFToken': 'TyTJwjuEC7VV7mOqZ622haRaaUr0x0Ng4nrwSRFKQs7vdoBcJlK9qjAS69ghzhFu',
'Authorization': 'Token {Your Authorization Token}'}
r = requests.get(url, headers=headers)
print(r.content)
Rate Limits
In additional to the limits associated with your pricing plan, there is a throttle of 100 calls per second and 1,000 calls per minute. Exceeding this rate limit will result in reponse errors until the limit resets.
Support
If you find any issues with our API or have any questions, please reach out to [email protected] for support.
Tier 1 Datasets
Congress Trading
The Stock Trading on Congressional Knowledge Act requires members of U.S. Congress to publicly file and disclose any financial transaction within 45 days of its occurrence. We download those disclosures and parse them for stock trades.
Available Methods
/historical/congresstrading/{ticker}
Returns all of the stock transactions by members of U.S. Congress involving the given ticker
/live/congresstrading
Returns the most recent transactions by members of U.S. Congress
/bulk/congresstrading
Returns the full history of transactions by members of U.S. Congress
Response Variables
Variable |
Description |
ReportDate |
Date the transaction was reported |
TransactionDate |
Date the transaction took place |
Ticker |
Ticker of shares transacted |
Representative |
Name of Congressperson who made the transaction |
House |
House of Congress that the representative belongs to |
Transaction |
Purchase or Sale |
Amount |
Lower bound of transaction size ($). Congressional trades are reported as a range of values, this variable is the lower bound of that range |
Range |
Full transaction size range |
Browse Data
Senate Trading
The Stock Trading on Congressional Knowledge Act requires U.S. Senators to publicly file and disclose any financial transaction within 45 days of its occurrence. We download those disclosures and parse them for stock trades.
Available Methods
/historical/senatetrading/{ticker}
Returns all of the stock transactions by U.S. Senators involving the given ticker
/live/senatetrading
Returns the most recent transactions by U.S. Senators
Response Variables
Variable |
Description |
Date |
Transaction date |
Ticker |
Ticker of shares transacted |
Senator |
Name of Senator who made the transaction |
Transaction |
Purchase or Sale |
Amount |
Lower bound of transaction size ($). Congressional trades are reported as a range of values, this variable is the lower bound of that range |
Range |
Full transaction size range |
Browse Data
House Trading
The Stock Trading on Congressional Knowledge Act requires U.S. Representatives to publicly file and disclose any financial transaction within 45 days of its occurrence. We download those disclosures and parse them for stock trades.
Available Methods
/historical/housetrading/{ticker}
Returns all of the stock transactions by U.S. Representatives involving the given ticker
/live/housetrading
Returns the most recent transactions by U.S. Representatives
Response Variables
Variable |
Description |
Date |
Transaction date |
Ticker |
Ticker of shares transacted |
Representative |
Name of Representative who made the transaction |
Transaction |
Purchase or Sale |
Amount |
Lower bound of transaction size ($). Congressional trades are reported as a range of values, this variable is the lower bound of that range |
Range |
Full transaction size range |
Browse Data
Government Contracts - All
USASpending.gov is the official open data source of federal spending information. Using their API, we are able to track how much money companies are awarded through government contracts. This endpoint tracks awards at a contract-level
Available Methods
/historical/govcontractsall/{ticker}
Returns historical government contracts for the given ticker
/live/govcontractsall
Returns recently announced contracts across all companies
Parameters
Parameter |
Description |
date |
Filter by announcement date (YYYYMMDD) |
page |
Set pagination offset (default is 1). Pagination is not necessary if other filters are applied. |
page_size |
Set pagination page size (default is 20000). Pagination is not necessary if other filters are applied. |
Response Variables
Variable |
Description |
Ticker |
Company ticker |
Date |
Announcement date |
Description |
Contract description |
Agency |
Awarding Agency Name |
Amount |
Total dollars obligated under the given contract |
Browse Data
Government Contracts - Quarterly
USASpending.gov is the official open data source of federal spending information. Using their API, we are able to track how much money companies are awarded through government contracts.
Available Methods
/historical/govcontracts/{ticker}
Returns historical quarterly government contracts amounts for the given ticker
/live/govcontracts
Returns last quarter's government contract amounts for all companies
Response Variables
Variable |
Description |
Ticker |
Company ticker |
Qtr |
Calendar quarter |
Year |
Year |
Amount |
Total government contract $ for ticker in given quarter |
Browse Data
Corporate Lobbying
Government lobbying spending by publicly-traded companies.
Available Methods
/historical/lobbying/{ticker}
Returns all lobbying spending instances for the given ticker.
/live/lobbying
Returns the most recent lobbying spending instances across all companies.
Parameters
Parameter |
Description |
date_to |
With the /live/lobbying method, you can see all lobbying instances in a date range using date_to and date_from. Date must be formatted as YYYYMMDD, and there is a max 30-day range for each call. |
date_from |
See date_to description. |
page |
Set pagination offset (default is 1). Pagination is not necessary if other filters are applied. |
page_size |
Set pagination page size (default is 20000). Pagination is not necessary if other filters are applied. |
Response Variables
Variable |
Description |
Ticker |
Company ticker |
Date |
Date that the lobbying spend was reported |
Client |
Full name of the lobbying client |
Issue |
Category of legislation that is being lobbied for |
SpecificIssue |
Specific piece of legislation being lobbied for |
Amount |
Size of spending instance (USD) |
Registrant |
Full name of the disclosure registrant |
Browse Data
Off-exchange
Off-exchange trading activity, sourced from FINRA
Available Methods
/historical/offexchange/{ticker}
Returns daily historical off-exchange activity for the given ticker.
/live/offexchange
Returns yesterday's off-exchange activity across all companies.
Response Variables
Variable |
Description |
Ticker |
Company ticker |
Date |
Date |
OTC_Short |
Number of shares short on the given day |
OTC_Total |
Total number of shares on the give day |
DPI |
% of shares short |
Browse Data
Tier 2 Datasets
Wikipedia Pageviews
We have mapped thousands of publicly traded companies to their respective Wikipedia articles and track how many people view their page every day.
Available Methods
/historical/wikipedia/{ticker}
Returns historical weekly Wikipedia pageviews for the given ticker
/live/wikipedia
Returns last week's Wikipedia pageview for every company
Parameters
Parameter |
Description |
date |
For the /live/wikipedia method, return all pageview counts on a given date (YYMMDD) |
Response Variables
Variable |
Description |
Ticker |
Company ticker |
Date |
Date |
Weekly Pageviews |
Total times the company's Wikipedia page was viewed in the week prior to the date |
pct_change_week |
Week-over-week % change in company's Wikipedia pageviews |
pct_change_month |
Month-over-month % change in company's Wikipedia pageviews |
Browse Data
App Ratings
This dataset tracks reviews and ratings for mobile apps published by publicly traded companies.
Available Methods
/live/appratings
Returns the last week of app ratings data
Response Variables
Variable |
Description |
Ticker |
Company ticker of app's publisher |
App |
App's title |
Created |
Initial publication date of app |
Rating |
Average rating (on a 0-5 scale) of app |
Count |
Total number of reviews of app |
Publisher |
Full name of app's publisher |
Time |
Time that this row of ratings data was scraped |
Browse Data
WallStreetBets
WallStreetBets is a community on Reddit where participants discuss stock and option trading. By parsing discussion on this forum, we can track the overall sentiment of retail investors, and which companies they're talking about.
Available Methods
/historical/wallstreetbets/{ticker}
Returns historical daily mention counts for the given ticker
/live/wallstreetbets
Returns yesterday's mention counts for all companies
Parameters
Parameter |
Description |
extra_words |
If "True", adds keywords features to response |
date_to |
With the /live/wallstreetbets method, you can see all mention counts in a date range using date_to and date_from. Date must be formatted as YYYYMMDD, and there is a max 30-day range for each call. |
date_from |
See date_to description. |
Response Variables
Variable |
Description |
Ticker |
Company ticker |
Date |
Date |
Count |
Number of ticker mentions on the date's WallStreetBets Daily Discussion thread |
Rank |
This ticker's rank on the given date (as determined by total number of mentions) |
Sentiment |
Average sentiment of all comments containing the given ticker on this date. Sentiment is calculated using VADER sentiment analysis. |
Browse Data
r/SPACs
Reddit's r/SPACs is one of the most popular public SPAC investing forums. We parsing the daily discussion this forum to track investor interest in different SPACs.
Available Methods
/historical/spacs/{ticker}
Returns historical daily mention counts for the given SPAC
/live/spacs
Returns yesterday's mention counts for all SPACs
Parameters
Parameter |
Description |
date_to |
With the /live/spacs method, you can see all mention counts in a date range using date_to and date_from. Date must be formatted as YYYYMMDD, and there is a max 30-day range for each call. |
date_from |
See date_to description. |
Response Variables
Variable |
Description |
Ticker |
SPAC ticker |
Date |
Date |
Count |
Number of ticker mentions on the date's r/SPACs Daily Discussion thread |
Browse Data
Twitter
We have mapped thousands of publicly traded companies to their respective Twitter handles, and track how many people follow them over time.
Available Methods
/historical/twitter/{ticker}
Returns historical Twitter follower counts for the given ticker
/live/twitter
Returns current Twitter follower count for all companies
Parameters
Parameter |
Description |
date |
For the /live/twitter method, return all follower counts on a given date (YYMMDD) |
Response Variables
Variable |
Description |
Ticker |
Company ticker |
Date |
Date |
Followers |
Number of followers of the company's Twitter page on the given date |
pct_change_week |
Week-over-week change in company's follower count |
pct_change_month |
Month-over-month change in company's follower count |
Browse Data
Patents
Data on U.S. patents awarded to publicly-traded companies since Jan 1, 2018
Available Methods
/historical/allpatents/{ticker}
Returns patents granted to the given ticker
/beta/live/patentdrift
Returns historical patent drift data for all tickers
/beta/live/patentmomentum
Returns historical patent momentum data for all tickers
Parameters
Parameter |
Description |
date_to |
With the /live/patentdrift and /live/patentmomentum methods, you can see all data in a date range using date_to and date_from. Date must be formatted as YYYYMMDD, and there is a max 30-day range for each call. |
date_from |
See date_to description. |
ticker |
For /live/patentdrift and /live/patentmomentum, only return data for a specific ticker. |
Response Variables
Variable |
Description |
Ticker |
Company ticker |
Date |
Date |
Claims |
The number of claims listed in the given patent |
IPC |
The patent's IPC (International Patent Classification) code |
Abstract |
The full-text of the patent's abstract |
drift |
Proprietary metric quantifying the extent of a company's recent technological changes |
momentum |
Proprietary metric quantifying the recent performance of a company's tech peers |
Browse Data
Political Beta
Correlation between a stock's daily price change and the daily change in Presidential candidate's election odds. Click here for more details.
Available Methods
/historical/politicalbeta/{ticker}
Returns historical Political Beta values for the given ticker, along with historical election odds.
/live/politicalbeta
Returns current Political Beta values for all companies
Response Variables
Variable |
Description |
Ticker |
Company ticker |
Date |
Date |
TrumpBeta |
Correlation between daily % change in Trump's election odds and daily % change in company's stock price. Companies with a higher Trump Beta are expected to do better in the event of a Trump re-election, companies with a lower Trump Beta are expected to better if Biden is elected. |
TrumpOdds |
Trump's re-election odds on this date (derived from PredictIt betting market) |
Browse Data
Institutional Holdings
Data from SEC 13-F filings on holdings by institutional investors.
Available Methods
/live/sec13f
Returns static portfolio holdings at specific filing periods
/live/sec13fchanges
Returns changes in portfolio holdings over 1 quarter
Parameters
Parameter |
Description |
ticker |
Filter by ticker |
date |
Filter by filing date (YYYYMMDD) |
period |
Filter by report period (YYYYMMDD) |
owner |
Filter by fund |
page |
Set pagination offset (default is 1). Pagination is not necessary if other filters are applied. |
page_size |
Set pagination page size (default is 20000). Pagination is not necessary if other filters are applied. |
Response Variables
Variable |
Description |
Ticker |
Company ticker |
Date |
Filing date (expressed in ms since Epoch CST) |
ReportPeriod |
Reporting period end date (expressed in ms since Epoch CST) |
Fund |
Name of the institution |
Shares |
Number of shares held by fund |
Value |
Value (USD) of fund's position |
Change |
Value (USD) of fund's purchases/sales over last quarter |
SH/PRN |
Indicates whether holdings are principal amount on debt securities |
Put/Call |
Indicates whether holdings are puts or calls |
Class |
Text description of the holdings |
Discretion |
Investment discretion held by manager |
Browse Data
ETF Holdings
Data from active positions by Exchange-Traded Funds (ETFs)
Available Methods
/live/etfholdings
Returns static portfolio holdings at most recent data update
Parameters
Parameter |
Description |
etf |
Filter by ETF |
ticker |
Filter by ticker being held |
Response Variables
Variable |
Description |
ETF Symbol |
Symbol of ETF |
Holding Name |
Name of company being held |
Holding Symbol |
Symbol of company being held |
Value ($) |
Value (USD) of fund's position |
% of ETF |
Proportional value of fund's position |
Browse Data
Insider Trading
Data from SEC Form 4 filings on insider transactions.
Available Methods
/live/insiders
Returns recent insider transactions
Parameters
Parameter |
Description |
ticker |
Filter by ticker |
date |
Filter by filing date (YYMMDD) |
page |
Set pagination offset (default is 1). Pagination is not necessary if other filters are applied. |
page_size |
Set pagination page size (default is 20000). Pagination is not necessary if other filters are applied. |
Response Variables
Variable |
Description |
Ticker |
Company ticker |
Date |
Transaction date |
Name |
Name of transactor |
AcquiredDisposedCode |
Indicates whether transaction was share acquisition or disposal |
TransactionCode |
Indicates type of transaction (see more: https://www.sec.gov/files/forms-3-4-5.pdf) |
Shares |
Number of shares transacted |
PricePerShare |
Reported price per share transacted |
SharesOwnedFollowing |
Number of shares owned by insider following transaction |
fileDate |
Time that the transaction was filed (and became publicly available) |
Browse Data