Java Exchange Rates API

Java Currency API

Get Live Exchange Rates in Java. Simple integration, comprehensive documentation, and reliable exchange rate data for your Java applications.

Batch FX Rates in one request
Real-time Java exchange rates
Historical data support

No card required. Free plan is 500 requests/month

ApiCall.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;

public class ApiCall {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://currencyapi.net/api/v1/rates?key=YOUR_API_KEY&base=USD&output=JSON"))
            .build();
        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}

Trusted by Java developers worldwide

Join thousands of developers who rely on our Currency API for their Java applications, with low latency JSON responses, dependable uptime, and reliable data sources.

Our API powers Java applications across industries—from Spring Boot microservices to enterprise applications. Built for Java developers, trusted by teams.

Customers using our Currency API
50M+ Requests Every Month

Built to handle high traffic smoothly and reliably.

10,000+ Happy Customers

Chosen by developers, startups, and growing teams.

Supporting Devs Since 2019

A proven platform you can count on long-term.

~50ms Average Latency

Fast responses for real-time Java apps and services.

Our Pricing Plans

Get started with our Java Exchange Rates API for free. Perfect for Java developers building personal projects or testing. Upgrade to paid plans for production Java applications with higher limits, faster updates, and commercial usage rights.

Free

Perfect for personal projects

$0/month
  • 500 monthly requests
  • Hourly updates
  • Fetch currency rates in Java
  • Rate limits (10 req/min)
  • Commercial use
  • Technical support
  • Change base currency
MOST POPULAR

Commercial

Built for production applications

From $9.99/month
  • Up to 10M+ monthly requests
  • Updates as fast as 60 seconds
  • Historical rates back to 2000
  • Code examples included
  • Convert endpoint for Java
  • Commercial use allowed
  • Technical email support
  • Team management
  • Multiple API keys
  • IP whitelisting/blacklisting

How Our Java Currency API Works

Sign Up

Sign up for a free account to get started with our API. Paid plans start at just $9.99/month.

Get Your API Key

After signing up, you'll receive an API key. Use this key to authenticate requests to our API endpoints.

Integrate the API

Use our code samples with Java's HttpClient to quickly integrate into your Java or Spring Boot applications.

Getting Started: Java Integration

Implement our Java Currency API in your application using Java's standard HttpClient library. Simple, straightforward, and requires no additional dependencies.

ApiCall.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;

public class ApiCall {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://currencyapi.net/api/v1/rates?key=YOUR_API_KEY&base=USD&output=JSON"))
            .build();
        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}

Using HttpClient

Use Java's built-in HttpClient library (Java 11+) for direct API calls. Simple, straightforward, and requires no additional dependencies beyond the standard library.

Perfect for Java and Spring Boot applications. Works seamlessly with any Java HTTP client library you prefer, including OkHttp or Apache HttpClient.

AI Assisted Java Integration

Integrate our Exchange Rates API effortlessly with AI assistants. We provide a simple llms.txt file that contains all the information about our API in a format optimized for AI assistants and Large Language Models.

AI assistants like ChatGPT, Claude, Cursor, Windsurf, and others can quickly understand our API capabilities and help you integrate Currency API more efficiently into your Java applications.

Simply reference our llms.txt file and let AI assistants guide you through Java integration, code examples, and best practices. More information can be found on our LLM Documentation page.

AI Assisted Java Currency API Integration

What Java Developers Build With Our API

See how Java developers use our Currency API endpoints to power their applications. From real-time rates to historical analysis, discover the possibilities.

GetLiveRates.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;

public class ApiCall {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://currencyapi.net/api/v1/rates?key=YOUR_API_KEY&base=USD&output=JSON"))
            .build();
        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}

Live Exchange Rates

Fetch real-time exchange rates for 152+ currencies in a single API call. Perfect for building currency converters, e-commerce pricing engines, and financial dashboards.

Java developers use this endpoint to power real-time currency displays, update product prices dynamically, and build trading applications that need current market rates.

Currency Conversion

Convert a currency from one to another with a single API request. Ideal for checkout flows, invoice generation, and payment processing systems.

Java developers integrate this endpoint into Spring Boot and Jakarta EE applications to handle multi-currency transactions, calculate shipping costs in different currencies, and build international payment gateways.

ConvertCurrency.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;

public class ApiCall {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://currencyapi.net/api/v1/convert?key=YOUR_API_KEY&from=GBP&to=USD&amount=100&output=JSON"))
            .build();
        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
        }
GetHistoricalRates.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;

public class ApiCall {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://currencyapi.net/api/v1/history?key=YOUR_API_KEY&date=2020-01-01&base=USD&output=JSON"))
            .build();
        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}

Historical Exchange Rates

Access Historical Exchange Rates for a specific date going back to the year 2000. Essential for financial reporting, backtesting trading strategies, and analyzing currency trends over time.

Java developers use historical data to build various graphs, analytics dashboards, generate financial reports, perform currency trend analysis, and create data visualizations for business intelligence tools.

Timeframe Analysis

The Timeframe Endpoint allows you to retrieve rates for multiple historical dates in one request. Perfect for analyzing currency movements over weeks, months, or years.

Java developers leverage timeframe data to build portfolio tracking tools, create currency performance reports, analyze seasonal trends, and power financial forecasting models in data science applications.

GetTimeframeRates.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;

public class ApiCall {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://currencyapi.net/api/v1/timeframe?key=YOUR_API_KEY&start_date=2017-12-25&end_date=2018-01-10&base=USD&output=JSON"))
            .build();
        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}

Powerful Dashboard for Java Developers

Manage your Java API usage, monitor performance, and access powerful analytics through our intuitive dashboard. Everything you need to optimize your Java currency data integration.

Analytics and Monitoring preview

Dashboard Features

FAQs

Questions about using our API with Java? Below are some of our most asked questions or feel free to get in touch.

Is there a free version of the currency conversion API?

Yes, we offer a free exchange rate API for personal projects only. This free version allows access to our rates endpoint, updated every hour. Please note that we do not allow commercial use on our free account. For commercial use, please refer to our terms here.

Is there any sample JSON (or XML) data that shows the response from your API?

Our API Documentation page has sample data returned from our APIs in both JSON and XML formats. Developers can use this to start planning the returned response before even signing up.

Can I use this with Spring Boot or Jakarta EE?

Absolutely! Our Java Currency API works seamlessly with Spring Boot, Jakarta EE, Quarkus, and any Java framework.

You can integrate it into controllers, create service classes, or use it in background jobs. Check our documentation for framework-specific examples.

What Java versions are supported?

Our code examples use Java's built-in HttpClient which requires Java 11 or higher. For older Java versions, you can use Apache HttpClient, OkHttp, or other HTTP client libraries.

We recommend Java 11+ for the best experience with modern Java features.

How live are the currency exchange rates?

The rate in which our data is updated depends on the plan you are subscribed to. Currency rates are updated every:

• 1 minute (Professional plan)

• 10 minutes (StartUp plan)

• 60 minutes (Essential and free plan)

Which currencies are supported by your API?

CurrencyApi.net covers real time and historical exchange rates on 152 currencies, including some cryptocurrencies and precious metals. You can find a full list of the currencies we support.