-
-
Notifications
You must be signed in to change notification settings - Fork 360
Open
Description
https://docs.cdp.coinbase.com/exchange/reference/exchangerestapi_postorders#stop-orders
Action Items:
- New enum value for
types.OrderType - Implement submitting stop order
- Update the event handling logic for the stream struct to take stop order life cycle into account.
The payload to create a stop order is not as describe in the doc.
By setting type to "stop", the API will give error response with status code 400:
{"message": "Invalid order_type stop"}Instead, you have to submit the payload as follows to create a stop order:
{
"price": "3000",
"product_id": "ETH-USD",
"size": "0.001",
"side": "sell",
"type": "limit",
"stop": "entry",
"stop_price": "2500"
}That is, the required fields in the payload for a stop order are:
typeas"limit"- Add required
stopfield ("entry"or"loss") - Add required
stop_pricefield
The life cycle for a stop order is just like normal limit order, with an extra activate event at the beginning when it is submitted:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
