Skip to content

Commit f7e6453

Browse files
committed
replace support for trailing stop
1 parent ecefd8c commit f7e6453

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

alpaca_trade_api/rest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ def replace_order(
332332
qty: str = None,
333333
limit_price: str = None,
334334
stop_price: str = None,
335+
trail: str = None,
335336
time_in_force: str = None,
336337
client_order_id: str = None
337338
) -> Order:
@@ -340,6 +341,7 @@ def replace_order(
340341
:param qty: str of int
341342
:param limit_price: str of float
342343
:param stop_price: str of float
344+
:param trail: str of float
343345
:param time_in_force: day, gtc, opg, cls, ioc, fok
344346
"""
345347
params = {}
@@ -349,6 +351,8 @@ def replace_order(
349351
params['limit_price'] = FLOAT(limit_price)
350352
if stop_price is not None:
351353
params['stop_price'] = FLOAT(stop_price)
354+
if trail is not None:
355+
params['trail'] = FLOAT(trail)
352356
if time_in_force is not None:
353357
params['time_in_force'] = time_in_force
354358
if client_order_id is not None:

0 commit comments

Comments
 (0)