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

# getAsset

> Получение NFT, сжатого NFT, актива MPL Core или взаимозаменяемого токена Solana по его ID с помощью метода DAS getAsset в OrbitFlare.

## Обзор

`getAsset` возвращает один актив по его ID: метаданные, владение, роялти, создателей, коллекцию, состояние сжатия и сведения о токене, всё за один вызов. Метод работает для всех типов активов, которые индексирует DAS API.

## Параметры

<ResponseField name="id" type="string" required>
  ID актива (base-58). Для активов на основе токенов используйте адрес минта.
</ResponseField>

<ResponseField name="options" type="object">
  [Параметры отображения](/ru/das-api/display-options): `showUnverifiedCollections`, `showCollectionMetadata`, `showInscription`. Также принимается как `displayOptions`.
</ResponseField>

## Ответ

[Объект актива](/ru/das-api/asset-object).

## Примеры кода

### Запрос

```bash theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
curl https://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getAsset",
  "params": {
    "id": "JEKNNLZK6uQaQUEUz9GRoYZ7buHQ4rTN6k3qhX9NG8qU"
  }
}'
```

### Ответ

Сжатый NFT из коллекции DRiP:

```json theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
{
  "jsonrpc": "2.0",
  "result": {
    "last_indexed_slot": 457714576,
    "interface": "V1_NFT",
    "id": "JEKNNLZK6uQaQUEUz9GRoYZ7buHQ4rTN6k3qhX9NG8qU",
    "content": {
      "$schema": "https://schema.metaplex.com/nft1.0.json",
      "json_uri": "https://arweave.net/ymSDHwAqb3hnNKBid03WBUqY1Svj5Hzr0fdAYGvZBKA",
      "files": [
        {
          "uri": "https://arweave.net/2dfCrqZmpUTPEaPHuI9QUdZocNa-JYkG-3nBKycF-AM?ext=jpg",
          "mime": "image/jpeg"
        }
      ],
      "metadata": {
        "attributes": [
          { "value": "3", "trait_type": "Season" },
          { "value": "Common", "trait_type": "Rarity" }
        ],
        "description": "Combination between Angkor Wat photography with microscopic creation as the sky.",
        "name": "Aurora borealis",
        "symbol": "",
        "token_standard": "NonFungible"
      },
      "links": {
        "external_url": "https://drip.haus/showcase",
        "image": "https://arweave.net/2dfCrqZmpUTPEaPHuI9QUdZocNa-JYkG-3nBKycF-AM?ext=jpg"
      },
      "category": "image"
    },
    "authorities": [
      { "address": "5warkgXZEtubURnNHN1BcpgSBja31zeSvWudeXQEPpTr", "scopes": ["full"] }
    ],
    "compression": {
      "eligible": false,
      "compressed": true,
      "data_hash": "6TuHoKagPg1Vqz92K5fiUNJtSC7wXHXSQfadLPnXsP8s",
      "creator_hash": "EuiqSYWYf6KnUcEmorrTrGQovPKF9a1wSVJAk7bfLgnR",
      "asset_hash": "CcMhrzXFkjyLwZdijjRibgSYw4tUzXYALoCxwms4aMFH",
      "tree": "E7fYCRWkNykc8HNZvEMRj5GuNYSwJ3WjA6HuLsh3YHvL",
      "seq": 627605,
      "leaf_id": 622994
    },
    "grouping": [
      { "group_key": "collection", "group_value": "DRiP3vrQ7LuvQtmwL74RcejviWmQ1HuuKFcJdUpYG6Di" }
    ],
    "royalty": {
      "royalty_model": "creators",
      "target": null,
      "percent": 0.015,
      "basis_points": 150,
      "primary_sale_happened": false,
      "locked": false
    },
    "creators": [
      { "address": "DRiPPP2LytGjNZ5fVpdZS7Xi1oANSY3Df1gSxvUKpzny", "share": 0, "verified": true },
      { "address": "WoMbXFtdfH8crq2Zi7bQhfGx2Gv8EN4saP13gcdUGog", "share": 100, "verified": false }
    ],
    "ownership": {
      "frozen": false,
      "delegated": false,
      "delegate": null,
      "ownership_model": "single",
      "owner": "5MRNQW3NxNes1EDnxUhqyXwffseQBLpdu6QJF8G4MdN9"
    },
    "supply": {
      "print_max_supply": 0,
      "print_current_supply": 0,
      "edition_nonce": null
    },
    "mutable": true,
    "burnt": false
  },
  "id": 1
}
```

### TypeScript

```typescript theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
const RPC_URL = 'https://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY';

async function getAsset(id: string) {
  const response = await fetch(RPC_URL, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      jsonrpc: '2.0',
      id: 1,
      method: 'getAsset',
      params: { id },
    }),
  });

  const { result, error } = await response.json();
  if (error) throw new Error(error.message);
  return result;
}

const asset = await getAsset('JEKNNLZK6uQaQUEUz9GRoYZ7buHQ4rTN6k3qhX9NG8qU');
console.log(asset.content.metadata.name, asset.ownership.owner);
```

## Распространённые ошибки

| Код | Сообщение | Решение |
| - | - | - |
| -32602 | Pubkey Validation Err: ... is invalid | Передайте действительный ID актива в base-58 |
| -32602 | unknown field | Проверьте названия параметров; параметры DAS записываются в camelCase |
| -32000 | Asset Not Found | ID не является активом или ещё не проиндексирован |

## Связанные методы

* [getAssetBatch](/ru/das-api/methods/getAssetBatch): получение до 1 000 активов за один вызов
* [getAssetWithProof](/ru/das-api/methods/getAssetWithProof): получение сжатого актива вместе с его доказательством


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