> For the complete documentation index, see [llms.txt](https://obytejs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://obytejs.com/api/get-asset-metadata.md).

# 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 symbol = 'TONY';
const asset = 'fAmGezsOuWr6TEkUmKA6zYDZUUzeE0j95pvPgIcgTkM=';
const registry = client.api.getOfficialTokenRegistryAddress();
client.api.getAssetBySymbol(registry, symbol).then(console.log);
client.api.getSymbolByAsset(registry, asset).then(console.log);
client.api.getDecimalsBySymbolOrAsset(registry, symbol).then(console.log);
client.api.getDecimalsBySymbolOrAsset(registry, asset).then(console.log);
```

### **Returns**

```javascript
fAmGezsOuWr6TEkUmKA6zYDZUUzeE0j95pvPgIcgTkM=
TONY
9
9
```

### **Learn more**

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
