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

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.

The response is of type object.