> For the complete documentation index, see [llms.txt](https://docs.artinals.com/artinals-protocol/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.artinals.com/artinals-protocol/advanced-topics/value-sources-api-endpoints-and-oracle-addresses.md).

# Value Sources (API Endpoints and Oracle Addresses)

**Concept**:\
The ART20 module can associate collections with external value sources—either **API endpoints** or **oracle addresses**—to enable dynamic NFT attributes. For example, you might use a real-world data feed to adjust the NFT’s displayed rarity or price based on external market conditions.

**Implementation**:

* **Set Value Source**: Call `set_collection_value_source(...)` in ART20, specifying whether it’s an API endpoint or an oracle address.
* **API Sources**:
  * These must start with `https://` and must be of a certain length.
  * The NFT’s metadata can be periodically updated based on responses from this endpoint.
* **Oracle Addresses**:
  * Typically represented as a 64-character hex string.
  * On-chain oracles can feed verified, tamper-resistant data directly into your NFT’s attributes.

**Best Practices**:

* Choose reliable, reputable APIs or oracles to ensure data integrity.
* Keep updates infrequent to avoid overloading your system or introducing instability.
* Clearly communicate to users how and why NFT attributes might change based on these external data sources.
