这是由global financial datafeeds llp提供的用于websocket api的python客户端,用于访问财务数据。
DhelmGfeedClient的Python项目详细描述
dhelm gfeed python client是一个python客户端库,用于访问和集成来自 Global Financial Datafeeds LLP与您的应用程序。
若要使用此库,您必须subscribe使用Global Financial DataFeeds LLP访问Web套接字API,并获取API密钥和Web套接字终结点URL。对数据的编程访问显然可以更好地控制算法。您可以从数据提供程序访问原始数据,然后将其输入到您自己的应用程序中,并执行您想要的任何分析。
使用dhelm gfeed python客户机,您可以将web套接字api中的数据直接插入到应用程序中。
有关详细的集成和使用指南,请阅读documentation。
安装
客户端使用Python3.4+进行测试。
从源安装
克隆存储库:
git克隆https://github.com/kncsolutions/dhelm gfeed python client.git
cd到dhelm gfeed python客户端
python setup.py安装
使用PIP安装
pipinstallDhelmGfeedClient
客户机入门
fromDhelmGfeedClient.gfeedclientimportGfeedClientclient=GfeedClient("<ws_url>","<api_key>")# where,#<ws_url> : Replace <ws_url> with the web socket url#<api_key> : Replace <api_key> with your api key which you have got on subscription.defon_authenticated(base_client):#do your staff#Assign your callbacks. Every callback has some specific functions.#This callback will be called when user will be authenticated after successful connection.#Once the user is authenticated then only other predefined methods to access data from web socket can be called from inside this callback.client.on_authenticated=on_authenticated#Connect to the web socket. You have to use the predefined methods and callbacks to receive and process data.client.connect()
有关方法和相应回调的详细信息,请参阅文档。
如何运行测试文件
Git将存储库克隆到您的PC。 导航到文件夹dhelm gfeed python client/example。 打开终端并键入:
pyexample.py<ws_url><api_key>
用web套接字url替换<;ws_url>;,用api密钥替换<;api_key>;。
如果有任何查询,请发送issue或电子邮件至developer@kncsolutions.in。 要了解dhelm项目,请访问我们的项目网站https://dhelm.kncsolutions.in