Forex API Insight Ease

Crypto API Documentation

Crypto API

Elk Layer API provides you with an entire analysis of the international market where you can track the volume and prices. It’s one of the best platforms which provide reliable, fast and unified data information of all crypto currencies markets. Elk Layer API is a one stop currencies market data with high quality information; we provide you the access to your entire database with history of market data. It’s highly scalable and suitable for all users with a highly loadable system. If you want to avail all the recent prices of currencies, market supplies, crypto technical indicators volume, with historical data.

A wide number of developers are using this Elk Layer API, the easiest and user friendly. You can install a server by utilizing the different API to get live-time Data information just like currency converters to check the most recent rates and it sounds like the most significant API we have offered you now.

Parameters and their use

Parameter Usage
ID Set pair ID in parameter value to get your required pair data.
Default: none. Example: id=1,2,3... etc,
To get all list of Pair ID's or Pair short name use "Pair List API".
Symbol You can use currency pair name, instant of ID when you need.
Default: none.
Example: symbol=EURUSD,USDJPY,GBPNZD etc,

Note: When you use ID and symbol parameter, than symbol param will be ignored.
Category Category is used to get all paris in specific crypto category, to get all crypto pairs, use category=crypto
Default: none.
Valid values: forex, crypto, stock
Period To get specifi time period history or candle prices, use the period parameter
Default: 1h
Valid Values: 1m,5m,15m,30m,1h,2h,4h,1d,1w,month
Alternate: 1,5,15,30,60,120,240,1440,10080,43200
From When you need history data of specific date.
Default: none
Format: YYYY-MM-DD E.g: 2024-02-27
OR YYYY-MM-DD Hour:Min E.g: 2024-02-27 11:02
To When you need history data of specific date.
Default: none
Format: YYYY-MM-DD E.g: 2024-02-27
OR YYYY-MM-DD Hour:Min E.g: 2024-02-27 11:02
Candle Latest Rates API return last 2 candles of each pair, so you can filter, which candle you need. A previous closed candle, or current active candle prices.
Default: active
Values: active, close, both
Output Set your API response format.
Default: JSON
Valid Values: JSON, JSONP, object, XML, serialize and array
Note: All parameters are in lower case sensitive.

Available Pairs List

This API will return all available crypto pairs list that we have in our database. First you need to use this api to get all IDs and pairs name to use in other APIs.

Accepted Params:
category = crypto
auth_key = AUTH_KEY

API:

Return All crypto currency symbols list.

https://elklayer.com/api/v1/list?category=crypto&auth_key=AUTH_KEY
Response:
{
  "id"2176,
  "name""Bitcoin ($)",
  "symbol""Bitcoin",
  "category""crypto",
  "type""crypto",
  "decimal"1, // No of decimals in price
  "points""0.1", // smallest price unit of currency
  "base""USD", // Base Currency
  "quote""USD" // Quote Currency
},
{and more...},

Crypto Pair Details

Get pair profile details such as id, name, decimals, Trading times, bank, country

Accepted Params:
id = {any valid ID}
symbol = {any valid short name}
category = major,exotic,minor
auth_key = AUTH_KEY

Profile by IDs
https://elklayer.com/api/v1/profile?id=2176,2177,2178&auth_key=AUTH_KEY
By Symbol Combination:
https://elklayer.com/api/v1/profile?symbol=Bitcoin,Ethereum&auth_key=AUTH_KEY
By Currency Short Name:
https://elklayer.com/api/v1/profile?category=crypto&auth_key=AUTH_KEY
Response:
{ //Crypto Currency Profile
  "id" : 2176,
  "short_name" : "Bitcoin",
  "name" : "Bitcoin ($)",
  "status" : 1,
  "decimals" : 1,
  "points" : "0.1",
  "base_curr" : "USD",
  "quote_curr" : "USD",
  "category" : "crypto",
  "type" : "crypto",
  "trading_days" : ["..."],
},
{and more...},

Currency Latest Price

Crypto latest price API is very useful, you must have to get in touch with the updated price of a currency That's why the latest prices are included in any API which is the most common part. We provide one or multiple currency prices at the same time, To do so, you just have to send the request with symbols parameter in API request and set it to one or more comma-separated codes of a currency.
Note: We update the prices of each currency in every 30 seconds or less.
And use Last Candle API if you need time frame latest price, like 5m,1h,1week candle price.

