GET
/
v1
/
portfolios
/
{portfolio_id}
/
allocations
curl --request GET \
  --url https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/allocations
{
  "allocations": [
    {
      "root_id": "<string>",
      "reversal_id": "<string>",
      "allocation_completed_at": "2023-11-07T05:31:56Z",
      "user_id": "<string>",
      "product_id": "<string>",
      "side": "UNKNOWN_ORDER_SIDE",
      "avg_price": "<string>",
      "base_quantity": "<string>",
      "quote_value": "<string>",
      "fees_allocated": "<string>",
      "status": "ALLOCATION_STATUS_UNSPECIFIED",
      "source": "<string>",
      "order_ids": [
        "<string>"
      ],
      "destinations": [
        {
          "leg_id": "<string>",
          "portfolio_id": "<string>",
          "allocation_base": "<string>",
          "allocation_quote": "<string>",
          "fees_allocated_leg": "<string>"
        }
      ],
      "netting_id": "<string>"
    }
  ],
  "pagination": {
    "next_cursor": "<string>",
    "sort_direction": "DESC",
    "has_next": true
  }
}

Path Parameters

portfolio_id
string
required

Portfolio to retrieve allocations for.

Query Parameters

product_ids
string[]

List of products by which to filter the response.

order_side
enum<string>
default:UNKNOWN_ORDER_SIDE

An order side to filter allocations on.

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

A start date for the allocations to be queried from.

end_date
string

An end date for the orders to be queried from.

cursor
string

Id to retrieve additional results strictly after

limit
integer

Number of items to retrieve

sort_direction
enum<string>
default:DESC

Sorting order: DESC or ASC

Available options:
DESC,
ASC

Response

200
application/json

A successful response.

The response is of type object.