Introduction
Ginses API is fast and friendly crypto, commodity, and FX Currency Conversion JSON API, covering over 1800+ pairs/asset.
Requirements
We’ve made it easy to be up and running. All you need to do is to visit “My Account” and locate your token. If you don’t have one yet, please subscribe and get one immediately.
Getting Started
Get ready to connect to Ginses API using few coding lines of your favorite programming language.
Definitions
Definition | Description |
---|---|
API URL | The URL which all API request endpoints and URLs are based on. |
Access Token | The access key assigned to your account and used to authenticate with the API. |
Symbol | The three-letter currency code or currency pair (e.g., EUR, EURUSD). |
Base Currency | The currency to which exchange rates are relative to. (If 1 USD = X EUR, USD is the base currency) |
Target Currency | The currency an amount is converted to. (If 1 USD = X EUR, EUR is the target currency) |
Timestamp format | All timestamps are unix/epoch timestamps (seconds that have passed since since January 1, 1970 UTC). |
API URL
Ginses API comes with a single endpoint that enables you to query one or many currency codes or pairs, with readable parameters. Depending on your subscription plan, the endpoint will return real-time exchange rate data.
https://api.ginses.com/
Authentication (Token)
Your API token is a unique access key passed into the API URL’s token parameter to authenticate with the Ginses API. The following is an example of how to append the access token for authentication:
https://api.ginses.com/markets
?token=ACCESS_TOKEN
Available symbols (Pairs)
To get the complete list of a specific market (e.g., Forex, Crypto, etc.) available symbols/pairs, use the following endpoint. Replace the MARKET_NAME with the targeted market (e.g. crypto, fx, etc.)
https://api.ginses.com/markets
?token=ACCESS_TOKEN
&market=MARKET_NAME
Tick data endpoint
/markets endpoint provides you the ability to query a base currency (e.g., EUR) or currency pair (e.g.,EURUSD).
Query with base asset or pair
Search symbol/s
GET https://api.ginses.com/markets
?token=ACCESS_TOKEN
&search=SYMBOL
Response
[
{
"t":"2021-04-15T03:53:00.593Z",
"tms":"1618458780086",
"s":"EURUSD",
"b":1.19864,
"bd":0,
"a":1.19867,
"ad":1,
"p":5
}
]
Get exact symbol/s
GET https://api.ginses.com/markets
?token=ACCESS_TOKEN
&symbol=SYMBOL
Response
{
"t":"2021-04-15T03:53:00.593Z",
"tms":"1618458780086",
"s":"EURUSD",
"b":1.19864,
"bd":0,
"a":1.19867,
"ad":1,
"p":5
}
JSON response structure
Key | Description |
---|---|
t | The last update date/time of query result. |
tms | The last update timestamp of query result. |
s | Asset’s symbol or currency pair (e.g., EURUSD, AAPL, BTCUSD) |
b | The bid price. It is also referring to the highest price a buyer will pay for a currency. |
bd | The bid price direction. It is also referring to the color code of the displayed bid price (e.g., red/green). |
a | The ask price. It is also referring to the lowest price a seller will accept for a currency. |
ad | The ask price direction. It is also referring to the color code of the displayed ask price (e.g., red/green). |
p | The symbol’s price precision |
v | Volume |
c | Daily change |
cp | Daily change percentage |
h | Daily high |
l | Daily Low |
m | Market (e.g., FX, Crypto, Future, etc.) |
n | Full symbol name (e.g., EURO / U.S. DOLLAR) |
uc | USD conversion |
mg | Margin calculation (trading aggregation support) |
mgb | Margin calculation base pair position (trading aggregation support). e.g., BASE/USD => “0” |
Historical data endpoint
You can get the historical data of any of the available symbols by adding the historical parameter.
Response
[
[
1620604800,
58336.16,
59603,
57399.33,
57960
],
...
]
GET https://api.ginses.com/markets
?token=ACCESS_TOKEN
&symbol=SYMBOL
&historical=true
&limit=LIMIT // Optional (number of candles. Default to 2000)
&offset=OFFSET // Optional (candles offset)
&scale=SCALE // Optional (e.g., 1, 60, 1D, 1W, 1M), default to 1D
Historical Data Response JSON Structure
index | Description |
---|---|
0 | Timestamp. |
1 | Open. |
2 | High. |
3 | Low. |
4 | Close. |