Menu

Post image 1
Post image 2
1 / 2
0

Building a Currency Converter in Spring Boot with Feign and NBP API - Finovara

DEV Community·Marcin Parśniak·26 days ago
#RKimne5j
Reading 0:00
15s threshold

Recently I added a new backend feature to Finovara — a currency conversion module powered by the public API from the National Bank of Poland (NBP). The goal was to create a clean and scalable solution that could: fetch real exchange rates support multiple conversion strategies handle external API failures properly provide precise financial calculations This feature became a really solid example of practical backend development with Spring Boot and OpenFeign. Using Feign to Integrate the NBP API. To communicate with the NBP API, I used OpenFeign. The implementation is very clean and keeps the HTTP layer separated from the business logic. @FeignClient ( name = "nbp-api" , url = "${nbp.api.url}" ) public interface NbpApiClient { @GetMapping ( "/exchangerates/tables/A" ) List < NbpTableDto > getAllRates ( @RequestParam ( "format" ) String format ); } Enter fullscreen mode Exit fullscreen mode NBP provides public exchange rate tables in JSON format, which makes integration very straightforward.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More