Skip to content

Commit

Permalink
bump version fix order
Browse files Browse the repository at this point in the history
  • Loading branch information
maxxrk committed May 22, 2024
1 parent d7e8a87 commit de59ee1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

setuptools.setup(
name="vanguard-api",
version="0.1.1",
version="0.1.2",
author="MaxxRK",
author_email="[email protected]",
description="An unofficial API for Vanguard Invest",
long_description=long_description,
long_description_content_type="text/markdown",
license="MIT",
url="https://github.com/MaxxRK/vanguard-api",
download_url="https://github.com/MaxxRK/vanguard-api/archive/refs/tags/v0.1.1.tar.gz",
download_url="https://github.com/MaxxRK/vanguard-api/archive/refs/tags/v0.1.2.tar.gz",
keywords=["VANGUARD", "API"],
install_requires=["playwright", "playwright-stealth"],
packages=["vanguard"],
Expand Down
12 changes: 7 additions & 5 deletions vanguard/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,13 @@ def place_order(
)
return order_messages
self.session.page.wait_for_selector("//label[text()='Stop Limit']").click()

if price_type in ["LIMIT", "STOP_LIMIT"]:
self.session.page.fill("#limitPrice", str(limit_price))
if price_type in ["STOP", "STOP_LIMIT"]:
self.session.page.fill("#stopPrice", str(stop_price))
try:
if price_type in ["LIMIT", "STOP_LIMIT"]:
self.session.page.fill("#limitPrice", str(limit_price))
if price_type in ["STOP", "STOP_LIMIT"]:
self.session.page.fill("#stopPrice", str(stop_price))
except PlaywrightTimeoutError:
pass
try:
if duration == "DAY":
self.session.page.click("xpath=//label[text()='Day']")
Expand Down

0 comments on commit de59ee1

Please sign in to comment.