: | : | :期货程序化 | :期货程序化研究 | :期货量化学习 | :期货量化 |
返回列表 发帖

TWS API v9.72 在线文档 —— 介绍【翻译】

TWS API v9.72 在线文档 —— 介绍【翻译】

Introduction

[译] 介绍

The TWS API is a simple yet powerful interface through which IB clients can automate their trading strategies, request market data and monitor your account balance and portfolio in real time.

[译] TWS API是一个简单但功能强大的基于赢透证券客户端的交易工具,用户可以通过TWS API自动化交易,实时的获取市场数据,监控你的账户头寸,以及管理你的投资组合。

Audience

[译] 至用户

Our TWS API components are aimed at experienced professional developers willing to enhance the current TWS functionality. Regrettably, Interactive Brokers cannot offer any programming consulting. Before contacting our API support, please always refer to our available documentation, sample applications and Recorded Webinars

[译] 我们的TWS API提供给有经验的开发者使用。但是很遗憾的是,赢透证券不提供任何有关编程方面的咨询。在您咨询我们API技术支持前,请先阅读我们提供的文档、程序示例以及网站。

How to use this guide

[译] 如何使用手册

This guide reflects the very latest version of the TWS API -9.72 and higher- and constantly references the Java, VB, C#, C++ and Python Testbed sample projects to demonstrate the TWS API functionality. All code snippets are extracted from these projects and we suggest all those users new to the TWS API to get familiar with them in order to quickly understand the fundamentals of our programming interface. The Testbed sample projects can be found within the samples folder of the TWS API's installation directory.

[译] 这份手册包含最新的API(9.72)信息,以及与Java、VB、C#、C++、Python语言的高度关联的示例工程。示例中的代码能为你熟悉TWS API提供非常重要的帮助,尤其是第一次熟悉TWS API的开发者。这些示例代码可以在你下载的TWS API里找到。

Requirements

[译] 必备条件

  • The TWS API is an interface to TWS or IB Gateway, and as such requires network connectivity to a running instance of one of these programs.
  • [译] TWS API是赢透客户端或者网关的接口,因此要求运行API前请确保赢透客户端或者网关处于工作状态,并且确保有效的网络连接。
  • To obtain the TWS API source and sample code, download the API Components.
  • [译] 请从官网上下载API,获得API的源码和示例程序。
  • To make use of TWS API 9.72+, will require TWS build 952.x or higher.
  • [译] 使用TWS API 9.72+的版本,需要赢透客户端在build 952.x或更新的版本。
  • A working knowledge of the programming language our Testbed sample projects are developed in.
  • [译] 请使用您熟悉且有把握的编程语言。
Limitations

[译] 限制内容

Our programming interface is designed to automate some of the operations a user normally performs manually within the TWS Software such as placing orders, monitoring your account balance and positions, viewing an instrument's live data... etc. There is no logic within the API other than to ensure the integrity of the exchanged messages. Most validations and checks occur in the backend of TWS and our servers.

[译] 我们的API通常是为了方便用户在使用TWS客户端时简化、以及自动化一些操作。例如下订单。监控您的账户余额,查看实时的法律文件等。 TWS除了确保数据的完整性,API中不包含除此以外的逻辑单元。大多数的安全性和完整性检测都在我们的TWS后端以及服务器上。

Because of this it is highly convenient to familiarize with the TWS itself, in order to gain a better understanding on how our platform works. Before spending precious development time troubleshooting on the API side, it is recommended to first experiment with the TWS directly.

[译] 因为这将便于用户了解TWS客户端,以更好地理解我们的平台是如何的工作的。在花费您宝贵的开发时间解决API的各种疑难前,高度建议用户先体验TWS客户端。

Remember:
If a certain feature or operation is not available in the TWS, it will not be available on the API side either!

[译] 记住:当TWS的任何一项功能不再提供给使用时,对应的API也将无效。

Requests

[译] 要求

The TWS is designed to accept up to fifty messages per second coming from the client side. Anything coming from the client application to the TWS counts as a message (i.e. requesting data, placing orders, requesting your portfolio... etc.). This limitation is applied to all connected clients in the sense were all connected client applications to the same instance of TWS combined cannot exceed this number. On the other hand, there are no limits on the amount of messages the TWS can send to the client application.

[译] TWS设计的最高消息处理能力为50条/秒。 任何从客户端发送至TWS的数据请求都以消息的形式呈现(例如:获取数据,提交订单,获取您的投资组合...)这条限制适用于任意连接至TWS的单一客户端,并且不会超过这个限制。另一方面,TWS对客户端推送的消息没有数量限制。

Paper Trading

[译] 模拟交易

If your regular trading account has been approved and funded, you can use your Account Management page to open a Paper Trading Account which lets you use the full range of trading facilities in a simulated environment using real market conditions. Using a Paper Trading Account will allow you not only to get familiar with the TWS API but also to test your trading strategies without risking your capital. Note the paper trading environment has inherent limitations.

[译] 如果您的标准交易账户获得批准并且已经入金。您可以通过账户管理界面开通模拟交易账户,它将允许你使用全部的功能与实时的市场数据。使用虚拟交易账户不仅能让你熟悉TWS API,测试您的交易策略,并且不会损害您的资本金。需要注意的是,模拟交易受到和真实交易账户一样的限制条件。


论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
 
期货论坛 - 版权/免责声明   1.本站发布源码(包括函数、指标、策略等)均属开放源码,用意在于让使用者学习程序化语法撰写,使用者可以任意修改语法內容并调整参数。仅限用于个人学习使用,请勿转载、滥用,严禁私自连接实盘账户交易
  2.本站发布资讯(包括文章、视频、历史记录、教材、评论、资讯、交易方案等)均系转载自网络主流媒体,内容仅为作者当日个人观点,本网转载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。本网不对该类信息或数据做任何保证。不对您构成任何投资建议,不能依靠信息而取代自身独立判断,不对因使用本篇文章所诉信息或观点等导致的损失承担任何责任。
  3.本站发布资源(包括书籍、杂志、文档、软件等)均从互联网搜索而来,仅供个人免费交流学习,不可用作商业用途,本站不对显示的内容承担任何责任。请在下载后24小时内删除。如果喜欢,请购买正版,谢谢合作!
  4.龙听期货论坛原创文章属本网版权作品,转载须注明来源“龙听期货论坛”,违者本网将保留追究其相关法律责任的权力。本论坛除发布原创文章外,亦致力于优秀财经文章的交流分享,部分文章推送时若未能及时与原作者取得联系并涉及版权问题时,请及时联系删除。联系方式:http://www.qhlt.cn/thread-262-1-1.html
如何访问权限为100/255贴子:/thread-37840-1-1.html;注册后仍无法回复:/thread-23-1-1.html;微信/QQ群:/thread-262-1-1.html;网盘链接失效解决办法:/thread-93307-1-1.html

返回列表