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:
type as "limit"
- Add required
stop field ("entry" or "loss")
- Add required
stop_price field
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:

https://docs.cdp.coinbase.com/exchange/reference/exchangerestapi_postorders#stop-orders
Action Items:
types.OrderTypeThe payload to create a stop order is not as describe in the doc.
By setting
typeto"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"stopfield ("entry"or"loss")stop_pricefieldThe life cycle for a stop order is just like normal limit order, with an extra
activateevent at the beginning when it is submitted: