Skip to main content

Government

The Government module provides programmatic access to the same functions from the OpenBB Terminal. They provide an excellent supplement to fundamental and macroeconomic research. Please note that this module will only return data from the USA.

How to Use

Below is a list of all the commands and a brief description. There are two types of function: ticker-specific, and non-specific. Many of these tables also have a companion _chart function.

PathTypeDescription
openbb.stocks.gov.contractsTickerContracts Awarded to a Company
openbb.stocks.gov.gtradesTickerReported Trades in a Company's Stock by Members of the US Congress and Senate
openbb.stocks.gov.histcontTickerThe Quarterly Total Amount Paid to a Company by the Government
openbb.stocks.gov.lastcontractsAllThe Latest Invoices Paid by the US Treasury Department
openbb.stocks.gov.lasttradesAllThe Latest Reported Trades Made by Members of the US Congress and Senate
openbb.stocks.gov.lobbyingTickerRecorded Lobbying Efforts by a Company
openbb.stocks.gov.qtrcontractsAllRanking Companies by Total Amount Rewarded
openbb.stocks.gov.topbuysAllThe Top Buyers in Office
openbb.stocks.gov.toplobbyingAllCorporate Lobbyist Activity and the Specific Issues
openbb.stocks.gov.topsellsAllThe Top Sellers in Office

Alternatively, Python's built-in help will display the contents of the module, or specific function.

help(openbb.stocks.gov)

Examples

Import Statements

The examples below will assume that this block is included at the top of the file:

from openbb_terminal.sdk import openbb

Toplobbying

This command shows who is spending money in Washington and what their intentions are.

openbb.stocks.gov.toplobbying()
DateTickerClientAmountIssueSpecific_Issue
4952022-10-20DKNGDRAFTKINGS INC.20000Taxation/Internal Revenue CodeTax characterization of daily fantasy sports.
4962022-10-20ELVTELEVATE CREDIT SERVICE, LLC90000BankingMonitored issues concerning online lending proposals.
4972022-10-20HGVHILTON GRAND VACATIONS20000Financial Institutions/Investments/SecuritiesGENERAL DISCUSSIONS RELATED TO DEBT SERVICING
4982022-10-20SOSOUTHERN CALIFORNIA TRIBAL CHAIRMEN'S ASSOCIATION40000Indian/Native American AffairsFee to trust issues. Issues surrounding federal programs for Indian tribes.
4992022-10-20ONCSONCOSEC MEDICAL INCORPORATED0

Contracts

Get a list of contracts awarded to a company and the agency authorizing it.

openbb.stocks.gov.contracts('AMT')
DateDescriptionAgencyAmount
02022-10-16RENTAL TOWER SITEDEPARTMENT OF JUSTICE (DOJ)0
12022-10-01ANTENNA LEASE SITE 43 AMERICAN TOWERDEPARTMENT OF HOMELAND SECURITY (DHS)13699.9
22022-10-01IGF::OT::IGFDEPARTMENT OF JUSTICE (DOJ)5100
32022-10-01LEASE OF RADIO REPEATER SITEDEPARTMENT OF THE TREASURY (TREAS)9787.84
42022-10-01IGF::OT::IGF::-RECUR SERVICE FOR ANTENNA SITE J ACCOUNT LEASE AT: MARIETTA, GA (BLACKWELL SITE)DEPARTMENT OF JUSTICE (DOJ)0
52022-10-01FUNDING FOR FY 2018 THROUGH FY 2019 ANTENNA SITE AGREEMENTSDEPARTMENT OF STATE (DOS)30000

Histcont

Get the historic (from 2008) quarterly sum paid to a company by the US Treasury department.

openbb.stocks.gov.histcont('AMT')
QtrYearAmount
042021127282
132021564310
222021564645
5242008110021
5332008240877
5422008907099
5512008320620

Lobbying

Find the records of a company's lobbying efforts.

openbb.stocks.gov.lobbying('AMT')
DateTickerClientAmountIssueSpecific_Issue
02022-12-01AMTAMERICAN TOWER CORPORATION440000Trade (domestic/foreign)Issues pertaining to global trade, global development, AID and the World Bank including trade policy with India - no specific legislation.
Communications/Broadcasting/Radio/TVTelecommunication infrastructure issues including those related to the Federal Communications Commission - no specific legislation. Issues related to NTIA - including implementation of broadband funding programs in the Infrastructure Investment and Jobs Act, HR 3684. Issues related to 5G and wireless communications deployment - no specific legislation. Issues related to the definition of eligible project costs - no specific legislation. Issues pertaining to broadband deployment, including relevant provisions in the Infrastructure Investment and Jobs Act, HR 3684 and related legislation.
TelecommunicationsIssues pertaining to telecommunications tower real estate - no specific legislation. Issues related to global telecommunications policy - no specific legislation.
Taxation/Internal Revenue CodeIssues related to international and domestic tax provisions as applied to real estate investment trusts and Public Law 115-97 (Tax Cuts and Jobs Act), including H.R. 5376, the Inflation Reduction Act of 2022.

Lastcontracts

Find out who is selling ink, toner cartridges, or other seemingly mundane items, to the Federal government.

openbb.stocks.gov.lastcontracts()
DateTickerAmountDescriptionAgency
02022-12-02 00:00:00DNOW81.3CASE, FILING, TRANSFER: ITEM NAME CASE, FILING,GENERAL SERVICES ADMINISTRATION (GSA)
TRANSFER INSIDE WIDTH 8.250 INCHES INSIDE LENGTH
5.500 INCHES INSIDE DEPTH 10.75 INCHES CARD WIDTH
8.000 INCHES CARD LENGTH 5.000 INCHES CARD
CAPACITY 1,200 UNIT TYPE BOX UNIT DESIGN NON-
COLLAPSIBL
12022-12-02 00:00:00DNOW855.6CARTRIDGE,TONERGENERAL SERVICES ADMINISTRATION (GSA)
22022-12-02 00:00:00DNOW169.84TONER,HP 508X HY, LJ,YLGENERAL SERVICES ADMINISTRATION (GSA)
32022-12-02 00:00:00DNOW519.5CARTRIDGE,INKGENERAL SERVICES ADMINISTRATION (GSA)
42022-12-02 00:00:00DNOW1778.1OEM HP HY TONER, YELLOW, YLD 23KGENERAL SERVICES ADMINISTRATION (GSA)