Back to old version
Partner login

Quotes distribution

We offer webmasters and website owners free access to currency quotes in the real time mode. All trading instruments available in the InstaTrader platform are also available for quote provision.

On this web page, webmasters and website owners can read about how to get free access to online forex quotes. All trading symbols in InstaTrader can be placed as online quotes onto your web resource.

Online quotes will contribute to your content richness and will attract new clients and users thanks to the latest information on market movements.

To add quotes to your website, study the information about a PHP request to the InstaForex official quotes web page. When using these quotes, insert a source link to our website www.instaforex.com.

Getting quotes:

API description: https://quotes.instaforex.com/

Getting ticks: https://quotes.instaforex.com/api/quotesTick

vailable output formats:

1. JSON - To get quotes in the JSON format, add parameter m=json to the query.

#Query example: https://quotes.instaforex.com/api/quotesTick?m=json

Query result:

[{"digits":4, "ask":1.1341, "bid":1.1338, "change":0.0001, "symbol":"EURUSD", "lasttime":1466444034, "change24h":0.0005}, {"digits":4, "ask":1.4654, "bid":1.4651, "change":0.0001, "symbol":"GBPUSD", "lasttime":1466444036, "change24h":0.0181}, {"digits":2, "ask":104.55, "bid":104.52, "change":-0.01, "symbol":"USDJPY", "lasttime":1466444036, "change24h":-0.17}, {"digits":4, "ask":0.9606, "bid":0.9603, "change":-0.0001, "symbol":"USDCHF", "lasttime":1466444036, "change24h":-0.0008}, {"digits":4, "ask":1.2797, "bid":1.2794, "change":-0.0001, "symbol":"USDCAD", "lasttime":1466444034, "change24h":-0.0053}]

2. XML - To get quotes in the XML format, add parameter m=xml to the query.

#Query example: https://quotes.instaforex.com/api/quotesTick?m=xml
file_get_contents("https://quotes.instaforex.com/api/quotesTick?m=xml");

Query result:

Warning: Output in the XML format may be removed in a future release.

Displaying only specific currency pairs:

To get only specific currency pairs, pass parameter q= with a list of currency pairs separated by commas.

#Query example: https://quotes.instaforex.com/api/quotesTick?m=json&q=eurusd,gold,%23bitcoin
file_get_contents("https://quotes.instaforex.com/api/quotesTick?m=json&q=eurusd,gold,%23bitcoin");

Query result:

[{"digits":4, "ask":1.1344, "bid":1.1341, "change":-0.0001, "symbol":"EURUSD", "lasttime":1466444823, "change24h":0.0008}, {"digits":2, "ask":1285.71, "bid":1285.11, "change":-0.03, "symbol":"GOLD", "lasttime":1466444824, "change24h":-4.23}, {"digits":2, "ask":743.98, "bid":739.98, "change":-0.05, "symbol":"#Bitcoin", "lasttime":1466444795, "change24h":-16.18}]

Notations:

Notations used to display results (key legend)

symbol - the currency pair symbol
bid - the bid value bid
ask - the bid value ask
change - the value indicating change in relation to the previous price of the currency pair
digits - the value showing how many digits after the decimal point are displayed in the currency pair price
lasttime - the value indicating the last change time of the currency pair price
change24h - the change in relation to the previous day`s close

Getting the list of all available instruments:

Available output formats: JSON

#Query example: https://quotes.instaforex.com/api/quotesList
file_get_contents("https://quotes.instaforex.com/api/quotesList");

Query result:

{"quotesList": [{"symbol":"EURUSD", "group":{"name":"Forex", "id":0}, "desc":"Euro vs US Dollar"}, {"symbol":"GBPUSD", "group":{"name":"Forex", "id":0}, "desc":"Great Britain Pound vs US Dollar"}]}

Getting the list sorted by group:

Example: https://quotes.instaforex.com/api/quotesList?groupId=21

0-5 - Forex Group
6 - Metals
7 - CFD
16-19, 21 - Futures/Indices

Using Library in PHP (PHP version requirement >5.2):

Download archive
Xem thêm