Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

扩展行情取不到数据了 #176

Open
haliluyaya opened this issue Aug 27, 2018 · 9 comments
Open

扩展行情取不到数据了 #176

haliluyaya opened this issue Aug 27, 2018 · 9 comments

Comments

@haliluyaya
Copy link

用pytdx取期货数据,之前一直可以取到,最近连接不上服务器:代码如下:
api = TdxExHq_API(heartbeat=True, raise_exception=True, auto_retry=True)
api.connect('61.152.107.141', 7727, time_out=30)
报错信息如下:
TdxConnectionError: other errors
请大神指导,感激不尽。

@AlphaSmartDog
Copy link

同样的问题 +1

@yutiansut
Copy link
Collaborator

换ip即可

@AlphaSmartDog
Copy link

`# @Retry(wait=wait_exponential(multiplier=1, max=10))
def run_pytdx():
# PyTdx通达信扩展行情
sleep(3)
api = TdxExHq_API(heartbeat=True, auto_retry=True)
sleep(3)

# 连接通达信获取市场行情数据
with api.connect("122.192.35.44", 7709):
    sleep(3)
    access = []
    for i in range(100):
        access.append(api.to_df(api.get_instrument_info(i * 500, (i + 1) * 500)))
access = pd.concat(access, axis=0)
return access`

@AlphaSmartDog
Copy link

换了ip还是不行

@porfavor
Copy link

porfavor commented Aug 29, 2018 via email

@haliluyaya
Copy link
Author

换了ip,还是不行。。是不是接口被封了

@AlphaSmartDog
Copy link

@haliluyaya 换ip有再试吗?

@ICTime
Copy link

ICTime commented Sep 4, 2018

119.23.127.172 7727
这个应该可以

@haliluyaya
Copy link
Author

@ICTime 这个真可以

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants