Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to analyze the process of VNPY version 1.9.2 supporting see-through terminals

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

How to analyze VNPY version 1.9.2 support see-through terminal process, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.

I use VNPY version 1.9.2, because of regulatory requirements, need to support see-through terminals, here to talk about the implementation process. Version 2.0 hasn't been tried yet. I'm not sure. It's for reference only.

First of all, thanks to vnpy for the timely update.

You can go to GITHUB https://github.com/vnpy/vnpy/tree/v1.9.2-LTS to download the latest version.

The first step is to contact the account manager of the futures company, usually he will give you an application form, fill in the information, mainly the AppID:client_vnpyXXXX_ version number, here are self-developed systems, so you can fill in casually. You will then receive a confirmation email, including the address of the test server and the terminal authentication code (AuthCode).

The second step is to update vnpy to the latest version; there are two update methods:

1. It's pip uninstall vnpy, then reinstall the latest version.

two。 If you have more self-development, you can try to update it manually; the update folder is vnpy/api/ctp, vnpy/trader/gateway/ctpGateway and ctptestGateway in anacoda's lib, in which ctptestGateway supports 6.3.13, which is used for login evaluation system; ctpGateway is 6.3.15 interface, which is officially used.

The third step is to update the login information and log in to the test system.

Update examples\ VnTrader\ CTPTEST_connect.json and fill in the address of the test server, AppID and terminal authentication code (AuthCode); user password.

Modify examples\ VnTrader\ run.py to load the test interface.

# load underlying interface from vnpy.trader.gateway import (ctptestGateway, ibGateway, huobiGateway) # from vnpy.trader.gateway import (ctpGateway, ibGateway, huobiGateway) # add transaction interface # me.addGateway (ctpGateway) me.addGateway (ctptestGateway)

3. Run VnTrader.bat, log in to the official system, and try to place an order.

The fourth step, if officially enabled, change back to loading the formal interface.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report