Coinbase Prime API
cURL
curl --request GET \ --url https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}
{ "portfolio": { "id": "e8bbed13-fa33-41de-86d5-4335d8f08166", "name": "CryptoBalances", "entity_id": "2c521d6c-1cfb-4371-bf9c-5a42938d3e75", "organization_id": "4c1d4464-e53b-429f-a81d-71ae7e2e687c", "entity_name": "Sample Prime Entity" } }
Retrieve a given portfolio by its portfolio ID.
PortfoliosService portfoliosService = PrimeServiceFactory.createPortfoliosService(client); GetPortfolioByIdRequest request = new GetPortfolioByIdRequest.Builder().portfolioId("PORTFOLIO_ID_HERE").build(); GetPortfolioByIdResponse response = portfoliosService.getPortfolioById(request);
var portfoliosService = new PortfoliosService(client); var request = new GetPortfolioByIdRequest("PORTFOLIO_ID_HERE"); var response = portfoliosService.GetPortfolioById(request);
portfoliosService := portfolios.NewPortfoliosService(client) request := &portfolios.GetPortfolio{ PortfolioId: "PORTFOLIO_ID_HERE", } response, err := portfoliosService.GetPortfolio(context.Background(), request)
prime_client = PrimeClient(credentials) request = GetPortfolioRequest( portfolio_id="PORTFOLIO_ID_HERE", ) response = prime_client.get_portfolio(request)
primectl get-portfolio --help
const portfoliosService = new PortfoliosService(client); portfoliosService.getPortfolio({ portfolioId: 'PORTFOLIO_ID_HERE' }).then(async (response) => { console.log('Portfolio: ', response); })
The portfolio ID
A successful response.
Show child attributes
The unique ID of the portfolio
"e8bbed13-fa33-41de-86d5-4335d8f08166"
The name of the portfolio
"CryptoBalances"
The ID of the entity to which the portfolio is associated
"2c521d6c-1cfb-4371-bf9c-5a42938d3e75"
The ID of the organization to which the portfolio is associated
"4c1d4464-e53b-429f-a81d-71ae7e2e687c"
The name of the entity to which the portfolio is associated
"Sample Prime Entity"
Was this page helpful?