# Get asset metadata

### Example - Asset Registry & Token Registry

```javascript
const asset = 'IYzTSjJg4I3hvUaRXrihRm9+mSEShenPK8l8uKUOD3o=';

client.api.getAssetMetadata(asset, function(err, registry_unit) {
  if (err) return console.error(err);
  client.api.getJoint(registry_unit.metadata_unit, function(err, result) {
    if (err) return console.error(err);
    const metadata = result.joint.unit.messages.find(item => item.app == 'data');
    console.log(registry_unit, metadata ? metadata.payload : null);
  });
});
```

### **Returns**

```javascript
{
  metadata_unit: "0xXOuaP5e3z38TF5ooNtDhmwNkh1i21rBWDvrrxKt0U=",
  registry_address: "AM6GTUKENBYA54FYDAKX2VLENFZIMXWG",
  suffix: null
}
{
  asset: "IYzTSjJg4I3hvUaRXrihRm9+mSEShenPK8l8uKUOD3o=",
  decimals: 0,
  name: "WCG Point by Byteball",
  shortName: "WCG Point",
  issuer: "Byteball",
  ticker: "WCG",
  description: "WCG Point is a honorific token, a recognition of contributing to World Community Grid projects. The token is not transferable, therefore, it cannot be sold and the balance reflects a lifetime contribution to WCG. Some services might choose to offer a privilege to users with large balance of this token."
}
```

### Example - Token Registry only

```javascript
const registry = 'O6H6ZIFI57X3PLTYHOCVYPP5A553CYFQ';
const asset = 'fAmGezsOuWr6TEkUmKA6zYDZUUzeE0j95pvPgIcgTkM=';
const symbol = 'TONY';

client.api.getSymbolByAsset(registry, asset).then(console.log);
client.api.getAssetBySymbol(registry, symbol).then(console.log);
```

### **Returns**

```javascript
TONY
fAmGezsOuWr6TEkUmKA6zYDZUUzeE0j95pvPgIcgTkM=
```

### **Learn more**

* Obyte Wiki: <https://wiki.obyte.org/Asset>
* Asset Registry: <https://obyte.app>
* Token Registry: <https://tokens.ooo/>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://obytejs.com/0.1.14/api/get-asset-metadata.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
