Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dydx3/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@
ORDER_TYPE_LIMIT = 'LIMIT'
ORDER_TYPE_MARKET = 'MARKET'
ORDER_TYPE_STOP = 'STOP_LIMIT'
ORDER_TYPE_STOP_MARKET = 'STOP_MARKET'
ORDER_TYPE_TRAILING_STOP = 'TRAILING_STOP'
ORDER_TYPE_TAKE_PROFIT = 'TAKE_PROFIT'
ORDER_TYPE_TAKE_PROFIT_MARKET = 'TAKE_PROFIT_MARKET'

# ------------ Order Side ------------
ORDER_SIDE_BUY = 'BUY'
Expand Down
7 changes: 7 additions & 0 deletions dydx3/modules/private.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ def create_order(
expiration=None,
expiration_epoch_seconds=None,
signature=None,
reduce_only=False,
):
'''
Post an order
Expand Down Expand Up @@ -486,11 +487,16 @@ def create_order(
"STOP",
"TRAILING_STOP",
"TAKE_PROFIT",
"STOP_MARKET",
"TAKE_PROFIT_MARKET",
]

:param post_only: required
:type post_only: bool

:param reduce_only: optional
:type reduce_only: bool

:param size: required
:type size: str

Expand Down Expand Up @@ -578,6 +584,7 @@ def create_order(
'triggerPrice': trigger_price,
'trailingPercent': trailing_percent,
'postOnly': post_only,
'reduceOnly': reduce_only,
'clientId': client_id,
'signature': order_signature,
}
Expand Down