{"id":51820534,"url":"https://github.com/UniRate-API/angular-unirate","last_synced_at":"2026-07-24T14:00:38.150Z","repository":{"id":368765336,"uuid":"1286815831","full_name":"UniRate-API/angular-unirate","owner":"UniRate-API","description":"Official Angular module for the UniRate currency-exchange API. UniRateModule.forRoot, provideUniRate, Observable UniRateService, and currencyRate/currencyConvert pipes. Zero runtime deps.","archived":false,"fork":false,"pushed_at":"2026-07-02T06:01:48.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-02T06:10:13.459Z","etag":null,"topics":["angular","angular-module","currency-converter","exchange-rates","forex","fx-api","rxjs","unirate","unirateapi"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UniRate-API.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-07-02T05:58:51.000Z","updated_at":"2026-07-02T06:01:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/UniRate-API/angular-unirate","commit_stats":null,"previous_names":["unirate-api/angular-unirate"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/UniRate-API/angular-unirate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UniRate-API%2Fangular-unirate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UniRate-API%2Fangular-unirate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UniRate-API%2Fangular-unirate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UniRate-API%2Fangular-unirate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UniRate-API","download_url":"https://codeload.github.com/UniRate-API/angular-unirate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UniRate-API%2Fangular-unirate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35844578,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-24T02:00:07.870Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","angular-module","currency-converter","exchange-rates","forex","fx-api","rxjs","unirate","unirateapi"],"created_at":"2026-07-22T05:00:25.537Z","updated_at":"2026-07-24T14:00:38.133Z","avatar_url":"https://github.com/UniRate-API.png","language":"TypeScript","funding_links":[],"categories":["Third Party Components"],"sub_categories":["Pipes"],"readme":"# @unirate/angular\n\nOfficial Angular module for the [UniRate API](https://unirateapi.com) — free\ncurrency exchange rates, historical data, and VAT rates.\n\n- Observable-based `UniRateService` with full API parity\n- `UniRateModule.forRoot()` for NgModule apps\n- `provideUniRate()` for standalone Angular 16+ apps\n- `currencyRate` and `currencyConvert` pipes (use with Angular's built-in `async` pipe)\n- Zero runtime dependencies (peer deps: `@angular/core`, `@angular/common`, `rxjs`)\n- Compiled with [ng-packagr](https://github.com/ng-packagr/ng-packagr) in Angular Package Format (APF) — AOT and Ivy compatible\n\n## Install\n\n```bash\nnpm install @unirate/angular\n```\n\nRequires Angular 16–22 and RxJS 7.\n\n## Quick start\n\n### Standalone app (`app.config.ts`)\n\n```ts\nimport { provideUniRate } from '@unirate/angular';\n\nexport const appConfig: ApplicationConfig = {\n  providers: [\n    provideUniRate({ apiKey: environment.UNIRATE_API_KEY }),\n  ],\n};\n```\n\n### NgModule app (`app.module.ts`)\n\n```ts\nimport { UniRateModule } from '@unirate/angular';\n\n@NgModule({\n  imports: [\n    UniRateModule.forRoot({ apiKey: environment.UNIRATE_API_KEY }),\n  ],\n})\nexport class AppModule {}\n```\n\n### Inject the service\n\n```ts\nimport { Component, inject, OnInit } from '@angular/core';\nimport { AsyncPipe } from '@angular/common';\nimport { Observable } from 'rxjs';\nimport { UniRateService } from '@unirate/angular';\n\n@Component({\n  selector: 'app-rates',\n  standalone: true,\n  imports: [AsyncPipe],\n  template: `\u003cp\u003eEUR: {{ rate$ | async }}\u003c/p\u003e`,\n})\nexport class RatesComponent implements OnInit {\n  private rates = inject(UniRateService);\n  rate$!: Observable\u003cnumber\u003e;\n\n  ngOnInit() {\n    this.rate$ = this.rates.getRate('USD', 'EUR');\n  }\n}\n```\n\n### Use the pipes\n\n```ts\n// In a standalone component:\nimport { CurrencyRatePipe, CurrencyConvertPipe } from '@unirate/angular';\n\n@Component({\n  standalone: true,\n  imports: [AsyncPipe, CurrencyRatePipe, CurrencyConvertPipe],\n  template: `\n    \u003cp\u003e1 USD = {{ 'USD' | currencyRate:'EUR' | async }} EUR\u003c/p\u003e\n    \u003cp\u003e100 USD = {{ 100 | currencyConvert:'USD':'EUR' | async }} EUR\u003c/p\u003e\n  `,\n})\n```\n\nOr add `UniRateModule` to `imports` in an NgModule to get the pipes automatically.\n\n### Async config (`forRootAsync`)\n\n```ts\nUniRateModule.forRootAsync({\n  useFactory: (config: ConfigService) =\u003e ({\n    apiKey: config.getOrThrow('UNIRATE_API_KEY'),\n  }),\n  deps: [ConfigService],\n})\n```\n\n## API\n\n### `UniRateService`\n\nAll methods return `Observable\u003cT\u003e`. Subscribe with Angular's `async` pipe or `firstValueFrom()`.\n\n```ts\ngetRate(from: string, to: string): Observable\u003cnumber\u003e\ngetRate(from: string): Observable\u003cRecord\u003cstring, number\u003e\u003e\n\nconvert(to: string, amount: number, from: string): Observable\u003cnumber\u003e\n\nlistCurrencies(): Observable\u003cstring[]\u003e\n\n// Pro-gated — returns 403 on the free tier\ngetHistoricalRate(date: string, amount: number, from: string, to: string): Observable\u003cnumber\u003e\ngetHistoricalRate(date: string, amount: number, from: string): Observable\u003cRecord\u003cstring, number\u003e\u003e\ngetHistoricalRates(date: string, amount: number, base: string): Observable\u003cRecord\u003cstring, number\u003e\u003e\nconvertHistorical(amount: number, from: string, to: string, date: string): Observable\u003cnumber\u003e\ngetTimeSeries(startDate: string, endDate: string, amount: number, base: string, currencies?: string[]): Observable\u003cRecord\u003cstring, Record\u003cstring, number\u003e\u003e\u003e\ngetHistoricalLimits(): Observable\u003cHistoricalLimitsResponse\u003e\ngetVATRates(): Observable\u003cVATRatesAll\u003e\ngetVATRates(country: string): Observable\u003cVATRateOne\u003e\n```\n\nRaw Promise-based access: `service.raw.getRate(...)` returns a `Promise\u003cT\u003e` from the underlying `UniRateClient`.\n\n### Error handling\n\nAll errors extend `UniRateError`:\n\n| Class | HTTP status |\n|---|---|\n| `AuthenticationError` | 401 |\n| `ProRequiredError` | 403 |\n| `InvalidCurrencyError` | 404 |\n| `InvalidRequestError` | 400 |\n| `RateLimitError` | 429 |\n| `UniRateError` | other / network |\n\n```ts\nimport { catchError } from 'rxjs/operators';\nimport { UniRateError, ProRequiredError } from '@unirate/angular';\n\nthis.rates.getHistoricalRate('2023-01-01', 1, 'USD', 'EUR').pipe(\n  catchError((err: UniRateError) =\u003e {\n    if (err instanceof ProRequiredError) {\n      console.warn('Historical rates require a Pro plan.');\n    }\n    throw err;\n  }),\n).subscribe();\n```\n\n## Rate limits\n\nThe free plan allows 1,000 requests/month. Historical endpoints (`/api/historical/*`) require a Pro subscription and return `ProRequiredError` on the free tier.\n\n## Related clients\n\n\u003c!-- unirate-ecosystem-start --\u003e\n| Ecosystem | Package |\n|---|---|\n| Python | [unirate-api](https://pypi.org/project/unirate-api/) |\n| Node.js | [unirate-api](https://www.npmjs.com/package/unirate-api) |\n| React | [@unirate/react](https://www.npmjs.com/package/@unirate/react) |\n| Vue | [@unirate/vue](https://www.npmjs.com/package/@unirate/vue) |\n| Next.js | [@unirate/next](https://www.npmjs.com/package/@unirate/next) |\n| SvelteKit | [@unirate/sveltekit](https://www.npmjs.com/package/@unirate/sveltekit) |\n| NestJS | [@unirate/nestjs](https://www.npmjs.com/package/@unirate/nestjs) |\n| Nuxt | [@unirate/nuxt](https://www.npmjs.com/package/@unirate/nuxt) |\n| Remix | [@unirate/remix](https://www.npmjs.com/package/@unirate/remix) |\n| Eleventy | [@unirate/eleventy](https://www.npmjs.com/package/@unirate/eleventy) |\n| Astro | [@unirate/astro](https://www.npmjs.com/package/@unirate/astro) |\n| Go | [unirate-api-go](https://github.com/UniRate-API/unirate-api-go) |\n| Rust | [unirate-api](https://crates.io/crates/unirate-api) |\n| Swift | [unirate-api-swift](https://github.com/UniRate-API/unirate-api-swift) |\n| MCP Server | [@unirate/mcp](https://www.npmjs.com/package/@unirate/mcp) |\n\u003c!-- unirate-ecosystem-end --\u003e\n\n\u003c!-- unirate-ecosystem-footer:start --\u003e\n## UniRate ecosystem\n\nUniRate ships official integrations for 40+ ecosystems, all maintained under the\n[UniRate-API](https://github.com/UniRate-API) org.\n\n**Core clients (9 languages)**\n[Python](https://github.com/UniRate-API/unirate-api-python) ·\n[Node.js / TypeScript](https://github.com/UniRate-API/unirate-api-nodejs) ·\n[Go](https://github.com/UniRate-API/unirate-api-go) ·\n[Rust](https://github.com/UniRate-API/unirate-api-rust) ·\n[Java](https://github.com/UniRate-API/unirate-api-java) ·\n[Ruby](https://github.com/UniRate-API/unirate-api-ruby) ·\n[PHP](https://github.com/UniRate-API/unirate-api-php) ·\n[.NET](https://github.com/UniRate-API/unirate-api-dotnet) ·\n[Swift](https://github.com/UniRate-API/unirate-api-swift)\n\n**JavaScript / TypeScript**\n[React](https://github.com/UniRate-API/react-unirate) ·\n[Next.js](https://github.com/UniRate-API/next-unirate) ·\n[Remix](https://github.com/UniRate-API/remix-unirate) ·\n[SvelteKit](https://github.com/UniRate-API/sveltekit-unirate) ·\n[Vue](https://github.com/UniRate-API/vue-unirate) ·\n[Angular](https://github.com/UniRate-API/angular-unirate) ·\n[Nuxt](https://github.com/UniRate-API/nuxt-unirate) ·\n[NestJS](https://github.com/UniRate-API/nestjs-unirate) ·\n[tRPC](https://github.com/UniRate-API/trpc-unirate)\n\n**Static-site generators**\n[Astro](https://github.com/UniRate-API/astro-unirate) ·\n[Eleventy](https://github.com/UniRate-API/eleventy-unirate) ·\n[Hugo](https://github.com/UniRate-API/hugo-unirate) ·\n[Jekyll](https://github.com/UniRate-API/jekyll-unirate)\n\n**CMS \u0026 e-commerce**\n[Wagtail](https://github.com/UniRate-API/wagtail-unirate) ·\n[WordPress](https://github.com/UniRate-API/unirate-currency-converter) ·\n[WooCommerce](https://github.com/UniRate-API/unirate-woocs) ·\n[Drupal](https://github.com/UniRate-API/drupal-unirate) ·\n[Strapi](https://github.com/UniRate-API/strapi-plugin-unirate) ·\n[Medusa](https://github.com/UniRate-API/medusa-plugin-unirate) ·\n[Symfony](https://github.com/UniRate-API/unirate-bundle) ·\n[Laravel](https://github.com/UniRate-API/laravel-money-unirate) ·\n[Directus](https://github.com/UniRate-API/directus-extension-unirate)\n\n**Data, AI \u0026 backend**\n[LangChain (Python)](https://github.com/UniRate-API/langchain-unirate) ·\n[LangChain.js](https://github.com/UniRate-API/langchain-js-unirate) ·\n[FastAPI](https://github.com/UniRate-API/fastapi-unirate) ·\n[Flask](https://github.com/UniRate-API/flask-unirate) ·\n[Django REST Framework](https://github.com/UniRate-API/djangorestframework-unirate) ·\n[Apache Airflow](https://github.com/UniRate-API/airflow-provider-unirate) ·\n[dbt](https://github.com/UniRate-API/dbt-unirate)\n\n**Platform \u0026 tools**\n[MCP server](https://github.com/UniRate-API/unirate-mcp) ·\n[CLI](https://github.com/UniRate-API/unirate-cli) ·\n[Cloudflare Workers](https://github.com/UniRate-API/cloudflare-workers-unirate) ·\n[Home Assistant](https://github.com/UniRate-API/unirate-home-assistant) ·\n[n8n](https://github.com/UniRate-API/n8n-nodes-unirate) ·\n[Google Sheets](https://github.com/UniRate-API/unirate-sheets) ·\n[VS Code](https://github.com/UniRate-API/vscode-unirate) ·\n[Obsidian](https://github.com/UniRate-API/obsidian-currency)\n\n**Money library bridges**\n[money gem (Ruby)](https://github.com/UniRate-API/money-unirate-api) ·\n[NodaMoney (.NET)](https://github.com/UniRate-API/UniRateApi.NodaMoney)\n\nGet a free API key at [unirateapi.com](https://unirateapi.com).\n\u003c!-- unirate-ecosystem-footer:end --\u003e\n\n## License\n\nMIT — see [LICENSE](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUniRate-API%2Fangular-unirate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FUniRate-API%2Fangular-unirate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUniRate-API%2Fangular-unirate/lists"}