List Assets
curl --request GET \
--url https://api.prime.coinbase.com/v1/entities/{entity_id}/assetsimport requests
url = "https://api.prime.coinbase.com/v1/entities/{entity_id}/assets"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.prime.coinbase.com/v1/entities/{entity_id}/assets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.prime.coinbase.com/v1/entities/{entity_id}/assets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.prime.coinbase.com/v1/entities/{entity_id}/assets"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.prime.coinbase.com/v1/entities/{entity_id}/assets")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prime.coinbase.com/v1/entities/{entity_id}/assets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"assets": [
{
"name": "Bitcoin",
"symbol": "BTC",
"decimal_precision": "8",
"trading_supported": true,
"explorer_url": "https://live.blockcypher.com/btc/",
"networks": [
{
"network": {
"id": "<string>",
"type": "<string>"
},
"name": "Ethereum",
"max_decimals": "8",
"default": true,
"trading_supported": true,
"vault_supported": true,
"prime_custody_supported": true,
"destination_tag_required": true,
"network_link": "https://live.blockcypher.com/btc/",
"network_scoped_symbol": "BASEUSDC",
"min_withdrawal_amount": "0.001",
"max_withdrawal_amount": "1000",
"min_deposit_amount": "0.001"
}
]
}
]
}Assets
List Assets
List all assets available for a given entity.
GET
/
v1
/
entities
/
{entity_id}
/
assets
List Assets
curl --request GET \
--url https://api.prime.coinbase.com/v1/entities/{entity_id}/assetsimport requests
url = "https://api.prime.coinbase.com/v1/entities/{entity_id}/assets"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.prime.coinbase.com/v1/entities/{entity_id}/assets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.prime.coinbase.com/v1/entities/{entity_id}/assets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.prime.coinbase.com/v1/entities/{entity_id}/assets"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.prime.coinbase.com/v1/entities/{entity_id}/assets")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prime.coinbase.com/v1/entities/{entity_id}/assets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"assets": [
{
"name": "Bitcoin",
"symbol": "BTC",
"decimal_precision": "8",
"trading_supported": true,
"explorer_url": "https://live.blockcypher.com/btc/",
"networks": [
{
"network": {
"id": "<string>",
"type": "<string>"
},
"name": "Ethereum",
"max_decimals": "8",
"default": true,
"trading_supported": true,
"vault_supported": true,
"prime_custody_supported": true,
"destination_tag_required": true,
"network_link": "https://live.blockcypher.com/btc/",
"network_scoped_symbol": "BASEUSDC",
"min_withdrawal_amount": "0.001",
"max_withdrawal_amount": "1000",
"min_deposit_amount": "0.001"
}
]
}
]
}Entity IDTo retrieve your entity_id, use List Portfolios.
- CLI
- TS/JS
primectl list-assets --help
const assetsService = new AssetsService(client);
assetsService.listAssets({
entityId: 'ENTITY_ID_HERE'
}).then(async (response) => {
console.log('Assets: ', response);
})
Was this page helpful?
⌘I