外汇API接口分类 ,包含黄金和贵金属API等行情数据,亲测有效

数据服务提供商在金融科技领域扮演着至关重要的角色,它们通过外汇API(应用程序编程接口)为用户提供实时和历史的外汇API数据。这些外汇API使得开发者和分析师能够轻松地将市场数据集成到他们的应用程序、算法模型或研究工作中。通过外汇API接口,用户可以构建各种金融应用程序,如投资组合追踪器、市场分析工具、算法交易系统等,或者进行学术研究和个人学习。

免费的数据供应商:AllTick

AllTick是一家提供稳定实时的外汇API和历史K线数据的数据服务商,简单易用的对接方式使其备受交易者青睐。

AllTick平台的优势不仅在于其免费且稳定的实时外汇数据API,更在于其简单易用的对接方式。无论是新手还是有经验的交易者,都能轻松上手,通过外汇数据API详细的文档和示例快速掌握操作技巧。这使得交易者能够专注于量化交易策略的实现和优化,而不必花费过多的时间在数据获取和处理上。

对于那些正在实现量化交易策略的交易者来说,AllTick是一个强大的工具。通过获取高质量的历史K线数据,交易者可以更准确地分析市场走势和制定交易策略。利用AllTick平台,交易者可以轻松下载所需数据,进行验证和调整策略,提高交易效率和准确性。

不仅如此,AllTick还具有丰富的文案和示例,让用户更好地了解平台的功能和操作方法。无论您是专业的量化交易者还是初学者,AllTick都能为您提供优质的数据和服务,助您在交易市场中获得更好的成绩。

最新价的接口
https://quote.aatest.online/quote-b-api/depth-tick?token=3662a972-1a5d-4bb1-88b4-66ca0c402a03-1688712831841

k线接口
https://quote.aatest.online/quote-b-api/kline?token=3662a972-1a5d-4bb1-88b4-66ca0c402a03-1688712831841

批量k线接口
https://quote.aatest.online/quote-b-api/kline?token=3662a972-1a5d-4bb1-88b4-66ca0c402a03-1688712831841

websockets接口
wss://quote.aatest.online/quote-stock-b-ws-api

港股数据接口
https://quote.aatest.online/quote-stock-b-api/kline?token=3662a972-1a5d-4bb1-88b4-66ca0c402a03-1688712831841

美股数据接口
https://quote.aatest.online/quote-b-api/kline?token=3662a972-1a5d-4bb1-88b4-66ca0c402a03-1688712831841

最新盘口接口
https://quote.aatest.online/quote-b-api/depth-tick?token=3662a972-1a5d-4bb1-88b4-66ca0c402a03-1688712831841

历史数据下载脚本

import time
 
import requests	# pip3 install requests
import json
 
# Extra headers
test_headers = {
  'Content-Type' : 'application/json'
}
 
'''
github:https://github.com/CTradeExchange/free-forex-market-data
申请免费token:https://alltick.co/register
官网:https://alltick.co
 
code  请查看code列表,选择你要查询的code
kline_type	k线类型,1分钟K,2为5分钟K,3为15分钟K,4为30分钟K,5为小时K,6为2小时K,7为4小时K,8为日K,9为周K,10为月K
query_kline_num	查询多少根K线,最多1000根
 
将如下JSON进行url的encode,复制到http的查询字符串的query字段里
{"trace" : "python_http_test1","data" : {"code" : "GOLD","kline_type" : 1,"kline_timestamp_end" : 0,"query_kline_num" : 2,"adjust_type": 0}}
{"trace" : "python_http_test2","data" : {"symbol_list": [{"code": "GOLD"}]}}
{"trace" : "python_http_test3","data" : {"symbol_list": [{"code": "GOLD"}]}}
'''
test_url1 = 'https://quote.aatest.online/quote-b-api/kline?token=3662a972-1a5d-4bb1-88b4-66ca0c402a03-1688712831841&query=%7B%22trace%22%20%3A%20%22python_http_test1%22%2C%22data%22%20%3A%20%7B%22code%22%20%3A%20%22USDJPY%22%2C%22kline_type%22%20%3A%201%2C%22kline_timestamp_end%22%20%3A%200%2C%22query_kline_num%22%20%3A%202%2C%22adjust_type%22%3A%200%7D%7D'
 
resp1 = requests.get(url=test_url1, headers=test_headers)
 
# Decoded text returned by the request
text1 = resp1.text
print(text1)

github:https://github.com/alltick/realtime-forex-crypto-stock-tick-finance-websocket-api
申请免费token:https://alltick.co/register
官网:https://alltick.co

posted @ 2024-04-07 22:26  api-store  阅读(37)  评论(0编辑  收藏  举报