跳转到主要内容
POST
getAssets
以命名参数传入 ids。结果是与 ids 顺序相同的数组。
  • 可用的方法名:getAssets、get_assets、getAssetBatch 和 get_asset_batch。
  • 每次调用最多 1,000 个 id。超出会返回 -32602 和 Batch Size Error。
  • 不是资产的 id,或供应量为零的 NFT,会在对应位置返回 null。调用本身仍然成功。
  • 显示选项放在 options 或 displayOptions 中。与 getAsset 不同,这里支持 showUnverifiedCollections。
  • 响应是一个纯数组,因此不包含 last_indexed_slot。
  • 费用:每次调用 1 积分,与 id 数量无关。计入套餐的 DAS RPS 限制。
显示选项和资产字段见 DAS API 概览。 请求配置和错误处理见 RPC 快速入门。计费见积分与限制。

授权

api_key
string
query
必填

请求体

application/json
jsonrpc
enum<string>
必填

The JSON-RPC protocol version.

可用选项:
2.0
示例:

"2.0"

id
string
必填

A unique identifier for the request.

示例:

"1"

method
enum<string>
必填

The name of the RPC method to invoke.

可用选项:
getAssets
示例:

"getAssets"

params
object
必填

Named parameters.

响应

Assets in request order.

jsonrpc
enum<string>

The JSON-RPC protocol version.

可用选项:
2.0
示例:

"2.0"

id
string

Identifier matching the request.

示例:

"1"

result
(object | null)[]

One entry per requested id, in request order. Null when the id is not an asset or its supply is zero.

A digital asset in the Metaplex DAS shape. Fields marked optional appear only for the asset types that carry them.