토큰 및 NFT (DAS)
getAssetBatch
최대 1,000개의 Solana NFT, 압축 NFT, 또는 토큰에 대한 세부 정보를 단일 효율적 배치 요청으로 검색
POST
/
getAssetBatch
curl --request POST \
--url 'https://mainnet.helius-rpc.com/?api-key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": "1",
"method": "getAssetBatch",
"params": {
"ids": [
"F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk"
]
}
}
'import requests
url = "https://mainnet.helius-rpc.com/?api-key="
payload = {
"jsonrpc": "2.0",
"id": "1",
"method": "getAssetBatch",
"params": { "ids": ["F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk"] }
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
id: '1',
method: 'getAssetBatch',
params: {ids: ['F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk']}
})
};
fetch('https://mainnet.helius-rpc.com/?api-key=', 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://mainnet.helius-rpc.com/?api-key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'id' => '1',
'method' => 'getAssetBatch',
'params' => [
'ids' => [
'F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://mainnet.helius-rpc.com/?api-key="
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getAssetBatch\",\n \"params\": {\n \"ids\": [\n \"F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://mainnet.helius-rpc.com/?api-key=")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getAssetBatch\",\n \"params\": {\n \"ids\": [\n \"F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mainnet.helius-rpc.com/?api-key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getAssetBatch\",\n \"params\": {\n \"ids\": [\n \"F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body[
{
"interface": "ProgrammableNFT",
"is_agent": true,
"agent_token": "<string>",
"asset_signer": "<string>",
"id": "F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk",
"plugins": {},
"content": {
"last_indexed_slot": 365750752,
"$schema": "https://schema.metaplex.com/nft1.0.json",
"json_uri": "https://madlads.s3.us-west-2.amazonaws.com/json/8420.json",
"files": [
{
"uri": "https://madlads.s3.us-west-2.amazonaws.com/images/8420.png",
"cdn_uri": "https://cdn.helius-rpc.com/cdn-cgi/image//https://madlads.s3.us-west-2.amazonaws.com/images/8420.png",
"mime": "image/png"
}
],
"metadata": {
"attributes": [
{
"value": "Male",
"trait_type": "Gender"
},
{
"value": "King",
"trait_type": "Type"
}
],
"description": "Fock it.",
"name": "Mad Lads #8420",
"symbol": "MAD"
}
},
"authorities": [
{
"address": "2RtGg6fsFiiF1EQzHqbd66AhW7R5bWeQGpTbv2UMkCdW",
"scopes": [
"full"
]
}
],
"compression": {
"eligible": false,
"compressed": false,
"data_hash": "",
"creator_hash": "",
"asset_hash": "",
"tree": "",
"seq": 0,
"leaf_id": 0
},
"grouping": [
{
"group_key": "collection",
"group_value": "J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w"
}
],
"royalty": {
"royalty_model": "creators",
"target": null,
"percent": 0.042,
"basis_points": 420,
"primary_sale_happened": true,
"locked": false
},
"creators": [
{
"address": "5XvhfmRjwXkGp3jHGmaKpqeerNYjkuZZBYLVQYdeVcRv",
"share": 0,
"verified": true
},
{
"address": "2RtGg6fsFiiF1EQzHqbd66AhW7R5bWeQGpTbv2UMkCdW",
"share": 100,
"verified": true
}
],
"ownership": {
"frozen": true,
"delegated": false,
"delegate": null,
"ownership_model": "single",
"owner": "4zdNGgAtFsW1cQgHqkiWyRsxaAgxrSRRynnuunxzjxue"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 254
},
"token_info": {
"symbol": "<string>",
"supply": 123,
"decimals": 123,
"token_program": "<string>",
"price_info": {
"price_per_token": 123,
"currency": "<string>"
},
"mint_authority": "<string>",
"freeze_authority": "<string>"
}
}
]{
"jsonrpc": "2.0",
"error": {
"code": -32602,
"message": "잘못된 요청 매개변수입니다."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32001,
"message": "인증 실패. API 키가 누락되었거나 잘못되었습니다."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32003,
"message": "이 리소스에 접근할 수 있는 권한이 없습니다."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32004,
"message": "배치의 하나 이상의 자산을 찾을 수 없습니다."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32029,
"message": "율이 초과되었습니다. 나중에 다시 시도하십시오."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32000,
"message": "서버에서 예상치 못한 오류가 발생했습니다."
},
"id": "1"
}요청 매개변수
array
필수
object
응답의 표시 옵션입니다.
boolean
기본값:"false"
검증되지 않은 컬렉션의 그룹 정보를 무시하지 않고 표시합니다.
boolean
기본값:"false"
컬렉션의 메타데이터를 표시합니다.
boolean
기본값:"false"
소유자가 보유한 대체 가능한 토큰을 표시합니다.
본문
application/json
응답
성공적인 응답
자산의 인터페이스입니다.
사용 가능한 옵션:
V1_NFT, V1_PRINT, LEGACY_NFT, V2_NFT, FungibleAsset, FungibleToken, Custom, Identity, Executable, ProgrammableNFT, MplCoreAsset, MplBubblegumV2, MplCoreCollection, MplCoreGroup 예시:
"ProgrammableNFT"
이 자산이 에이전트 신원을 가지고 있는지 여부입니다 (MPL Core AgentIdentity 외부 플러그인). false일 때 생략됩니다.
Agent Registry 프로그램의 Base58로 인코딩된 에이전트 토큰 민트. 등록되지 않은 경우 생략됩니다.
MPL Core의 Base58로 인코딩된 자산 서명 PDA. 해당 사항이 없을 경우 생략됩니다.
자산의 ID입니다.
예시:
"F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk"
MPL Core 플러그인, 선택적 MIP-11 groups 멤버십 포함.
자산의 콘텐츠입니다.
Show child attributes
Show child attributes
예시:
[
{
"address": "2RtGg6fsFiiF1EQzHqbd66AhW7R5bWeQGpTbv2UMkCdW",
"scopes": ["full"]
}
]
예시:
{
"eligible": false,
"compressed": false,
"data_hash": "",
"creator_hash": "",
"asset_hash": "",
"tree": "",
"seq": 0,
"leaf_id": 0
}
예시:
[
{
"group_key": "collection",
"group_value": "J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w"
}
]
예시:
{
"royalty_model": "creators",
"target": null,
"percent": 0.042,
"basis_points": 420,
"primary_sale_happened": true,
"locked": false
}
예시:
[
{
"address": "5XvhfmRjwXkGp3jHGmaKpqeerNYjkuZZBYLVQYdeVcRv",
"share": 0,
"verified": true
},
{
"address": "2RtGg6fsFiiF1EQzHqbd66AhW7R5bWeQGpTbv2UMkCdW",
"share": 100,
"verified": true
}
]
예시:
{
"frozen": true,
"delegated": false,
"delegate": null,
"ownership_model": "single",
"owner": "4zdNGgAtFsW1cQgHqkiWyRsxaAgxrSRRynnuunxzjxue"
}
예시:
{
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 254
}
특정 토큰에 대한 세부 정보입니다.
Show child attributes
Show child attributes
이 페이지가 도움이 되었나요?
⌘I
getAssetBatch
curl --request POST \
--url 'https://mainnet.helius-rpc.com/?api-key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": "1",
"method": "getAssetBatch",
"params": {
"ids": [
"F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk"
]
}
}
'import requests
url = "https://mainnet.helius-rpc.com/?api-key="
payload = {
"jsonrpc": "2.0",
"id": "1",
"method": "getAssetBatch",
"params": { "ids": ["F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk"] }
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
id: '1',
method: 'getAssetBatch',
params: {ids: ['F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk']}
})
};
fetch('https://mainnet.helius-rpc.com/?api-key=', 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://mainnet.helius-rpc.com/?api-key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'id' => '1',
'method' => 'getAssetBatch',
'params' => [
'ids' => [
'F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://mainnet.helius-rpc.com/?api-key="
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getAssetBatch\",\n \"params\": {\n \"ids\": [\n \"F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://mainnet.helius-rpc.com/?api-key=")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getAssetBatch\",\n \"params\": {\n \"ids\": [\n \"F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mainnet.helius-rpc.com/?api-key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": \"1\",\n \"method\": \"getAssetBatch\",\n \"params\": {\n \"ids\": [\n \"F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body[
{
"interface": "ProgrammableNFT",
"is_agent": true,
"agent_token": "<string>",
"asset_signer": "<string>",
"id": "F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk",
"plugins": {},
"content": {
"last_indexed_slot": 365750752,
"$schema": "https://schema.metaplex.com/nft1.0.json",
"json_uri": "https://madlads.s3.us-west-2.amazonaws.com/json/8420.json",
"files": [
{
"uri": "https://madlads.s3.us-west-2.amazonaws.com/images/8420.png",
"cdn_uri": "https://cdn.helius-rpc.com/cdn-cgi/image//https://madlads.s3.us-west-2.amazonaws.com/images/8420.png",
"mime": "image/png"
}
],
"metadata": {
"attributes": [
{
"value": "Male",
"trait_type": "Gender"
},
{
"value": "King",
"trait_type": "Type"
}
],
"description": "Fock it.",
"name": "Mad Lads #8420",
"symbol": "MAD"
}
},
"authorities": [
{
"address": "2RtGg6fsFiiF1EQzHqbd66AhW7R5bWeQGpTbv2UMkCdW",
"scopes": [
"full"
]
}
],
"compression": {
"eligible": false,
"compressed": false,
"data_hash": "",
"creator_hash": "",
"asset_hash": "",
"tree": "",
"seq": 0,
"leaf_id": 0
},
"grouping": [
{
"group_key": "collection",
"group_value": "J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w"
}
],
"royalty": {
"royalty_model": "creators",
"target": null,
"percent": 0.042,
"basis_points": 420,
"primary_sale_happened": true,
"locked": false
},
"creators": [
{
"address": "5XvhfmRjwXkGp3jHGmaKpqeerNYjkuZZBYLVQYdeVcRv",
"share": 0,
"verified": true
},
{
"address": "2RtGg6fsFiiF1EQzHqbd66AhW7R5bWeQGpTbv2UMkCdW",
"share": 100,
"verified": true
}
],
"ownership": {
"frozen": true,
"delegated": false,
"delegate": null,
"ownership_model": "single",
"owner": "4zdNGgAtFsW1cQgHqkiWyRsxaAgxrSRRynnuunxzjxue"
},
"supply": {
"print_max_supply": 0,
"print_current_supply": 0,
"edition_nonce": 254
},
"token_info": {
"symbol": "<string>",
"supply": 123,
"decimals": 123,
"token_program": "<string>",
"price_info": {
"price_per_token": 123,
"currency": "<string>"
},
"mint_authority": "<string>",
"freeze_authority": "<string>"
}
}
]{
"jsonrpc": "2.0",
"error": {
"code": -32602,
"message": "잘못된 요청 매개변수입니다."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32001,
"message": "인증 실패. API 키가 누락되었거나 잘못되었습니다."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32003,
"message": "이 리소스에 접근할 수 있는 권한이 없습니다."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32004,
"message": "배치의 하나 이상의 자산을 찾을 수 없습니다."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32029,
"message": "율이 초과되었습니다. 나중에 다시 시도하십시오."
},
"id": "1"
}{
"jsonrpc": "2.0",
"error": {
"code": -32000,
"message": "서버에서 예상치 못한 오류가 발생했습니다."
},
"id": "1"
}