fiat-exchange-rates
fiat-exchange-rates copied to clipboard
Foreign exchange rates
fiat-exchange-rates
fiat exchange rates
docker
docker-compose
see fiat-rate-docker-compose
fiat-exchange-rates optional config
-
startup.initRate
, type isboolean
, if true, app will fetch the rate data when app startup. -
spring.profiles.active
: the value as follow:scheduling
,test
,prod
,dev
, thescheduling
will fetch the rate every hour.
api
rates
curl localhost:8080/api/v1/pub/rate/rates
response as follow:
{
"result":[
{
"base": "USD",
"provider": "CurrencyLayer",
"quote": "EUR",
"rate": 0.871405,
"ts": 1538994546000
},
...
]
}
rate of base
curl localhost:8080/api/v1/pub/rate/usd
response as follow:
{
"result":[
{
"base": "USD",
"provider": "CurrencyLayer",
"quote": "EUR",
"rate": 0.871405,
"ts": 1538994546000
},
...
]
}
rate of base and quote
curl localhost:8080/api/v1/pub/rate/usd/cny
response as follow:
{
"result":[
{
"base": "USD",
"provider": "CurrencyLayer",
"quote": "CNY",
"rate": 6.920981,
"ts": 1538994546000
},
...
]
}