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

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 Transaction size ($). Congressional trades are reported as a range of values, this variable is the lower bound of that 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 Transaction size ($). Congressional trades are reported as a range of values, this variable is the lower bound of that 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 Transaction size ($). Congressional trades are reported as a range of values, this variable is the lower bound of that 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 the 500 most recently announced contracts across all companies

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.

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
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

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

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

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

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

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

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

Corporate Flights

Flights by private jets registered to publicly-traded companies.

Available Methods

/historical/flights/{ticker}

Returns all flights by private jets registered to the given company.

/live/flights

Returns recent flights across all companies

Response Variables

Variable Description
Ticker Company ticker
DepartureTime Time of flight departure
depCity Flight's departure city
arvCity Flight's arrival city
Browse Data