Closed VikasKad closed 4 years ago
Currently, Bracket orders are stop market orders which trigger at a certain price. Currently, there is no option to set stop limit order in bracket orders.
The python package doesn't have any explicit function to create bracket orders but you can do it using the base request function. Here is an example
delta_client = DeltaRestClient(....)
bracket_payload = {
"product_id": 27, // BTCUSD
"stop_loss_order": {
"order_type": "market_order",
"stop_price": "9500"
},
"take_profit_order": {
"order_type": "market_order",
"stop_price": "12991"
}
}
response = delta_client.request("POST", "orders/bracket", bracket_payload, auth=True)
response = response.json()
Here is the documentation for the bracket order endpoint https://docs.delta.exchange/#place-bracket-order
Any example to create bracket limit order with python?