Skip to main content

An unofficial API for Vanguard Invest

Project description

vanguard-api

A reverse-engineered python API to interact with the Vanguard Trading platform.

This is not an official api! This api's functionality may change at any time.

This api provides a means of buying and selling stocks through Vanguard. It uses playwright to scrape data and to interact with the website.


Contribution

I am new to coding and new to open-source. I would love any help and suggestions!

Disclaimer

I am not a financial advisor and not affiliated with Vanguard in any way. Use this tool at your own risk. I am not responsible for any losses or damages you may incur by using this project. This tool is provided as-is with no warranty.

Setup

Install using pypi:

pip install vanguard-api

This package requires playwright. After installing vanguard-api, you will need to finish the install of playwright. You can do this in most cases by running the command:

playwright install

If you would like some more information on this, you can find it here.

You will also need to install the 'requirements.txt' file in this repository. You can do this by running the command:

pip install -r requirements.txt

This installs a custom version of playwright_stealth that will work with this library.

Quickstart

Checkout test.py for a quickstart example it will:

  • Login and print account info.
  • Print out Holdings.
  • Place a dry run market order for 'INTC' on the first account in the account_numbers list
  • Print out the order confirmation

Implemented Features

  • Login
  • Login with MFA
  • Get Account Data
  • Place Market Orders
  • Get Currently Held Positions
  • Get Quotes
  • Place Limit Orders

TO DO

  • Get Order Status
  • Cancel placed orders
  • Options
  • Give me some Ideas!

If you would like to support me, you can do so here:

GitHub Sponsors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vanguard_api-0.3.2.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vanguard_api-0.3.2-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file vanguard_api-0.3.2.tar.gz.

File metadata

  • Download URL: vanguard_api-0.3.2.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for vanguard_api-0.3.2.tar.gz
Algorithm Hash digest
SHA256 c6d8221184ea8675100586d5b1b4b3263d3147ba94fee528b8374e84a66f3d4e
MD5 a365149fdbd8ed24da91c88d23864967
BLAKE2b-256 0ac95162eca67b8b953886e50a669ebe25be5c01e1fb05441fd86c36879aaecf

See more details on using hashes here.

File details

Details for the file vanguard_api-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: vanguard_api-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for vanguard_api-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5ebe8fe726fd73750a7f6f6344955b9b91efed0b15fe9f7f069a5cb57f756dac
MD5 6241b027e433855a9751d0195d821223
BLAKE2b-256 9649ab039f0febf341bc3ef2f07b7809901fd6d376424228a0ef2237104c6faf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page