GET
/
v1
/
portfolios
/
{portfolio_id}
/
orders
curl --request GET \
  --url https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/orders
{
  "orders": [
    {
      "id": "82c879c1-84e1-44ed-a8c2-1ac239cf09ad",
      "user_id": "42",
      "portfolio_id": "3e1fe27e-26fe-46d8-b118-c752a2ae6b47",
      "product_id": "BTC-USD",
      "side": "UNKNOWN_ORDER_SIDE",
      "client_order_id": "f69a20b1-4ac4-420e-90b5-814a12565bfa",
      "type": "UNKNOWN_ORDER_TYPE",
      "base_quantity": "50",
      "quote_value": "100",
      "limit_price": "50.12",
      "start_time": "2021-05-31T09:59:59.000Z",
      "expiry_time": "2021-05-31T10:59:59.000Z",
      "status": "UNKNOWN_ORDER_STATUS",
      "time_in_force": "UNKNOWN_TIME_IN_FORCE",
      "created_at": "2021-05-31T10:59:59.000Z",
      "filled_quantity": "100",
      "filled_value": "100",
      "average_filled_price": "50.19",
      "commission": "4.99",
      "exchange_fee": "2.50",
      "historical_pov": "2.50",
      "stop_price": "50.12",
      "net_average_filled_price": "57.68",
      "user_context": "User initiated cancellation",
      "client_product_id": "BTC-USDC"
    }
  ],
  "pagination": {
    "next_cursor": "<string>",
    "sort_direction": "DESC",
    "has_next": true
  }
}

Use the Prime SDK or CLI to test this endpoint by following the quickstart guide and running with the following examples

OrdersService ordersService = PrimeServiceFactory.createOrdersService(client);

ListOrdersRequest request = new ListOrdersRequest.Builder()
    .portfolioId("PORTFOLIO_ID_HERE")
    .build();

ListOrdersResponse response = ordersService.listOrders(request);

For more information, please visit the Prime Java SDK.

Path Parameters

portfolio_id
string
required

Portfolio ID

Query Parameters

order_statuses
enum<string>[]

List of statuses by which to filter the response

  • UNKNOWN_ORDER_STATUS: nil value
  • OPEN: The order is open but unfilled
  • FILLED: The order was filled
  • CANCELLED: The order was cancelled
  • EXPIRED: The order has expired
  • FAILED: Order submission failed
  • PENDING: The order has been sent but is not yet confirmed
product_ids
string[]

List of products by which to filter the response

order_type
enum<string>
default:UNKNOWN_ORDER_TYPE

Order type by which to filter the response

Available options:
UNKNOWN_ORDER_TYPE,
MARKET,
LIMIT,
TWAP,
BLOCK,
VWAP,
STOP_LIMIT,
RFQ
cursor
string

Cursor used for pagination (last consumed record)

limit
integer

Number of items to retrieve

sort_direction
enum<string>
default:DESC

Sorting order

Available options:
DESC,
ASC
order_side
enum<string>
default:UNKNOWN_ORDER_SIDE

An order side to filter on.

  • UNKNOWN_ORDER_SIDE: nil value
  • BUY: Buy order
  • SELL: Sell order
Available options:
UNKNOWN_ORDER_SIDE,
BUY,
SELL
start_date
string

A start date for the orders to be queried from

end_date
string

An end date for the orders to be queried from

Response

200
application/json

A successful response.

The response is of type object.