Skip to main content
Use the Prime SDK or CLI to test this endpoint by following the quickstart guide and running with the following examples
AllocationsService allocationsService = PrimeServiceFactory.createAllocationsService(client);

String allocationId = UUID.randomUUID().toString();
String allocationLegId = UUID.randomUUID().toString();

AllocationLeg allocationLeg = new AllocationLeg.Builder()
        .allocationLegId(allocationLegId)
        .amount("100")
        .destinationPortfolioId("DESTINATION_PORTFOLIO_ID_HERE")
        .build();

CreateAllocationRequest request = new CreateAllocationRequest.Builder()
        .sourcePortfolioId("SOURCE_PORTFOLIO_ID_HERE")
        .allocationId(allocationId)
        .allocationLegs(new AllocationLeg[]{allocationLeg})
        .productId("ETH-USD")
        .build();

CreateAllocationResponse response = allocationsService.createAllocation(request);
For more information, please visit the Prime Java SDK.