> ## Documentation Index
> Fetch the complete documentation index at: https://docs.solanatracker.io/llms.txt
> Use this file to discover all available pages before exploring further.

# getAssets DAS 方法

> 一次调用按 id 获取最多 1,000 个 Solana 数字资产，按请求顺序返回，缺失的 id 返回 null。查看 getAssets 的参数和代码示例。

以命名参数传入 `ids`。结果是与 `ids` 顺序相同的数组。

* 可用的方法名：`getAssets`、`get_assets`、`getAssetBatch` 和 `get_asset_batch`。
* 每次调用最多 1,000 个 id。超出会返回 `-32602` 和 `Batch Size Error`。
* 不是资产的 id，或供应量为零的 NFT，会在对应位置返回 `null`。调用本身仍然成功。
* 显示选项放在 `options` 或 `displayOptions` 中。与 [getAsset](https://docs.solanatracker.io/cn/solana-rpc/http/getasset.md) 不同，这里支持 `showUnverifiedCollections`。
* 响应是一个纯数组，因此不包含 `last_indexed_slot`。
* 费用：每次调用 1 积分，与 id 数量无关。计入套餐的 DAS RPS 限制。

显示选项和资产字段见 [DAS API 概览](https://docs.solanatracker.io/cn/solana-rpc/das-api.md)。

请求配置和错误处理见 [RPC 快速入门](https://docs.solanatracker.io/cn/solana-rpc/quickstart.md)。计费见[积分与限制](https://docs.solanatracker.io/cn/solana-rpc/credits-and-rate-limits.md)。


## OpenAPI

````yaml getassets post /
openapi: 3.1.0
info:
  title: Solana RPC
  version: 1.0.0
  description: Solana RPC HTTP method reference.
servers:
  - url: https://rpc-mainnet.solanatracker.io
    description: Mainnet RPC endpoint
security: []
paths:
  /:
    post:
      summary: getAssets
      description: >-
        Get up to 1,000 assets by id in one call. Returns an array in request
        order with null for ids that are not assets. Accepts `getAssets`,
        `get_assets`, `getAssetBatch` and `get_asset_batch`.
      operationId: getassets
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  allOf:
                    - type: string
                      description: The JSON-RPC protocol version.
                      enum:
                        - '2.0'
                      example: '2.0'
                id:
                  allOf:
                    - type: string
                      description: A unique identifier for the request.
                      example: '1'
                method:
                  allOf:
                    - type: string
                      description: The name of the RPC method to invoke.
                      enum:
                        - getAssets
                      example: getAssets
                params:
                  allOf:
                    - type: object
                      description: Named parameters.
                      required:
                        - ids
                      properties:
                        ids:
                          type: array
                          description: Asset ids, at most 1,000.
                          items:
                            type: string
                          maxItems: 1000
                          example:
                            - J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w
                            - 86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY
                        options:
                          type: object
                          description: >-
                            Display options. Send as `options` or
                            `displayOptions`, not both. Every flag defaults to
                            false.
                          properties:
                            showCollectionMetadata:
                              type: boolean
                              description: >-
                                Add `collection_metadata` (name, symbol, image,
                                external_url) to each grouping entry.
                              example: false
                              default: false
                            showUnverifiedCollections:
                              type: boolean
                              description: >-
                                Include unverified collection entries in
                                `grouping`, each with a `verified` flag.
                              example: false
                              default: false
                            showFungible:
                              type: boolean
                              description: Accepted; has no effect on this method.
                              example: false
                              default: false
                            showZeroBalance:
                              type: boolean
                              description: Accepted; has no effect on this method.
                              default: false
                            showInscription:
                              type: boolean
                              description: Accepted; has no effect on this method.
                              default: false
              required:
                - jsonrpc
                - id
                - method
                - params
            examples:
              basic:
                summary: Get two ids
                value:
                  jsonrpc: '2.0'
                  id: '1'
                  method: getAssets
                  params:
                    ids:
                      - J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w
                      - 86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY
      responses:
        '200':
          description: Assets in request order.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        description: The JSON-RPC protocol version.
                        enum:
                          - '2.0'
                        example: '2.0'
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                  result:
                    allOf:
                      - type: array
                        description: >-
                          One entry per requested id, in request order. Null
                          when the id is not an asset or its supply is zero.
                        items:
                          oneOf:
                            - $ref: '#/components/schemas/Asset'
                            - type: 'null'
              examples:
                assets:
                  summary: A collection NFT and a wallet address
                  value:
                    jsonrpc: '2.0'
                    id: '1'
                    result:
                      - interface: ProgrammableNFT
                        id: J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w
                        content:
                          $schema: https://schema.metaplex.com/nft1.0.json
                          json_uri: >-
                            https://madlads-collection.s3.us-west-2.amazonaws.com/_collection.json
                          files:
                            - uri: >-
                                https://madlads-collection.s3.us-west-2.amazonaws.com/_collection.png
                              mime: image/png
                              cdn_uri: >-
                                https://image.solanatracker.io/proxy?url=https%3A%2F%2Fmadlads-collection.s3.us-west-2.amazonaws.com%2F_collection.png
                          metadata:
                            name: Mad Lads
                            symbol: MAD
                            json_name: Mad Lads
                            description: Fock it.
                            attributes: []
                            token_standard: ProgrammableNonFungible
                          links:
                            image: >-
                              https://madlads-collection.s3.us-west-2.amazonaws.com/_collection.png
                            external_url: https://madlads.com
                          category: image
                        authorities:
                          - address: 2RtGg6fsFiiF1EQzHqbd66AhW7R5bWeQGpTbv2UMkCdW
                            scopes:
                              - full
                        compression:
                          eligible: false
                          compressed: false
                          data_hash: ''
                          creator_hash: ''
                          asset_hash: ''
                          tree: ''
                          seq: 0
                          leaf_id: 0
                        grouping: []
                        royalty:
                          royalty_model: creators
                          target: null
                          percent: 0.05
                          basis_points: 500
                          primary_sale_happened: false
                          locked: false
                        creators:
                          - address: 2RtGg6fsFiiF1EQzHqbd66AhW7R5bWeQGpTbv2UMkCdW
                            share: 100
                            verified: true
                        ownership:
                          frozen: true
                          delegated: false
                          delegate: null
                          ownership_model: single
                          owner: 2RtGg6fsFiiF1EQzHqbd66AhW7R5bWeQGpTbv2UMkCdW
                        supply:
                          print_max_supply: 0
                          print_current_supply: 0
                          edition_nonce: 253
                        mutable: true
                        burnt: false
                        token_info:
                          supply: 1
                          decimals: 0
                          token_program: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
                          mint_authority: 2G5CotQ6Q87yhZxKUWkwLY6Foi12Q3VFQ6KN4nTLbPSz
                          freeze_authority: 2G5CotQ6Q87yhZxKUWkwLY6Foi12Q3VFQ6KN4nTLbPSz
                      - null
        '400':
          description: Bad Request - Invalid request parameters or malformed request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        description: The JSON-RPC protocol version.
                        enum:
                          - '2.0'
                        example: '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                            description: The error code.
                            example: -32602
                          message:
                            type: string
                            description: The error message.
                          data:
                            type: object
                            description: Additional data about the error.
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32602
                      message: >-
                        Batch Size Error. Batch size should not be greater than
                        1000.
                    id: 1
        '401':
          description: Unauthorized - Invalid or missing API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        description: The JSON-RPC protocol version.
                        enum:
                          - '2.0'
                        example: '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                            description: The error code.
                            example: -32602
                          message:
                            type: string
                            description: The error message.
                          data:
                            type: object
                            description: Additional data about the error.
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32001
                      message: Unauthorized
                    id: 1
        '429':
          description: Too Many Requests - Rate limit exceeded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        description: The JSON-RPC protocol version.
                        enum:
                          - '2.0'
                        example: '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                            description: The error code.
                            example: -32602
                          message:
                            type: string
                            description: The error message.
                          data:
                            type: object
                            description: Additional data about the error.
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32005
                      message: Too many requests
                    id: 1
        '500':
          description: Internal Server Error - An error occurred on the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        description: The JSON-RPC protocol version.
                        enum:
                          - '2.0'
                        example: '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                            description: The error code.
                            example: -32602
                          message:
                            type: string
                            description: The error message.
                          data:
                            type: object
                            description: Additional data about the error.
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32603
                      message: Internal error
                    id: 1
        '503':
          description: Service Unavailable - The service is temporarily unavailable.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        description: The JSON-RPC protocol version.
                        enum:
                          - '2.0'
                        example: '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                            description: The error code.
                            example: -32602
                          message:
                            type: string
                            description: The error message.
                          data:
                            type: object
                            description: Additional data about the error.
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32002
                      message: Service unavailable
                    id: 1
        '504':
          description: Gateway Timeout - The request timed out.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        description: The JSON-RPC protocol version.
                        enum:
                          - '2.0'
                        example: '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                            description: The error code.
                            example: -32602
                          message:
                            type: string
                            description: The error message.
                          data:
                            type: object
                            description: Additional data about the error.
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32003
                      message: Gateway timeout
                    id: 1
      security:
        - ApiKeyQuery: []
components:
  schemas:
    Asset:
      type: object
      description: >-
        A digital asset in the Metaplex DAS shape. Fields marked optional appear
        only for the asset types that carry them.
      properties:
        interface:
          type: string
          description: >-
            Asset standard: `V1_NFT`, `ProgrammableNFT`, `FungibleToken`,
            `FungibleAsset`, `MplCoreAsset`, `MplCoreCollection`,
            `MplCoreGroup`, `MplBubblegumV2` or `Custom`. Bubblegum V1
            compressed NFTs report `V1_NFT`.
          enum:
            - V1_NFT
            - LEGACY_NFT
            - ProgrammableNFT
            - FungibleToken
            - FungibleAsset
            - MplCoreAsset
            - MplCoreCollection
            - MplCoreGroup
            - MplBubblegumV2
            - Custom
          example: ProgrammableNFT
        id:
          type: string
          description: >-
            Asset id: the mint for Token Metadata and Token-2022 assets, the
            asset account for Core, the derived asset id for compressed NFTs.
          example: J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w
        content:
          type: object
          description: >-
            On-chain name and symbol plus the off-chain JSON at `json_uri`.
            Until the JSON has been fetched, `files` and `links` are empty and
            only on-chain fields appear.
          properties:
            $schema:
              type: string
              description: Metadata schema URL.
              example: https://schema.metaplex.com/nft1.0.json
            json_uri:
              type: string
              description: Off-chain metadata URI from the on-chain record.
              example: >-
                https://madlads-collection.s3.us-west-2.amazonaws.com/_collection.json
            files:
              type: array
              description: >-
                Files from the JSON `image`, `animation_url` and
                `properties.files`. The image file comes first.
              items:
                type: object
                properties:
                  uri:
                    type: string
                    description: File URI as listed in the JSON.
                  mime:
                    type: string
                    description: >-
                      MIME type from the JSON, or guessed from the file
                      extension.
                    example: image/png
                  cdn_uri:
                    type: string
                    description: >-
                      Cached copy of the file served through the Solana Tracker
                      image proxy. Omitted for inline `data:` files.
            metadata:
              type: object
              description: Name, symbol and JSON fields.
              properties:
                name:
                  type: string
                  description: On-chain name.
                  example: Mad Lads
                symbol:
                  type: string
                  description: On-chain symbol.
                  example: MAD
                json_name:
                  type: string
                  description: The `name` field of the off-chain JSON, when present.
                description:
                  type: string
                  description: Description from the off-chain JSON.
                attributes:
                  type: array
                  description: Attributes array from the off-chain JSON, as published.
                  items:
                    type: object
                token_standard:
                  type: string
                  description: >-
                    Token Metadata standard, such as `NonFungible`,
                    `ProgrammableNonFungible`, `Fungible` or
                    `NonFungibleEdition`. Compressed NFTs report `NonFungible`.
            links:
              type: object
              description: >-
                `image`, `animation_url` and `external_url` from the off-chain
                JSON, when present.
            category:
              type: string
              description: '`properties.category` from the off-chain JSON, when present.'
              example: image
        authorities:
          type: array
          description: >-
            Update authority. `scopes` is `["full"]`, or `["metadata"]` for
            Token-2022 metadata-extension assets.
          items:
            type: object
            properties:
              address:
                type: string
                description: Authority address.
              scopes:
                type: array
                description: Authority scopes.
                items:
                  type: string
        compression:
          type: object
          description: >-
            Compression state. For uncompressed assets every hash and `tree` is
            an empty string and `seq`/`leaf_id` are 0.
          properties:
            eligible:
              type: boolean
              description: Always false.
            compressed:
              type: boolean
              description: Whether this is a compressed NFT.
            data_hash:
              type: string
              description: Leaf data hash.
            creator_hash:
              type: string
              description: Leaf creator hash.
            asset_hash:
              type: string
              description: Current leaf hash.
            tree:
              type: string
              description: Merkle tree address.
            seq:
              type: integer
              description: Tree sequence number of the latest change to this asset.
            leaf_id:
              type: integer
              description: Leaf index in the tree.
            collection_hash:
              type: string
              description: 'Bubblegum V2 only: collection hash.'
            asset_data_hash:
              type: string
              description: 'Bubblegum V2 only: asset data hash.'
            flags:
              type: integer
              description: 'Bubblegum V2 only: leaf flags.'
        grouping:
          type: array
          description: >-
            Collection or group membership. Verified entries only, unless
            `showUnverifiedCollections` is set on a method that honors it; then
            each entry also has `verified`.
          items:
            type: object
            properties:
              group_key:
                type: string
                description: '`collection` or `group`.'
                example: collection
              group_value:
                type: string
                description: Collection or group address.
              verified:
                type: boolean
                description: Present only with `showUnverifiedCollections`.
              collection_metadata:
                type: object
                description: >-
                  With `showCollectionMetadata`: `name`, `symbol`, `image` and
                  `external_url` from the collection's off-chain JSON.
        royalty:
          type: object
          description: Royalty settings.
          properties:
            royalty_model:
              type: string
              description: Always `creators`.
            target:
              type: 'null'
              description: Always null.
            percent:
              type: number
              description: '`basis_points` times 0.0001.'
              example: 0.05
            basis_points:
              type: integer
              description: Seller fee in basis points.
              example: 500
            primary_sale_happened:
              type: boolean
              description: Primary sale flag.
            locked:
              type: boolean
              description: Always false.
            basis_points_raw:
              type: integer
              description: >-
                Bubblegum V2 assets that inherit their collection royalty: the
                raw value 65535.
            inherited:
              type: boolean
              description: >-
                True when the royalty and creators come from the verified
                collection.
        creators:
          type: array
          description: Creators with share and verification.
          items:
            type: object
            properties:
              address:
                type: string
                description: Creator address.
              share:
                type: integer
                description: Royalty share in percent.
              verified:
                type: boolean
                description: Whether the creator signed.
        creators_raw:
          type: array
          description: >-
            Bubblegum V2 assets that inherit royalties: the creators stored on
            the leaf.
          items:
            type: object
        ownership:
          type: object
          description: Owner and delegate.
          properties:
            frozen:
              type: boolean
              description: Whether the holding token account or leaf is frozen.
            delegated:
              type: boolean
              description: Whether a delegate is set.
            delegate:
              type:
                - string
                - 'null'
              description: Delegate address, or null.
            ownership_model:
              type: string
              description: '`single` for NFTs, `token` for fungibles.'
              enum:
                - single
                - token
            owner:
              type: string
              description: >-
                Owner wallet. Empty string for fungibles in `getAsset` and when
                no holder is known.
            non_transferable:
              type: boolean
              description: 'Bubblegum V2 only: soulbound flag.'
        uses:
          type: object
          description: 'Token Metadata uses, when set: `use_method`, `remaining`, `total`.'
        supply:
          type: object
          description: >-
            Edition supply. Present for NFT interfaces, absent for fungibles and
            Core.
          properties:
            print_max_supply:
              type:
                - integer
                - 'null'
              description: Maximum prints, null when unlimited.
            print_current_supply:
              type: integer
              description: Prints minted so far.
            edition_nonce:
              type:
                - integer
                - 'null'
              description: Edition PDA bump.
            edition_number:
              type: integer
              description: 'Print editions only: edition number.'
            master_edition_mint:
              type: string
              description: 'Print editions only: mint of the master edition.'
        mutable:
          type: boolean
          description: Whether metadata can still be updated.
        burnt:
          type: boolean
          description: >-
            Whether the asset was burned. Burned compressed NFTs still resolve
            with `burnt: true`.
        mint_extensions:
          type: object
          description: >-
            Token-2022 mints: every mint extension, parsed, with snake_case
            keys.
        token_info:
          type: object
          description: Mint details for assets backed by an SPL Token or Token-2022 mint.
          properties:
            supply:
              type: integer
              description: Mint supply in base units.
            decimals:
              type: integer
              description: Mint decimals.
            token_program:
              type: string
              description: Token program of the mint.
            mint_authority:
              type: string
              description: Mint authority, when set.
            freeze_authority:
              type: string
              description: Freeze authority, when set.
            symbol:
              type: string
              description: Symbol, for fungibles and when a balance is shown.
            balance:
              type: integer
              description: >-
                With `showFungible` in an owner listing: the owner's balance in
                base units.
            associated_token_address:
              type: string
              description: >-
                With `showFungible` in an owner listing: the token account
                holding the balance.
            token_accounts:
              type: array
              description: 'With `showFungible` in an owner listing: `[{address, balance}]`.'
              items:
                type: object
            price_info:
              type: object
              description: Fungibles with a known price.
              properties:
                price_per_token:
                  type: number
                  description: USD price of one whole token.
                total_price:
                  type: number
                  description: Balance times price, when a balance is shown.
                currency:
                  type: string
                  description: Always `USDC`.
        plugins:
          type: object
          description: 'Core assets: plugins, parsed.'
        unknown_plugins:
          type: array
          description: 'Core assets: plugins this API cannot parse.'
          items:
            type: object
        mpl_core_info:
          type: object
          description: >-
            Core assets: `num_minted` and `current_size` for collections, and
            `plugins_json_version`.
        external_plugins:
          type: array
          description: 'Core assets: external plugins, parsed.'
          items:
            type: object
        unknown_external_plugins:
          type: array
          description: 'Core assets: external plugins this API cannot parse.'
          items:
            type: object
        is_agent:
          type: boolean
          description: >-
            Core assets and collections: whether the asset is registered as an
            agent.
        asset_signer:
          type: string
          description: 'Core assets: the asset signer PDA.'
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api_key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.