> For the complete documentation index, see [llms.txt](https://ryan-44.gitbook.io/portrait/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ryan-44.gitbook.io/portrait/portrait-sdk/collective-portraits/read/getprice.md).

# getPrice()

```typescript
/**
   * Get the registration price of the Collective Portrait.
   *
   * @remarks
   * The registration price is the price of the Collective Portrait for a given number of years.
   * If the Collective Portrait is up for auction, the registration price will be the auction price for the first year.
   * If the Collective Portrait is not up for auction, the registration price will be the price of the Collective Portrait for the given number of years.
   *
   * @param {CollectivePortraitName | number} identity - The name of the Collective Portrait that the user would like to get the registration price for.
   * @param {number} years - The number of years that the user would like to register the Collective Portrait for.
   * @returns {number} - The registration price of the Collective Portrait.
   * @beta
   * @async
   */
  getPrice(identity: CollectivePortraitName | number, years: number): number {
    const name =
      typeof identity === 'number' ? this.getNameByTokenId(identity) : identity;
    return this.portrait.portraitCollectiveContract.getPrice(name, years);
  }
```
