> ## 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.

# Get Net Allocations by Netting ID

> Retrieve an allocation by netting ID.



## OpenAPI

````yaml GET /v1/portfolios/{portfolio_id}/allocations/net/{netting_id}
openapi: 3.0.1
info:
  title: REST API
  description: >-
    The Coinbase Prime REST API provides programmatic access to trading,
    custody, staking, market data, and account management functionality.
  version: '0.1'
servers:
  - url: https://api.prime.coinbase.com/
security: []
tags:
  - name: PrimeRESTAPI
paths:
  /v1/portfolios/{portfolio_id}/allocations/net/{netting_id}:
    get:
      tags:
        - Allocations
      summary: Get Net Allocations by Netting ID
      description: Retrieve an allocation by netting ID.
      operationId: PrimeRESTAPI_GetAllocationsByClientNettingId
      parameters:
        - name: portfolio_id
          in: path
          description: The portfolio ID of the allocation
          required: true
          schema:
            type: string
        - name: netting_id
          in: path
          description: The allocation netting ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_rest_api.GetAllocationsByClientNettingIdResponse
components:
  schemas:
    coinbase.public_rest_api.GetAllocationsByClientNettingIdResponse:
      type: object
      properties:
        allocations:
          type: array
          items:
            $ref: '#/components/schemas/coinbase.public_rest_api.Allocation'
    coinbase.public_rest_api.Allocation:
      type: object
      properties:
        root_id:
          type: string
          description: The ID that ties together an allocation and all of its legs.
        reversal_id:
          type: string
          description: >-
            The ID of the allocation if this allocation is a reversal. In this
            case, the root_id would be the original allocation ID.
        allocation_completed_at:
          type: string
          description: Time the final leg of the root allocation was completed.
          format: date-time
        user_id:
          type: string
          description: The ID of the user that created the allocation.
        product_id:
          type: string
          description: The ID of the product of the orders allocated.
        side:
          $ref: '#/components/schemas/coinbase.public_rest_api.OrderSide'
        avg_price:
          type: string
          description: Price the allocation was done at.
        base_quantity:
          type: string
          description: Amount allocated in base asset units.
        quote_value:
          type: string
          description: Amount allocated in quote asset units.
        fees_allocated:
          type: string
          description: Fees from original trade execution allocated in quote asset units.
        status:
          $ref: '#/components/schemas/coinbase.public_rest_api.AllocationStatus'
        source:
          type: string
          description: Portfolio ID of the source portfolio.
        order_ids:
          title: slice
          type: array
          description: >-
            All order IDs that were aggregated to calculate the avg_price,
            quantity to allocate in each leg. Each order_id should tie back to
            the single allocation root_id.
          items:
            type: string
        destinations:
          type: array
          description: >-
            Array of objects, each containing the leg ID, destination portfolio
            ID and amount in chosen units allocated to each portfolio: [{leg_id,
            portfolio_id, allocation_base, allocation_quote}, {leg_id,
            portfolio_id, allocation_base, allocation_quote}...]
          items:
            $ref: '#/components/schemas/coinbase.public_rest_api.DestinationAlloc'
        netting_id:
          type: string
          description: >-
            The netting ID of the allocation, not empty if the allocation was
            submitted as part of a net allocation
    coinbase.public_rest_api.OrderSide:
      title: Order side
      type: string
      description: |-
        - UNKNOWN_ORDER_SIDE: nil value
         - BUY: Buy order
         - SELL: Sell order
      enum:
        - BUY
        - SELL
    coinbase.public_rest_api.AllocationStatus:
      type: string
      default: ALLOCATION_STATUS_UNSPECIFIED
      enum:
        - ALLOCATION_STATUS_UNSPECIFIED
        - ALLOCATION_STATUS_ALLOCATION_PENDING
        - ALLOCATION_STATUS_ALLOCATION_ACCEPTED
        - ALLOCATION_STATUS_ALLOCATION_ALLOCATED
        - ALLOCATION_STATUS_ALLOCATION_REJECTED
    coinbase.public_rest_api.DestinationAlloc:
      type: object
      properties:
        leg_id:
          type: string
          description: The ID unique to each leg of an allocation.
        portfolio_id:
          type: string
          description: Portfolio ID of the source portfolio.
        allocation_base:
          type: string
          description: Amount allocated in base asset units.
        allocation_quote:
          type: string
          description: Amount allocated in quote asset units.
        fees_allocated_leg:
          type: string
          description: >-
            Pro rata fees for each leg. Adding up the fees for each leg will sum
            up to equal the total allocation level fees.

````