---
description: >-
  The TickerUSDFeedRegistry is the single source of truth for tracking the
  current feed addresses as well as keeping the relayers in sync on what tickers
  should be kept track of.
---

# TickerUSDFeedRegistry

<figure><img src="https://3820821826-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp1AG2kVgPxoINkE4ESqB%2Fuploads%2FjyfSIGHhNY2WDPinFCkt%2FScreenshot%202023-12-15%20at%2019.37.46.png?alt=media&#x26;token=f05096ec-7644-436b-b356-b189f11ba6b8" alt=""><figcaption></figcaption></figure>

## The Smart Contract API <a href="#solidity-api" id="solidity-api"></a>

### ITickerUSDFeedRegistry <a href="#itickerusdfeedregistry" id="itickerusdfeedregistry"></a>

#### TickerFeedUpdated <a href="#tickerfeedupdated" id="tickerfeedupdated"></a>

```solidity
event TickerFeedUpdated(string ticker, address feedAddress)
```

Emitter when a new ticker and its corresponding feed are added

#### getTickerFeed <a href="#gettickerfeed" id="gettickerfeed"></a>

```solidity
function getTickerFeed(string ticker) external view returns (address feedAddress)
```

Function for fetching the Chainlink USD Price feed address for a given ticker

**Parameters**

| Name   | Type   | Description         |
| ------ | ------ | ------------------- |
| ticker | string | - The ticker symbol |

**Return Values**

| Name        | Type    | Description                                       |
| ----------- | ------- | ------------------------------------------------- |
| feedAddress | address | - Address of the Ticker<>USD Chainlink price feed |

#### setTickerFeed <a href="#settickerfeed" id="settickerfeed"></a>

```solidity
function setTickerFeed(string ticker, address feedAddress) external
```

Function for adding new ticker and its corresponding feed address to the registry

**Parameters**

| Name        | Type    | Description                                       |
| ----------- | ------- | ------------------------------------------------- |
| ticker      | string  | - The ticker symbol                               |
| feedAddress | address | - Address of the Ticker<>USD Chainlink price feed |

**📅 Events**

* Emits a `TickerFeedUpdated` event
