无法连接到FXCM服务器

2024-09-16 14:49:12 发布

您现在位置:Python中文网/ 问答频道 /正文

按照其他说明,我卸载了fxcmpy并重新安装,更新了fxcmpy

import pandas as pd
import fxcmpy

api = fxcmpy.fxcmpy(config_file= "fxcm.cfg")

这给了我错误

|ERROR|2021-03-01 16:44:23,615|Socket returns unknown error.
---------------------------------------------------------------------------
ServerError                               Traceback (most recent call last)
<ipython-input-10-38ebad4af7ea> in <module>
----> 1 api = fxcmpy.fxcmpy(config_file= "fxcm.cfg")

c:\program files (x86)\python38-32\lib\site-packages\fxcmpy\fxcmpy.py in __init__(self, access_token, config_file, log_file, log_level, server, proxy_url, proxy_port, proxy_type)
    216             raise ServerError('Can not find FXCM Server.')
    217         elif self.connection_status == 'aborted':
--> 218             `raise ServerError('Can not connect to FXCM Server.')`
    219 
    220         self.__collect_account_ids__()

ServerError: Can not connect to FXCM Server.

Tags: inimportselfapiconfigservernotcfg