Skip to content

Commit

Permalink
Merge branch 'main' of github.com:alexgolec/schwab-py
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgolec committed May 3, 2024
2 parents 617f298 + 60e24c5 commit 2eab7c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions schwab/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@ def extract_order_id(self, place_order_response):
return None

m = re.match(
r'https://api.schwabapi.com/trader/v1/accounts/([/w]+)/orders/(/d+)',
r'https://api.schwabapi.com/trader/v1/accounts/(\w+)/orders/(\d+)',
location)

if m is None:
return None
account_hash, order_id = m.group(1), int(m.group(2))

if str(account_hash) != str(self.account_hash):
raise AccountIdMismatchException(
raise AccountHashMismatchException(
'order request account hash != Utils.account_hash')

return order_id
2 changes: 1 addition & 1 deletion schwab/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = '0.0.0a24'
version = '0.0.0a25'

0 comments on commit 2eab7c9

Please sign in to comment.