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

# enhancedGetTokensAndNFTs

> Learn how to use the enhancedGetTokensAndNFTs JSON-RPC method.

## Contextualizing `enhancedGetTokensAndNFTs`

* `enhancedGetTokensAndNFTs`, like its EVM counterpart, `getTokensAndNFTs`, retrieves a detailed list of tokens and NFTs that belong to a specific address. It takes:
  * `address` - a base58-encoded string.
  * Object, optional:
    * `parseMetadataUri` - Boolean (`false` by default).

***

## Query example

```javascript JavaScript theme={null}
const axios = require('axios');

(async () => {
    const response = await axios.post('https://rpc.particle.network/solana', {
        chainId: 103,
        jsonrpc: '2.0',
        id: 0,
        method: 'enhancedGetTokensAndNFTs',
        params: ['6XU36wCxWobLx5Rtsb58kmgAJKVYmMVqy4SHXxENAyAe', {
            parseMetadataUri: true,
        }],
    }, {
        auth: {
            username: 'Your Project Id',
            password: 'Your Project Server Key',
        }
    });

    console.log(response.data);
})();
```


## OpenAPI

````yaml openapi-solana POST /#enhancedGetTokensAndNFTs
openapi: 3.0.0
info:
  title: Particle Network Enhanced RPC Solana
  version: 1.0.0
servers:
  - url: https://rpc.particle.network/solana
security:
  - basicAuth: []
paths:
  /#enhancedGetTokensAndNFTs:
    post:
      summary: enhancedGetTokensAndNFTs
      operationId: enhancedGetTokensAndNFTs
      requestBody:
        description: Request to get tokens and NFTs for an account.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnhancedGetTokensAndNFTsRequest'
      responses:
        '200':
          description: Successful response with tokens and NFTs information.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnhancedGetTokensAndNFTsResponse'
      security:
        - basicAuth: []
components:
  schemas:
    EnhancedGetTokensAndNFTsRequest:
      allOf:
        - $ref: '#/components/schemas/RPCRequest'
        - type: object
          properties:
            method:
              enum:
                - enhancedGetTokensAndNFTs
            params:
              type: array
              description: Parameters for getting tokens and NFTs.
              items:
                oneOf:
                  - type: object
                    description: Account address details.
                    properties:
                      accountAddress:
                        type: string
                        description: Solana account address.
                        example: 6XU36wCxWobLx5Rtsb58kmgAJKVYmMVqy4SHXxENAyAe
                  - type: object
                    description: Additional options.
                    properties:
                      options:
                        type: object
                        properties:
                          parseMetadataUri:
                            type: boolean
                            description: Flag to parse metadata URI.
                            default: false
    EnhancedGetTokensAndNFTsResponse:
      allOf:
        - $ref: '#/components/schemas/RPCResponse'
        - type: object
          properties:
            result:
              type: object
              description: Tokens and NFTs details.
              properties:
                lamports:
                  type: integer
                  description: Amount of lamports in the account.
                nfts:
                  type: array
                  description: Array of NFT details.
                  items:
                    type: object
                    properties:
                      mint:
                        type: string
                        description: Mint address of the NFT.
                      address:
                        type: string
                        description: Account address of the NFT.
                      isSemiFungible:
                        type: boolean
                        description: Indicates if the NFT is semi-fungible.
                      name:
                        type: string
                        description: Name of the NFT.
                      symbol:
                        type: string
                        description: Symbol of the NFT.
                      image:
                        type: string
                        description: Image URL of the NFT.
                      sellerFeeBasisPoints:
                        type: integer
                        description: Seller fee basis points.
                      metadata:
                        type: object
                        properties:
                          key:
                            type: integer
                            description: Metadata key.
                          updateAuthority:
                            type: string
                            description: Update authority address.
                          mint:
                            type: string
                            description: Mint address.
                          data:
                            type: object
                            properties:
                              name:
                                type: string
                                description: Name of the NFT.
                              symbol:
                                type: string
                                description: Symbol of the NFT.
                              uri:
                                type: string
                                description: URI of the NFT metadata.
                              sellerFeeBasisPoints:
                                type: integer
                                description: Seller fee basis points.
                              creators:
                                type: array
                                description: Array of creator details.
                                items:
                                  type: object
                                  properties:
                                    address:
                                      type: string
                                      description: Creator address.
                                    verified:
                                      type: boolean
                                      description: Indicates if the creator is verified.
                                    share:
                                      type: integer
                                      description: Share percentage.
                              uriData:
                                type: object
                                description: Parsed URI data.
                          primarySaleHappened:
                            type: boolean
                            description: Indicates if the primary sale happened.
                          isMutable:
                            type: boolean
                            description: Indicates if the NFT is mutable.
                          editionNonce:
                            type: integer
                            description: Edition nonce.
                tokens:
                  type: array
                  description: Array of token details.
                  items:
                    type: object
                    properties:
                      decimals:
                        type: integer
                        description: Number of decimals for the token.
                      amount:
                        type: integer
                        description: Amount of tokens.
                      address:
                        type: string
                        description: Token account address.
                      mint:
                        type: string
                        description: Token mint address.
                      name:
                        type: string
                        description: Name of the token.
                      symbol:
                        type: string
                        description: Symbol of the token.
                      image:
                        type: string
                        description: Image URL of the token.
    RPCRequest:
      type: object
      required:
        - jsonrpc
        - id
        - method
        - params
        - chainId
      properties:
        jsonrpc:
          type: string
          default: '2.0'
          description: Version of the JSON-RPC protocol, should be 2.0.
          example: '2.0'
        id:
          type: integer
          default: 1
          description: The request identifier.
          example: 1
        chainId:
          type: integer
          description: The blockchain chain ID.
          example: 101
        method:
          type: string
          description: API method being called.
        params:
          type: array
          description: Parameters for the API method call.
    RPCResponse:
      type: object
      required:
        - jsonrpc
        - id
        - result
        - chainId
      properties:
        jsonrpc:
          type: string
          default: '2.0'
          description: Version of the JSON-RPC protocol, should be 2.0.
          example: '2.0'
        id:
          type: integer
          default: 1
          description: The request identifier.
          example: 1
        chainId:
          type: integer
          description: The blockchain chain ID.
          example: 101
        result:
          anyOf:
            - $ref: '#/components/schemas/AnyValue'
    AnyValue:
      anyOf:
        - type: string
        - type: number
        - type: integer
        - type: boolean
        - type: object
        - type: array
          items: {}
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````