# getAssetsByOwner_v2

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns all Solana NFTs, compressed NFTs, and (optionally) fungible tokens owned by a specific wallet address, with sorting and pagination options. Enable `options.showFungible` to include SPL tokens and `options.showNativeBalance` to include native SOL balance.


Reference: https://www.alchemy.com/docs/reference/alchemy-das-apis-for-solana-v2/solana-das-api-v2-endpoints/get-assets-by-owner-v-2

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| ownerAddress | string | Yes | The base-58 wallet address to retrieve all owned digital assets for. |
| page | integer | No | The page of results to return (1-based). |
| limit | integer | No | The maximum number of assets to return per page (up to 1000). |
| sortBy | object | No | Sorting configuration for ordering the returned assets. |
| before | string | No | The cursor for paginating backwards through the assets. |
| after | string | No | The cursor for paginating forwards through the assets. |
| options | object | No | Display and formatting options for the response. |

## Result

**Asset page** (object): A paginated list of assets owned by the specified wallet.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getAssetsByOwner_v2",
  "params": [
    "86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY",
    1,
    10,
    {
      "sortBy": "created"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "last_indexed_slot": 365750752,
    "total": 1,
    "limit": 10,
    "page": 1,
    "items": [
      {
        "interface": "V1_NFT",
        "id": "JCfTS6dmJZY4NXhjMwHqayGGHUwxp59pzcYhZrYqMBce",
        "content": {
          "$schema": "https://schema.metaplex.com/nft1.0.json",
          "json_uri": "https://www.hi-hi.vip/json/5000wif.json",
          "files": [
            {
              "uri": "https://img.hi-hi.vip/json/img/5000wif.png",
              "cdn_uri": "https://cdn.helius-rpc.com/cdn-cgi/image//https://img.hi-hi.vip/json/img/5000wif.png",
              "mime": "image/png"
            }
          ]
        },
        "authorities": [
          {
            "address": "2iVwwSHr7hGR6wxNuQM8ArQYnX6Mzy2yeFnhBGgQetRw",
            "scopes": [
              "full"
            ]
          }
        ],
        "compression": {
          "eligible": false,
          "compressed": true,
          "data_hash": "7zquDVS1VKu9HDh4WS4ray5ozLThiK6xrnFNhJtusj65",
          "creator_hash": "6v7GeYRiVML5mG1kJqi6eujN9sPB3ziCZJF4Vartj1qd",
          "asset_hash": "8gQZkgZ1L91qkNPtsiRGkRzpNcEfhBABEQr1D3wquB8H",
          "tree": "BZNn9zX1MysbSvqyGZ33Seb8bvimaiE9fxmLKwX2Euae",
          "seq": 251133,
          "leaf_id": 250758
        },
        "grouping": [
          {
            "group_key": "collection",
            "group_value": "723Vxwr6aYZHNqc8dVQVwchDHUR3cEwZA8zkejdYWKaS"
          }
        ],
        "royalty": {
          "royalty_model": "creators",
          "target": null,
          "percent": 0,
          "basis_points": 0,
          "primary_sale_happened": false,
          "locked": false
        },
        "creators": [
          {
            "address": "GVKwqsEC5YQZX4hG7Fdy6m7cJUi4DA3ezYx1CC9wkj34",
            "share": 100,
            "verified": true
          }
        ],
        "ownership": {
          "frozen": false,
          "delegated": true,
          "delegate": "GVKwqsEC5YQZX4hG7Fdy6m7cJUi4DA3ezYx1CC9wkj34",
          "ownership_model": "single",
          "owner": "86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY"
        },
        "supply": {
          "print_max_supply": 0,
          "print_current_supply": 0,
          "edition_nonce": 0
        },
        "mutable": true,
        "burnt": false
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getAssetsByOwner_v2",
  "params": [
    "86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY",
    1,
    10,
    {
      "sortBy": "created"
    },
    "string",
    "string",
    {
      "showUnverifiedCollections": false,
      "showCollectionMetadata": false,
      "showGrandTotal": false,
      "showFungible": false,
      "showNativeBalance": false,
      "showZeroBalance": false
    }
  ]
}'
```

### JavaScript

```javascript
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    jsonrpc: '2.0',
    id: 1,
    method: 'getAssetsByOwner_v2',
    params: [
      '86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY',
      1,
      10,
      {sortBy: 'created'},
      'string',
      'string',
      {
        showUnverifiedCollections: false,
        showCollectionMetadata: false,
        showGrandTotal: false,
        showFungible: false,
        showNativeBalance: false,
        showZeroBalance: false
      }
    ]
  })
};