Accepted Parameters :
id = {Any valid FX ID}
symbol = {Any valid FX symbol}
period = {Any valid period}
candle = {active,close,both}
category = {Any valid category}
auth_key = AUTH_KEY

Request Credit Usage: 1 credit count for each 100 record returned (rounded up).

Price of one id:
https://elklayer.com/api/v1/latest?id=2176&auth_key=AUTH_KEY
Multiple prices by ids:
https://elklayer.com/api/v1/latest?id=2176,2177,2178&auth_key=AUTH_KEY
Prices by candle:
https://elklayer.com/api/v1/latest?candle=active&auth_key=AUTH_KEY
Response:
{
  "id"2176,
  "s""Bitcoin", // Symbol
  "o""1.18000", // Open
  "h""1.18038", // High
  "l""1.17972", // Low
  "c""1.18027", // Price/Close, Current price
  "a""1.18038", // Ask
  "b""1.18016", // Bid
  "sp""2.2", // Spread
  "ch""+0.0002", // Change in 1 day candle
  "cp"+0.02%, // Change in percentage
  "v""64124", // Volume
  "t""1596575732", // When update last time Time Unix Format (UTC)
  "tm""2020-08-04 21:15:03", // When update last time (UTC)
  "up""2020-08-04 21:14:30",
},
{
and more...},
Note: All Above prices are not latest price. it is only for sample response, you can use API to get latest price.

Base Currency

On the base of 1 currency, it will return all quote prices of all available currencies.

Accepted Parameters :
symbol = {Any FX/Crypto currency symbol} e.g: EUR,USD, JPY etc
auth_key = AUTH_KEY
Candle API by ID:

https://elklayer.com/api/v1/base?symbol=USD&auth_key=AUTH_KEY
Response:

Return all quotes of all currencies in forex/crypto, depend what "type" parameter value you specified.

{
  "prices": {
      "AUD""1.4886269",
      "EUR""0.9472567",
      "USD""1"
  }
  "update_time": {
      "AUD""1677493260",
      "EUR""1677493200",
      "USD""1677493200"
  }
}
Eligibility : Users with standard and above subscription can access this endpoint.
Note: All Above quotes are not current price it is only for sample response, you can use API to get current quote price.

Crypto Historical Price API

Elk Layer API is a crypto exchange rates service that provides reliable and fast historical data on your just one click to all its users. With all well-known currencies and with a big number of exchange rates worldwide, Elk Layer API helps you with reliable data. You will find the historical data by appending a date (format YYYY-MM-DD) in API URL with the base URL and specify the period parameter values: {1m,5m, 30m, 1h, 2h,4h, 5h, 1d, 1w, month}

Accepted Parameters :
id = {Any valid Crypto ID}
symbol = {Any valid Crypto symbol}
period = {TimeFrame period} {1m,5m,15m,30m,1h,2h,4h,5h,1d,1w,month}
from = {Date from} & To = {date to} (Use both at a time or ignore both for latest history)
auth_key = AUTH_KEY

Return Latest candles
https://elklayer.com/api/v1/history?id=2176&period=1h&auth_key=AUTH_KEY
History Between Specific Date {YYYY-MM-DD}
https://elklayer.com/api/v1/history
   ?symbol=EUR/USD
   &period=1d
   &from=2023-08-01 OR 1690848000 // Unix format
   &to=2024-02-26 OR 1708905600
   &auth_key=AUTH_KEY

Do not use FROM and TO parameter : If you always need the latest history upto 900 candles, then you must have to take care of From/To parameter, that should not be assigned and remove them from URL, Then it will work better, With FROM and TO parameter it will take more time in response.

Or Between Specific Date-Time
https://elklayer.com/api/v1/history?symbol=EUR/USD&period=1d&from=2023-08-01T12:00&to=2024-02-26T12:00&auth_key=AUTH_KEY
Response:
Note: Historical data my be delay from 1 minute to 5 minute.

{
  "o""0.9765", // Open
  "h""0.9806", // High
  "l""0.9765", // Low
  "c""0.9792", // Close
  "t"1665712800000, // Time Unix Format (UTC)
  "tm""2022-10-14 02:00:00" // Date Time (UTC)
},
{
and 900 more historical candles...},

Eligibility : Free users can't use "From/To" parameters.