Skip to content
Jaden Wang edited this page Aug 25, 2020 · 10 revisions

Accessing Stocks!

Getting Started

The following import will allow you to access the Stock object.

from stock_wrapper import Stock

All data is contained within this single object and is obtained on object initiation.


what in the world

The following code snippit will allow you to access the Stock Price, CEO name, and Headquarters location

Tesla = Stock("TSLA")
price = Tesla.price # a lot
ceo = Tesla.ceo # Elon Musk
hq = Tesla.address # 3500 Deer Creek Road

The following data can also be retrieved by following the Stock("TICKER").[field] method.

  • price

  • open

  • close

  • high

  • low

  • low_52_weeks

  • high_52_weeks

  • market_cap

  • shares_outstanding

  • volume

  • sector

  • industry

  • num_employees

  • hq_city

  • hq_state

  • hq_country

  • hq_zip

  • hq_address

  • website

  • logo

  • description