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_numberslist - 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:
Metadata
Release files for vanguard-api 0.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vanguard_api-0.3.3.tar.gz | 13.1 kB | Without provenance | Details for vanguard_api-0.3.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vanguard_api-0.3.3-py3-none-any.whl | Python 3 | none | any | Details for vanguard_api-0.3.3-py3-none-any.whl |
Total release size: 25.4 kB
Release files / vanguard_api-0.3.3.tar.gz
| Download URL | vanguard_api-0.3.3.tar.gz |
|---|---|
| Size | 13.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5c60d4c0eeaaea32448309d7c97a7d54356cea54abf4b69940dc7d48c17ef1cd
|
|
BLAKE2b-256 checksum How to use checksums |
41748e1b144bb8fb89c66897134eba5242ba3dd2c08b5877851c3736fa7143e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / vanguard_api-0.3.3-py3-none-any.whl
| Download URL | vanguard_api-0.3.3-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9725483e23b64c9c50cd8d7972e09b167c9f4ad1c0697c2767957dbffa4303a7
|
|
BLAKE2b-256 checksum How to use checksums |
f70f8c214dfadc75438042e3dcf1fd69e8213860832c8d3ed47d9f21ccb386ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for vanguard-api 0.3.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.