RESTful endpoint provides the widest range of data, based on HTTP protocol which works in Request-Reply scheme.
Note: We adhere to the OpenAPI standards for documenting our API.
To access our API's OpenAPI specification, you can use the following link: OpenAPI v3
If you need to import the OpenAPI file into software like Postman, simply copy and paste the link below:
For real-time market data streaming, you should use WebSockets. REST API only supports pooling, meaning you can periodically request the current market data state. In streaming, you subscribe and data or updates are delivered to you continuously.
If you want to learn how to authenticate to this API, you can find detailed instructions and guidance in authentication section of this documentation.
Each HTTP request must contain the header
Accept: application/json as all our responses are in JSON format.
We encourage you to use the HTTP request header
Accept-Encoding: deflate, gzip for all requests.
This will indicate to us that we can deliver compressed data to you which on your side should be decompressed transparently.
By allowing data compression you are lowering bandwidth requirements by approximately 80%. This is important for requesting large amounts of data or using WebSocket Streaming API, as we can deliver data to you faster and more effectively.
Successful HTTP responses have the status code
200 and the body in a format according to documentation of the requested resource.
You should always check that your HTTP response status code is equal to 200, otherwise the requested was not successful.
Error message is returned in JSON structured like this:
"error": "Invalid API key"
All HTTP requests with response status codes different to
200 must be considered as failed
and you should expect additional JSON inside the body of the response with the error message encapsulated inside it as shown in the example.
We use the following error codes:
|400||Bad Request -- There is something wrong with your request|
|401||Unauthorized -- Your API key is wrong|
|403||Forbidden -- Your API key doesnt't have enough privileges to access this resource|
|429||Too many requests -- You have exceeded your API key rate limits|
|550||No data -- You requested specific single item that we don't have at this moment.|
Good practice is to store all error messages somewhere along with request data for further manual review.
Any authenticated endpoint is providing (in HTTP response headers) information about the current state of the limits associated with API Key. In this section we will describe each limit.
Request limit / APIKey
The request limit define number of maximum requests that could be executed in the 24 hours period (sliding/rollowing window - always last 24 hours from specific moment) for your subscription.
We define request as data request credits and this is not always equal to the number of API calls executed against the API. A request is deemed to be a single one if the limit query parameter on the endpoint isn’t available, isn’t used or it's stated otherwise in the API documentation. Otherwise — if the limit query parameter is available and is used — then each of the 100 data points returned in the response is counted as one request.
For example at the 2019-08-22 13:00 UTC value of the requests remaining (X-RateLimit-Remaining) will be equal to the allocated quota (X-RateLimit-Limit) decreased by the sum of the request costs (SUM(X-RateLimit-Request-Cost)) executed in the period 2019-08-21 13:00 UTC - 2019-08-22 13:00 UTC (last 24 hours).
|X-RateLimit-Used||int||Provides information about the request limit that has been used within the last 24-hour period. This header indicates the amount of request capacity consumed based on the usage history. It is important to note that the header is not always appended to every request to optimize the operation of the API.|
|X-RateLimit-Limit||int||Is an optional feature that can be enabled via the customer portal to impose a limit on the capabilities of a specific API key. It allows you to define a threshold for the number of requests that can be made using a single API key within a 24-hour time frame.|
|X-RateLimit-Remaining||int||Provides information about the number of requests that can still be made within the last 24-hour period based on the usage history. This header serves as a helpful indicator of the remaining request capacity, allowing API consumers to manage their usage effectively. It is important to note that the header is not always appended to every request to optimize the operation of the API.|
|X-RateLimit-Request-Cost||int||The number of requests used to generate current HTTP response.|
|X-RateLimit-Reset||timestring||The time when all provisioned requests are available to execute again if no more requests will be executed.|
|X-RateLimit-Quota-Overage||string||Provides information about whether a given API key may exceed the plan quota within a 24-hour time frame, which could result in additional charges. This header is fully defined and configured in the customer portal.|
|X-RateLimit-Quota-Allocated||string||Total number of requests that can be made within a specific subscription during a 24-hour time frame. This quota allocation is determined based on the user's subscription purchase.|
|X-RateLimit-Quota-Remaining||string||Provides valuable information about the remaining quota within the subscription for making requests within a 24-hour time frame. This header indicates the number of requests that can still be made within the allocated quota for the current 24-hour period.|
- X-RateLimit-Used: 1000 (requests used in the last 24 hours)
- X-RateLimit-Limit: 5000 (total request limit within a 24-hour time frame)
- X-RateLimit-Remaining: 4000 (requests remaining within the last 24 hours)
- X-RateLimit-Request-Cost: 1 (cost or "weight" of each individual request)
- X-RateLimit-Reset: 2023-05-05T12:00:00.0000001Z (when the rate limit will reset within a 24-hour period)
- X-RateLimit-Overage: ENABLED (API key may exceed the plan quota within a 24-hour time frame)
- X-RateLimit-Quota-Allocated: 10000 (total number of requests allowed for all API keys within the subscription within a 24-hour time frame)
- X-RateLimit-Quota-Remaining: 5000 (requests remaining within the subscription's allocated quota within the last 24 hours)
Concurrency limit / APIKey
The concurrency limit defines the number of maximum concurrent API calls/requests that the API could process for your subscription at the current moment. Every API call/request increases the Concurrency limit against quota, and when it finishes, decreases it.
|X-ConcurrencyLimit-Limit||int||Concurrency limit allocated for your API key.|
|X-ConcurrencyLimit-Remaining||int||The number of concurrent API calls/requests available to be executed in this moment for your API key.|
Output data format
By default we are using JSON output data format for all of our endpoints, you can control format of data by using
output_format variable in query string parameters.
|output_format||string||Output data format (optional, default value is |
|csv_include_header||bool||Ignore header line in CSV output? (optional, default value is |
|csv_include_quotes||bool||Encapsulate strings with quotes in CSV output? (optional, default value is |
|csv_exclude_col||string||Comma delimited list of column names to ignore in CSV output (optional, by default all columns are included)|
|csv_set_delimiter||string||Character that will be used as column delimiter in CSV output (optional, default value is |
|csv_set_dec_mark||string||Character that will be used as decimal separator in CSV output (optional, default value is |
|csv_set_timeformat||string||Format for datetime type in CSV output or |
|csv_set_newline||string||New line type (optional, default value is |
Excel / G-Sheets
There are several ways to use data from our REST API inside the Excel, Google Sheets, or similar calculation sheet application. This section will do as best as possible to keep all information up to date on how you could load the data into these applications. Feel free to contact support if we are missing an option.
CSV download, import:
- Open the data in the CSV format from the browser eg.
- Save the data to the file with the .csv extension.
- Use the file saved and import it into the software.
- When configuring import, refer to the parameters like delimiter from the Output data format
The platform-independent way described above is based on CSV but could also be used in other formats like JSON and XML as long as the software support it, but the import procedure needs to be adjusted accordingly.
- Use PowerQuery to load the URL directly into the CSV import without saving the file locally.
- Use the =WEBSERVICE function to load the API response directly into the sheet, but this will not parse the data; additional processing is required.
- Use =IMPORT function to load the REST API endpoint and automatically parse the CSV format data into the cells. eg.
- Select the menu Insert -> Sheet From File, 2. In the Insert dialog, put the URL eg.
https://rest.coinapi.io/v1/exchangerate/USD?apikey=YOUR_API_KEY&invert=true&output_format=csvin the File Name box at the bottom. Set the drop-down list next to that to Web Page Query and click Open. The Text Import dialog opens where you can change the defaults if needed.
- API Key: ApiKey
CoinApi API key needed to access the endpoints
|Security Scheme Type:||apiKey|
|Header parameter name:||X-CoinAPI-Key|