Documentation
Quickstart Guide
Welcome to the CurrencyApi.net Quickstart Guide! This guide will help you get up and running with our API in just a few minutes. We'll walk you through getting your API key and making your first request.
By the end of this guide, you'll have successfully retrieved real-time currency exchange rates and be ready to integrate our API into your applications.
Prerequisites
Before you can start using our API, you'll need to get your API key. Here's what you need to do:
- Have an account? Find your API key in your Dashboard. The API key is a 36-character string that acts as your authentication token for all API requests.
- No account yet? Head over to our Pricing page to choose a plan that fits your needs. All plans include a free API key to get you started.
Making Your First API Request
Now that you have your API key, let's make your first API request. We'll use the Currency Rates endpoint to get real-time exchange rates for all supported currencies.
Before we dive into the code, you'll need to decide whether you want to use our REST API directly or leverage one of our SDKs. Our SDKs provide a more convenient way to integrate with our API and handle authentication automatically. Check out our SDK documentation for more information.
Understanding the Response
By default our API returns a JSON response. You can also request an XML response by passing the output parameter to equal xml.
The response you receive contains real-time exchange rates for all supported currencies relative to the base currency (USD by default). Here's what each field means:
Response Properties
valid
boolean
Indicates whether the request was successful
updated
integer
The timestamp when the rates were last updated (Unix timestamp)
base
string
The base currency used for all exchange rates
Default: USD
rates
object
Object containing all exchange rates, where the key is the currency code and the value is the exchange rate
For example, if you see 'EUR': 0.85, it means 1 USD equals 0.85 EUR.
What's Next?
Congratulations! You've successfully made your first API request. Here are some next steps to explore:
- Learn about Authentication: Understand how to properly secure your API requests and manage your API key
- Explore Other Endpoints: Try the currency list endpoint to see all supported currencies, or use the convert endpoint to convert specific amounts
- Check Out Our SDKs: If you prefer using SDKs, explore our SDK documentation for Python, Node.js, PHP, and Go
- Review Error Codes: Familiarize yourself with our error codes to handle any issues that might arise
Ready to build something amazing? Start integrating our API into your applications and let us know if you need any help!