从Python调用IB API

发布于 2024-10-04 04:13:08 字数 233 浏览 2 评论 0原文

IB = Interactive Brokers

似乎有两个主要选择

  1. SWIG
  2. Boost.Python + Py++

我在某种程度上了解使用这两种方法的相对优缺点。但几乎所有讨论(SO)都讨论这些工具中哪一个更适合复杂的任务。我想问的是,我应该使用这两个中的哪一个来将一些数据传递给 C++ 例程,然后调用 API?

我想我只是问学习曲线!

IB = Interactive Brokers

There seem to be two main choices

  1. SWIG
  2. Boost.Python + Py++

I understand the relative merits or demerits of using these two methods to some extent. But almost all discussions (in SO) talk about which of these tools would be better for a complex task. What I want to ask is, which of these two should I use for just passing some data to a c++ routine which then calls the API?

I guess I am just asking about the learning curve!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

杀手六號 2024-10-11 04:13:08

IBpy 是一个很棒的解决方案,它是基于 java 版本的 API 构建的包装器。

http://code.google.com/p/ibpy/

IBpy is a great solution it's a wrapper built on the java version of the API.

http://code.google.com/p/ibpy/

雪花飘飘的天空 2024-10-11 04:13:08

我可以提出第三个选择吗?就学习曲线而言 pyCxx 非常出色。我认为它比 SWIG 或 Boost 更轻。您可能会感兴趣。您可以查看示例来启动第一个模块。

我过去曾成功地使用过它,并且发现它很容易使用。

我希望它有帮助

Can I propose a 3rd choice? In term of learning curve pyCxx is excellent. I think it is lighter than SWIG or Boost. It might be interesting for you. You can look at the examples to start a 1st module.

I've used it with success in the past and I found it easy to use.

I hope it helps

对不⑦ 2024-10-11 04:13:08

此版本的 ibpy 适用于最新版本的 IB API(至少截至 2014 年 7 月):https:// github.com/blampe/IbPy

我已经成功使用它几个月了。我所要做的就是将 ibpy 克隆到某个地方:

git clone https://github.com/blampe/IbPy

并从那里安装:

cd IbPy
python setup.py install

我最初是从 http://www.quantstart.com/articles/Using-Python-IBPy-and-the-Interactive-Brokers-API-to-Automate-Trades

安装完成后,Python 中的界面与 Java API 界面几乎相同:IB API pdf

我发现查看 IB API 中包含的 TWS 测试客户端 Java 代码很有用。

This version of ibpy works for me with the latest versions of the IB API (as of July 2014 anyway): https://github.com/blampe/IbPy

I've been using it successfully for months now. All I had to do was clone ibpy somewhere:

git clone https://github.com/blampe/IbPy

and install from there:

cd IbPy
python setup.py install

I got this originally from http://www.quantstart.com/articles/Using-Python-IBPy-and-the-Interactive-Brokers-API-to-Automate-Trades

Once you've got that installed, the interface in python is pretty much identical to the Java API interface: IB API pdf

I found it useful to look at the TWS Test Client Java code included with the IB API.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文