curl --request GET \
--url https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/allocations/{allocation_id}{
"allocation": {
"root_id": "<string>",
"reversal_id": "<string>",
"allocation_completed_at": "2023-11-07T05:31:56Z",
"user_id": "<string>",
"product_id": "<string>",
"side": "BUY",
"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>"
}
}Retrieve an allocation by allocation ID.
curl --request GET \
--url https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/allocations/{allocation_id}{
"allocation": {
"root_id": "<string>",
"reversal_id": "<string>",
"allocation_completed_at": "2023-11-07T05:31:56Z",
"user_id": "<string>",
"product_id": "<string>",
"side": "BUY",
"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>"
}
}AllocationsService allocationsService = PrimeServiceFactory.createAllocationsService(client);
GetAllocationRequest request = new GetAllocationRequest.Builder("PORTFOLIO_ID_HERE", "ALLOCATION_ID_HERE").build();
GetAllocationResponse response = allocationsService.getAllocation(request);
The portfolio ID of the allocation
The ID of the allocation
A successful response.
Show child attributes
The ID that ties together an allocation and all of its legs.
The ID of the allocation if this allocation is a reversal. In this case, the root_id would be the original allocation ID.
Time the final leg of the root allocation was completed.
The ID of the user that created the allocation.
The ID of the product of the orders allocated.
BUY, SELL Price the allocation was done at.
Amount allocated in base asset units.
Amount allocated in quote asset units.
Fees from original trade execution allocated in quote asset units.
ALLOCATION_STATUS_UNSPECIFIED, ALLOCATION_STATUS_ALLOCATION_PENDING, ALLOCATION_STATUS_ALLOCATION_ACCEPTED, ALLOCATION_STATUS_ALLOCATION_ALLOCATED, ALLOCATION_STATUS_ALLOCATION_REJECTED Portfolio ID of the source portfolio.
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.
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}...]
Show child attributes
The ID unique to each leg of an allocation.
Portfolio ID of the source portfolio.
Amount allocated in base asset units.
Amount allocated in quote asset units.
Pro rata fees for each leg. Adding up the fees for each leg will sum up to equal the total allocation level fees.
The netting ID of the allocation, not empty if the allocation was submitted as part of a net allocation
Was this page helpful?