All Projects → gvolpe → Exchange Rates

gvolpe / Exchange Rates

Licence: apache-2.0
💱 Querying a rate-limited currency exchange API using Redis as a cache

Programming Languages

haskell
3896 projects

Projects that are alternatives of or similar to Exchange Rates

Redis
Vapor provider for RediStack
Stars: ✭ 434 (+1072.97%)
Mutual labels:  redis, cache
Bloom
🌸 HTTP REST API caching middleware, to be used between load balancers and REST API workers.
Stars: ✭ 553 (+1394.59%)
Mutual labels:  redis, cache
Api Boot
“ ApiBoot”是为接口服务而生的,基于“ SpringBoot”完成扩展和自动配置,内部封装了一系列的开箱即用Starters。
Stars: ✭ 460 (+1143.24%)
Mutual labels:  rate-limiter, redis
Ledge
An RFC compliant and ESI capable HTTP cache for Nginx / OpenResty, backed by Redis
Stars: ✭ 412 (+1013.51%)
Mutual labels:  redis, cache
Rerate
redis-based rate counter and rate limiter
Stars: ✭ 18 (-51.35%)
Mutual labels:  rate-limiter, redis
Stackexchange.redis.extensions
Stars: ✭ 419 (+1032.43%)
Mutual labels:  redis, cache
Laravel Eloquent Query Cache
Adding cache on your Laravel Eloquent queries' results is now a breeze.
Stars: ✭ 529 (+1329.73%)
Mutual labels:  redis, cache
Kache
A simple in memory cache written using go
Stars: ✭ 349 (+843.24%)
Mutual labels:  redis, cache
Java Knowledge Mind Map
【🌱🌱Java服务端知识技能图谱】用思维脑图梳理汇总Java服务端知识技能
Stars: ✭ 787 (+2027.03%)
Mutual labels:  redis, cache
Smartsql
SmartSql = MyBatis in C# + .NET Core+ Cache(Memory | Redis) + R/W Splitting + PropertyChangedTrack +Dynamic Repository + InvokeSync + Diagnostics
Stars: ✭ 775 (+1994.59%)
Mutual labels:  redis, cache
Ring
Python cache interface with clean API and built-in memcache & redis + asyncio support.
Stars: ✭ 404 (+991.89%)
Mutual labels:  redis, cache
Redis Ratelimit
A fixed window rate limiter based on Redis
Stars: ✭ 15 (-59.46%)
Mutual labels:  rate-limiter, redis
Dynomite
A generic dynamo implementation for different k-v storage engines
Stars: ✭ 3,830 (+10251.35%)
Mutual labels:  redis, cache
Lada Cache
A Redis based, fully automated and scalable database cache layer for Laravel
Stars: ✭ 424 (+1045.95%)
Mutual labels:  redis, cache
Ssm booksystem
ssm demo,ssm详细教程,SSM简明教程:简单的十步教你搭建人生第一个SSM框架[ SSM框架整合教程(spring+spring mvc+mybatis+redis+maven+idea+bootstrap) ]
Stars: ✭ 355 (+859.46%)
Mutual labels:  redis, cache
Aiocache
Asyncio cache manager for redis, memcached and memory
Stars: ✭ 496 (+1240.54%)
Mutual labels:  redis, cache
Cache
Cache library with Redis backend for Golang
Stars: ✭ 337 (+810.81%)
Mutual labels:  redis, cache
Hibernate Redis
hibernate 2nd level cache privder using redis
Stars: ✭ 345 (+832.43%)
Mutual labels:  redis, cache
Gocache
☔️ A complete Go cache library that brings you multiple ways of managing your caches
Stars: ✭ 775 (+1994.59%)
Mutual labels:  redis, cache
Weixinmpsdk
微信全平台 SDK Senparc.Weixin for C#,支持 .NET Framework 及 .NET Core、.NET 6.0。已支持微信公众号、小程序、小游戏、企业号、企业微信、开放平台、微信支付、JSSDK、微信周边等全平台。 WeChat SDK for C#.
Stars: ✭ 7,098 (+19083.78%)
Mutual labels:  redis, cache

icon exchange-rates

CircleCI

Querying a rate-limited foreign currency exchange API using Redis as a cache.

  • Number of Requests per Hour: 100 (See config file)

Http Endpoints

GET /v1/currencies

Returns a list of the available currencies. Eg:

["USD","EUR","GBP","AUD","CAD","PLN","ARS"]

GET /v1/rates?from=EUR&to=USD

Returns the current exchange rate, if available:

{"to":"USD","from":"EUR","rate":1.139556}

Run it locally

You'll need a Redis instance. The easiest way to get started is by using docker:

docker run -it --rm -p 6379:6379 redis:5.0.0

And then run the web server app using cabal new-run exchange-rates, or using Nix nix-shell --pure shell.nix and cabal new-run exchange-rates. You should see something like:

AppConfig {forex = ForexConfig {host = "https://free.currconv.com/api/v7", apiKey = [SECRET], keyExpiration = 1800}, redis = RedisConfig {redisHost = "127.0.0.1", redisPort = 6379}}
Started server on localhost:8080
Calling web service for: USD -> GBP
Calling web service for: USD -> EUR
Cache hit: USD -> GBP
Calling web service for: USD -> PLN
Cache hit: USD -> PLN

Exchange rates are cached to avoid hitting the (limited) external service many times.

Browse the documentation

The docs are generated at compile time from the API definition. The API serves a swagger.json response that you can visualize in the Swagger UI:

docker run -p 80:8080 swaggerapi/swagger-ui

Go to localhost and enter http://localhost:8080/swagger.json.

docs

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].