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.

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.2.3.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

vanguard_api-0.2.3-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vanguard_api-0.2.3.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for vanguard_api-0.2.3.tar.gz
Algorithm Hash digest
SHA256 bfb62220c86063929313b92288c943a2edac43252b7aa8a2313807cfa9f8efee
MD5 437b9eaf564d0117b363c01f4b3e9573
BLAKE2b-256 075b257983443b1e4d5a13d1c700c9c6bfaa9746af7b102b72a7825d6fdab7d7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vanguard_api-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for vanguard_api-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d8ded3d35f6b5a32f6b226031480fac3d27d1d731abf4fab1969641bd25fb739
MD5 24cd8a20f35d5d877e7321b256883b78
BLAKE2b-256 fc378799ff9a0439207217f03dd45cfa48c8fb776c1abe87916aea23c9e37f11

See more details on using hashes here.

Supported by

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