Skip to content

Commit

Permalink
Fix place order
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgolec committed Apr 18, 2024
1 parent 5db6ccb commit d016c50
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions schwab/client/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
import time
import warnings

from schwab.orders.generic import OrderBuilder

from ..utils import EnumEnforcer


Expand Down Expand Up @@ -598,7 +600,7 @@ def place_order(self, account_hash, order_spec):
if isinstance(order_spec, OrderBuilder):
order_spec = order_spec.build()

path = '/v1/trader/accounts/{}/orders'.format(account_hash)
path = '/trader/v1/accounts/{}/orders'.format(account_hash)
return self._post_request(path, order_spec)

def replace_order(self, account_hash, order_id, order_spec):
Expand All @@ -617,7 +619,7 @@ def preview_order(self, account_hash, order_spec):
if isinstance(order_spec, OrderBuilder):
order_spec = order_spec.build()

path = '/v1/trader/accounts/{}/previewOrder'.format(account_hash)
path = '/trader/v1/accounts/{}/previewOrder'.format(account_hash)
return self._post_request(path, order_spec)


Expand Down

0 comments on commit d016c50

Please sign in to comment.