Skip to main content
POST
/
v1
/
portfolios
/
{portfolio_id}
/
orders
/
{order_id}
/
cancel
Cancel Order
curl --request POST \
  --url https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/orders/{order_id}/cancel
{
  "id": "82c879c1-84e1-44ed-a8c2-1ac239cf09ad"
}

Documentation Index

Fetch the complete documentation index at: https://docs.cloud.coinbase.com/llms.txt

Use this file to discover all available pages before exploring further.

Use the Prime SDK or CLI to test this endpoint by following the quickstart guide and running with the following examples
OrdersService ordersService = PrimeServiceFactory.cancelOrdersService(client);

CancelOrderRequest request = new CancelOrderRequest.Builder()
    .portfolioId("PORTFOLIO_ID_HERE")
    .orderId("ORDER_ID_HERE")
    .build());

CancelOrderResponse orderResponse = ordersService.cancelOrder(request);
For more information, please visit the Prime Java SDK.

Path Parameters

portfolio_id
string
required

The ID of the portfolio under which the order was placed

order_id
string
required

The order ID generated by Coinbase upon order submission

Response

200 - application/json

A successful response.

id
string

The unique UUID for the order

Example:

"82c879c1-84e1-44ed-a8c2-1ac239cf09ad"