fetch('https://solana-mainnet.g.alchemy.com/v2/docs-demo', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://solana-mainnet.g.alchemy.com/v2/docs-demo"

payload = {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getAssetsByOwner_v2",
    "params": [
        "86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY",
        1,
        10,
        { "sortBy": "created" },
        "string",
        "string",
        {
            "showUnverifiedCollections": False,
            "showCollectionMetadata": False,
            "showGrandTotal": False,
            "showFungible": False,
            "showNativeBalance": False,
            "showZeroBalance": False
        }
    ]
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

### Go

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://solana-mainnet.g.alchemy.com/v2/docs-demo"

	payload := strings.NewReader("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"getAssetsByOwner_v2\",\n  \"params\": [\n    \"86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY\",\n    1,\n    10,\n    {\n      \"sortBy\": \"created\"\n    },\n    \"string\",\n    \"string\",\n    {\n      \"showUnverifiedCollections\": false,\n      \"showCollectionMetadata\": false,\n      \"showGrandTotal\": false,\n      \"showFungible\": false,\n      \"showNativeBalance\": false,\n      \"showZeroBalance\": false\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))

}
```

### Java

```java
HttpResponse<String> response = Unirest.post("https://solana-mainnet.g.alchemy.com/v2/docs-demo")
  .header("Content-Type", "application/json")
  .body("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"getAssetsByOwner_v2\",\n  \"params\": [\n    \"86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY\",\n    1,\n    10,\n    {\n      \"sortBy\": \"created\"\n    },\n    \"string\",\n    \"string\",\n    {\n      \"showUnverifiedCollections\": false,\n      \"showCollectionMetadata\": false,\n      \"showGrandTotal\": false,\n      \"showFungible\": false,\n      \"showNativeBalance\": false,\n      \"showZeroBalance\": false\n    }\n  ]\n}")
  .asString();
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://solana-mainnet.g.alchemy.com/v2/docs-demo");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"getAssetsByOwner_v2\",\n  \"params\": [\n    \"86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY\",\n    1,\n    10,\n    {\n      \"sortBy\": \"created\"\n    },\n    \"string\",\n    \"string\",\n    {\n      \"showUnverifiedCollections\": false,\n      \"showCollectionMetadata\": false,\n      \"showGrandTotal\": false,\n      \"showFungible\": false,\n      \"showNativeBalance\": false,\n      \"showZeroBalance\": false\n    }\n  ]\n}", false);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);

```


## OpenRPC Method Specification

```yaml
name: getAssetsByOwner_v2
description: |
  Returns all Solana NFTs, compressed NFTs, and (optionally) fungible tokens owned by a specific wallet address, with sorting and pagination options. Enable `options.showFungible` to include SPL tokens and `options.showNativeBalance` to include native SOL balance.
x-compute-units: 480
x-rate-limit-cus: 200
paramStructure: by-name
params:
  - name: ownerAddress
    required: true
    description: The base-58 wallet address to retrieve all owned digital assets for.
    schema:
      type: string
  - name: page
    required: false
    description: The page of results to return (1-based).
    schema:
      type: integer
  - name: limit
    required: false
    description: The maximum number of assets to return per page (up to 1000).
    schema:
      type: integer
  - name: sortBy
    required: false
    description: Sorting configuration for ordering the returned assets.
    schema:
      title: Sort criteria
      type: object
      description: Sorting configuration for ordering the returned assets.
      properties:
        sortBy:
          type: string
          description: The criteria by which the retrieved assets will be sorted.
          enum:
            - created
            - recent_action
            - updated
            - none
        sortDirection:
          type: string
          description: The direction by which the retrieved assets will be sorted.
          enum:
            - asc
            - desc
  - name: before
    required: false
    description: The cursor for paginating backwards through the assets.
    schema:
      type: string
  - name: after
    required: false
    description: The cursor for paginating forwards through the assets.
    schema:
      type: string
  - name: options
    required: false
    description: Display and formatting options for the response.
    schema:
      title: getAssetsByOwner options
      type: object
      description: Optional display and formatting flags for `getAssetsByOwner`.
      properties:
        showUnverifiedCollections:
          type: boolean
          description: Include grouping information for unverified NFT collections.
          default: false
        showCollectionMetadata:
          type: boolean
          description: Include detailed metadata for NFT collections.
          default: false
        showGrandTotal:
          type: boolean
          description: Include the total count of all assets owned by the address (slower).
          default: false
        showFungible:
          type: boolean
          description: Include SPL tokens and fungible assets held by the wallet.
          default: false
        showNativeBalance:
          type: boolean
          description: Include native SOL balance held by the wallet.
          default: false
        showZeroBalance:
          type: boolean
          description: Include assets with zero balance in the ownership list.
          default: false
examples:
  - name: getAssetsByOwner_v2 example
    params:
      - name: ownerAddress
        value: 86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY
      - name: page
        value: 1
      - name: limit
        value: 10
      - name: sortBy
        value:
          sortBy: created
    result:
      name: Asset page
      value:
        last_indexed_slot: 365750752
        total: 1
        limit: 10
        page: 1
        items:
          - interface: V1_NFT
            id: JCfTS6dmJZY4NXhjMwHqayGGHUwxp59pzcYhZrYqMBce
            content:
              $schema: https://schema.metaplex.com/nft1.0.json
              json_uri: https://www.hi-hi.vip/json/5000wif.json
              files:
                - uri: https://img.hi-hi.vip/json/img/5000wif.png
                  cdn_uri: https://cdn.helius-rpc.com/cdn-cgi/image//https://img.hi-hi.vip/json/img/5000wif.png
                  mime: image/png
            authorities:
              - address: 2iVwwSHr7hGR6wxNuQM8ArQYnX6Mzy2yeFnhBGgQetRw
                scopes:
                  - full
            compression:
              eligible: false
              compressed: true
              data_hash: 7zquDVS1VKu9HDh4WS4ray5ozLThiK6xrnFNhJtusj65
              creator_hash: 6v7GeYRiVML5mG1kJqi6eujN9sPB3ziCZJF4Vartj1qd
              asset_hash: 8gQZkgZ1L91qkNPtsiRGkRzpNcEfhBABEQr1D3wquB8H
              tree: BZNn9zX1MysbSvqyGZ33Seb8bvimaiE9fxmLKwX2Euae
              seq: 251133
              leaf_id: 250758
            grouping:
              - group_key: collection
                group_value: 723Vxwr6aYZHNqc8dVQVwchDHUR3cEwZA8zkejdYWKaS
            royalty:
              royalty_model: creators
              target: null
              percent: 0
              basis_points: 0
              primary_sale_happened: false
              locked: false
            creators:
              - address: GVKwqsEC5YQZX4hG7Fdy6m7cJUi4DA3ezYx1CC9wkj34
                share: 100
                verified: true
            ownership:
              frozen: false
              delegated: true
              delegate: GVKwqsEC5YQZX4hG7Fdy6m7cJUi4DA3ezYx1CC9wkj34
              ownership_model: single
              owner: 86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY
            supply:
              print_max_supply: 0
              print_current_supply: 0
              edition_nonce: 0
            mutable: true
            burnt: false
result:
  name: Asset page
  description: A paginated list of assets owned by the specified wallet.
  schema:
    title: Asset page
    type: object
    description: |
      A paginated page of assets. Returned by list-style methods: `getAssetsByAuthority`, `getAssetsByCreator`, `getAssetsByGroup`, `getAssetsByOwner`.
    properties:
      last_indexed_slot:
        type: integer
        description: All on-chain data up to and including this slot is guaranteed to have been indexed.
      total:
        type: integer
        description: The total number of assets found.
      limit:
        type: integer
        description: The maximum number of assets requested.
      page:
        type: integer
        description: The current page of results.
      items:
        type: array
        items:
          title: Asset
          type: object
          description: A DAS v2 digital asset entry.
          properties:
            last_indexed_slot:
              type: integer
              description: All on-chain data up to and including this slot is guaranteed to have been indexed.
            interface:
              title: Asset interface
              type: string
              description: |
                The interface type of the Solana digital asset, indicating its token standard and implementation. v2 adds MPL Core interfaces (`MplCoreAsset`, `MplCoreCollection`, `MplCoreGroup`) and `MplBubblegumV2` for the newer Bubblegum V2 compressed-NFT program.
              enum:
                - V1_NFT
                - V1_PRINT
                - LEGACY_NFT
                - V2_NFT
                - FungibleAsset
                - FungibleToken
                - Custom
                - Identity
                - Executable
                - ProgrammableNFT
                - MplCoreAsset
                - MplBubblegumV2
                - MplCoreCollection
                - MplCoreGroup
            is_agent:
              type: boolean
              description: |
                Whether this asset has an Agent Identity. Only true for MPL Core assets that use the AgentIdentity external plugin adapter. Defaults to false and is omitted from the response when false.
            agent_token:
              type: string
              description: Base58-encoded mint address of the agent token from the Agent Registry program. Omitted when the asset has no corresponding registry entry.
            asset_signer:
              type: string
              description: Base58-encoded PDA used for signing on behalf of the asset. Omitted when not applicable.
            id:
              type: string
              description: The unique identifier of the asset.
            content:
              title: Asset content
              type: object
              description: Content and off-chain metadata for the asset.
              properties:
                $schema:
                  type: string
                  description: The schema URL for the asset metadata.
                json_uri:
                  type: string
                  description: URI pointing to the JSON metadata, typically hosted on Arweave or other decentralized storage.
                files:
                  type: array
                  description: Files associated with the asset (images, videos, etc.).
                  items:
                    type: object
                    properties:
                      uri:
                        type: string
                      cdn_uri:
                        type: string
                      mime:
                        type: string
                metadata:
                  type: object
                  description: Complete metadata for the asset.
                  properties:
                    name:
                      type: string
                    symbol:
                      type: string
                    description:
                      type: string
                    token_standard:
                      type: string
                    attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          trait_type:
                            type: string
                          value:
                            type: string
                links:
                  type: object
                  description: External links related to the asset.
            authorities:
              type: array
              items:
                title: Asset authority
                type: object
                description: An update-authority entry for the asset.
                properties:
                  address:
                    type: string
                    description: The authority's address.
                  scopes:
                    type: array
                    description: The scopes of authority.
                    items:
                      type: string
            compression:
              title: Asset compression
              type: object
              description: State-compression details for the asset.
              properties:
                eligible:
                  type: boolean
                  description: Whether the asset is eligible for compression.
                compressed:
                  type: boolean
                  description: Whether the asset is currently compressed using Solana's state compression.
                data_hash:
                  type: string
                  description: Hash of the asset data.
                creator_hash:
                  type: string
                  description: Hash of the creator data.
                asset_hash:
                  type: string
                  description: Hash of the entire asset.
                tree:
                  type: string
                  description: Merkle tree address.
                seq:
                  type: integer
                  description: Sequence number.
                leaf_id:
                  type: integer
                  description: Leaf identifier in the merkle tree.
            grouping:
              type: array
              items:
                title: Asset grouping
                type: object
                description: A grouping entry (for example, a collection membership).
                properties:
                  group_key:
                    type: string
                    description: The key identifying the group (e.g., `collection`).
                  group_value:
                    type: string
                    description: The value associated with the group.
            royalty:
              title: Asset royalty
              type: object
              description: Royalty configuration for marketplace sales.
              properties:
                royalty_model:
                  type: string
                  description: The model used for royalties.
                target:
                  oneOf:
                    - type: string
                    - type: 'null'
                  description: The target address for royalties (nullable).
                percent:
                  type: number
                  description: Royalty percentage.
                basis_points:
                  type: integer
                  description: Royalty basis points.
                primary_sale_happened:
                  type: boolean
                  description: Whether the primary sale has occurred.
                locked:
                  type: boolean
                  description: Whether the royalty is locked.
            creators:
              type: array
              items:
                title: Asset creator
                type: object
                description: A creator entry for the asset.
                properties:
                  address:
                    type: string
                    description: The creator's address.
                  share:
                    type: integer
                    description: The creator's share percentage.
                  verified:
                    type: boolean
                    description: Whether the creator is verified.
            ownership:
              title: Asset ownership
              type: object
              description: Current ownership details for the asset.
              required:
                - frozen
                - delegated
                - ownership_model
                - owner
              properties:
                frozen:
                  type: boolean
                  description: Whether the asset is frozen.
                delegated:
                  type: boolean
                  description: Whether the asset is delegated.
                delegate:
                  oneOf:
                    - type: string
                    - type: 'null'
                  description: The delegate's address if delegated (nullable).
                ownership_model:
                  type: string
                  description: The model of ownership.
                owner:
                  type: string
                  description: The owner's address.
            supply:
              oneOf:
                - title: Asset supply
                  type: object
                  description: Supply information for editioned assets.
                  properties:
                    print_max_supply:
                      type: integer
                      description: Maximum supply that can be printed.
                    print_current_supply:
                      type: integer
                      description: Current printed supply.
                    edition_nonce:
                      type: integer
                      description: Edition nonce.
                - type: 'null'
            mutable:
              type: boolean
              description: Whether the asset is mutable.
            burnt:
              type: boolean
              description: Whether the asset has been burnt.
            token_info:
              title: Token info
              type: object
              description: Token-specific information, including cached price data for the top 10k tokens by 24h volume.
              properties:
                supply:
                  type: integer
                  description: Total token supply.
                decimals:
                  type: integer
                  description: Number of decimals.
                token_program:
                  type: string
                  description: Token program ID.
                mint_authority:
                  type: string
                  description: Mint authority address.
                freeze_authority:
                  type: string
                  description: Freeze authority address.
                symbol:
                  type: string
                  description: The symbol of the token.
                price_info:
                  type: object
                  description: Cached price information for the token (up to 600 seconds old).
                  properties:
                    price_per_token:
                      type: number
                      description: The price per individual token.
                    currency:
                      type: string
                      description: The currency in which the token's price is denoted.
            plugins:
              title: MPL Core plugins
              type: object
              description: MPL Core plugin payload. May include a `groups` plugin (MIP-11) on assets and collections.
              additionalProperties: true
              properties:
                groups:
                  type: object
                  description: MIP-11 Groups plugin with membership metadata.
                  properties:
                    authority:
                      type: object
                      description: Plugin authority (for example, `UpdateAuthority`).
                      additionalProperties: true
                    data:
                      type: object
                      properties:
                        groups:
                          type: array
                          description: Group memberships for this asset or collection.
                          items:
                            type: object
                            properties:
                              group_address:
                                type: string
                                description: Base58 address of the MPL Core group account.
                              member_number:
                                type: integer
                                description: Member number within the group.
```
