Quantitative Trading Tutorial - How to Get Free Quotes Data via Forex API - iTick

In the quantitative trading development process, the first step is often to obtain data. Recently, I have been working on implementing a forex data quantitative trading strategy. The strategy is now almost complete, but I am facing the challenge of lacking quality data for testing and validation. To solve this problem, I conducted extensive searches and found several good forex data platforms. They all provide historical K-line data for the past few years for download, such as Wind, Tonglian Data, iTick, JoinQuant, etc., and they all provide detailed integration methods.

After actual use and comparison of these platforms, I found that iTick best meets my needs. Its biggest highlight is that it is free, provides stable real-time quotes, and comes with detailed integration examples, making it easy for beginners to get started.

Request K-line

python -m pip install requests

"""
**iTick**: A data agency that provides reliable data source APIs for fintech companies and developers, covering Forex API, Stock API, Cryptocurrency API, Index API, etc., helping to build innovative trading and analysis tools. Currently, there is a free package available that can basically meet the needs of individual quantitative developers.
Open-source stock data interface address:
https://github.com/itick-org
Apply for a free Apikey address:
https://itick.org
"""

import requests

url = "https://api.itick.org/forex/kline?region=gb&code=EURUSD&kType=1"

headers = {
    "accept": "application/json",
    "token": "bb42e24746784dc0af821abdd1188861d945a07051c8414a8337697a752de1eb"
}

response = requests.get(url, headers=headers)

print(response.text)