# getAsset

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

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

Returns information about a single digital asset.

Reference: https://www.alchemy.com/docs/reference/alchemy-das-apis-for-solana/solana-das-api-endpoints/get-asset

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| id | string | Yes | The ID of the asset, typically a base-58 encoded string. |
| displayOptions | object | No | Options for display formatting. |

## Result

**Asset information** (object): Returns detailed information about the specified digital asset.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getAsset",
  "params": [
    "F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk"
  ],
  "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": "getAsset",
  "params": [
    "F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk",
    {
      "showUnverifiedCollections": false,
      "showCollectionMetadata": false,
      "showFungible": false,
      "showNativeBalance": false,
      "showInscriptions": false,
      "showZeroBalance": false,
      "showGrandTotal": false
    }
  ]
}'
```

### JavaScript

```javascript
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    jsonrpc: '2.0',
    id: 1,
    method: 'getAsset',
    params: [
      'F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk',
      {
        showUnverifiedCollections: false,
        showCollectionMetadata: false,
        showFungible: false,
        showNativeBalance: false,
        showInscriptions: false,
        showZeroBalance: false,
        showGrandTotal: 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": "getAsset",
    "params": [
        "F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk",
        {
            "showUnverifiedCollections": False,
            "showCollectionMetadata": False,
            "showFungible": False,
            "showNativeBalance": False,
            "showInscriptions": False,
            "showZeroBalance": False,
            "showGrandTotal": 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\": \"getAsset\",\n  \"params\": [\n    \"F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk\",\n    {\n      \"showUnverifiedCollections\": false,\n      \"showCollectionMetadata\": false,\n      \"showFungible\": false,\n      \"showNativeBalance\": false,\n      \"showInscriptions\": false,\n      \"showZeroBalance\": false,\n      \"showGrandTotal\": 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\": \"getAsset\",\n  \"params\": [\n    \"F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk\",\n    {\n      \"showUnverifiedCollections\": false,\n      \"showCollectionMetadata\": false,\n      \"showFungible\": false,\n      \"showNativeBalance\": false,\n      \"showInscriptions\": false,\n      \"showZeroBalance\": false,\n      \"showGrandTotal\": 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\": \"getAsset\",\n  \"params\": [\n    \"F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk\",\n    {\n      \"showUnverifiedCollections\": false,\n      \"showCollectionMetadata\": false,\n      \"showFungible\": false,\n      \"showNativeBalance\": false,\n      \"showInscriptions\": false,\n      \"showZeroBalance\": false,\n      \"showGrandTotal\": false\n    }\n  ]\n}", false);
var response = await client.PostAsync(request);

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

```


## OpenRPC Method Specification

```yaml
name: getAsset
description: Returns information about a single digital asset.
paramStructure: by-name
params:
  - name: id
    required: true
    description: The ID of the asset, typically a base-58 encoded string.
    schema:
      title: Asset ID
      type: string
      description: The ID of the asset, typically a base-58 encoded string.
  - name: displayOptions
    required: false
    description: Options for display formatting.
    schema:
      title: Display Options
      type: object
      description: Options for display formatting.
      properties:
        showUnverifiedCollections:
          type: boolean
          description: Display unverified collections.
          default: false
        showCollectionMetadata:
          type: boolean
          description: Display collection metadata.
          default: false
        showFungible:
          type: boolean
          description: Display all fungible tokens.
          default: false
        showNativeBalance:
          type: boolean
          description: Display native SOL balance.
          default: false
        showInscriptions:
          type: boolean
          description: Display inscriptions.
          default: false
        showZeroBalance:
          type: boolean
          description: Display assets with zero balance.
          default: false
        showGrandTotal:
          type: boolean
          description: Display grand total.
          default: false
examples:
  - name: getAsset example
    params:
      - name: id
        value: F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk
result:
  name: Asset information
  description: Returns detailed information about the specified digital asset.
  schema:
    title: Asset
    type: object
    properties:
      interface:
        title: Asset Interface
        type: string
        enum:
          - V1_NFT
          - V1_PRINT
          - LEGACY_NFT
          - V2_NFT
          - FungibleAsset
          - Custom
          - Identity
          - Executable
          - ProgrammableNFT
        description: The interface of the asset.
      id:
        title: Asset ID
        type: string
        description: The ID of the asset, typically a base-58 encoded string.
      content:
        title: Asset Content
        type: object
        properties:
          $schema:
            type: string
            description: The schema version.
          json_uri:
            type: string
            description: The URI of the JSON metadata.
          files:
            type: array
            items:
              type: object
              properties:
                uri:
                  type: string
                  description: The URI of the file.
                cdn_uri:
                  type: string
                  nullable: true
                  description: The CDN URI of the file.
                mime:
                  type: string
                  description: The MIME type of the file.
          metadata:
            type: object
            properties:
              attributes:
                type: array
                items:
                  type: object
                  properties:
                    value:
                      oneOf:
                        - type: string
                        - type: number
                      description: The value of the attribute.
                    trait_type:
                      type: string
                      description: The trait type of the attribute.
              description:
                type: string
                description: The description of the asset.
              name:
                type: string
                description: The name of the asset.
              symbol:
                type: string
                description: The symbol of the asset.
          links:
            type: object
            nullable: true
            description: External links related to the asset.
      authorities:
        type: array
        items:
          title: Asset Authority
          type: object
          properties:
            address:
              description: The address of the authority.
              title: Pubkey
              type: string
            scopes:
              type: array
              description: The scopes of the authority.
              items:
                type: string
      compression:
        title: Asset Compression
        type: object
        properties:
          eligible:
            type: boolean
            description: Whether the asset is eligible for compression.
          compressed:
            type: boolean
            description: Whether the asset is compressed.
          data_hash:
            type: string
            nullable: true
            description: The data hash of the compressed asset.
          creator_hash:
            type: string
            nullable: true
            description: The creator hash of the compressed asset.
          asset_hash:
            type: string
            nullable: true
            description: The asset hash of the compressed asset.
          tree:
            nullable: true
            description: The merkle tree address.
            title: Pubkey
            type: string
          seq:
            type: integer
            nullable: true
            description: The sequence number.
          leaf_id:
            type: integer
            nullable: true
            description: The leaf ID in the merkle tree.
      grouping:
        type: array
        items:
          title: Asset Grouping
          type: object
          properties:
            group_key:
              type: string
              description: The key of the group.
            group_value:
              type: string
              description: The value of the group.
      royalty:
        title: Asset Royalty
        type: object
        properties:
          royalty_model:
            type: string
            enum:
              - creators
              - fanout
              - single
            description: The royalty model.
          target:
            type: string
            nullable: true
            description: The target of the royalty.
          percent:
            type: number
            description: The royalty percentage.
          basis_points:
            type: integer
            description: The royalty in basis points.
          primary_sale_happened:
            type: boolean
            description: Whether the primary sale has happened.
          locked:
            type: boolean
            description: Whether the royalty is locked.
      creators:
        type: array
        items:
          title: Asset Creator
          type: object
          properties:
            address:
              description: The address of the creator.
              title: Pubkey
              type: string
            share:
              type: integer
              description: The creator's share percentage.
            verified:
              type: boolean
              description: Whether the creator is verified.
      ownership:
        title: Asset Ownership
        type: object
        properties:
          frozen:
            type: boolean
            description: Whether the asset is frozen.
          delegated:
            type: boolean
            description: Whether the asset is delegated.
          delegate:
            type: string
            nullable: true
            description: The delegate of the asset, if any.
          ownership_model:
            type: string
            enum:
              - single
              - token
            description: The ownership model.
          owner:
            description: The owner of the asset.
            title: Pubkey
            type: string
      mutable:
        type: boolean
        description: Whether the asset is mutable.
      burnt:
        type: boolean
        description: Whether the asset is burnt.
      supply:
        type: object
        properties:
          print_max_supply:
            type: integer
            nullable: true
            description: The maximum print supply.
          print_current_supply:
            type: integer
            nullable: true
            description: The current print supply.
          edition_nonce:
            type: integer
            nullable: true
            description: The edition nonce.
```
