c*****o 发帖数: 1702 | 1 【 以下文字转载自 Stock 讨论区 】
发信人: catmiao (努力成为数据人才), 信区: Stock
标 题: Re: 谁用过IB的API没,请问市场数据怎么从API拿出来?
发信站: BBS 未名空间站 (Tue Nov 12 17:15:32 2013, 美东)
For example if I want to get real time bar
on the API guide, it is said that "Call the reqRealTimeBars() method to
start receiving real time bar results through the realtimeBar() EWrapper
method"
but here realtimeBar() function has void return. So I assume the data is
saved into the EWrapper object.
Can anybody show me how do we get the real time bar data here? And do I need
to call realtimeBar()? | c*****o 发帖数: 1702 | | p******i 发帖数: 1358 | 3 从 tickprice()和 ticksize()这两个callback过来的
need
【在 c*****o 的大作中提到】 : IB=interactive Brokers
| c*****o 发帖数: 1702 | 4 是从Ewrapper 里call吗? 如果在例子里的是SampleFrame
是
int reqId=1;
long time=0;
double open=0;
double high=0;
double low=0;
double close=0;
long volume=0;
double wap=0;
int count=0;
sampleFrame test;
test.m_client.reqRealTimeBars(1, test, 5,"MIDPOINT", true);
test.realtimeBar(1, time, open, high, low, close, volume, wap, count);
这样做的话,open这些参数不会被realtimebar改变。请问具体怎么操作阿 | p******i 发帖数: 1358 | | C***U 发帖数: 2406 | 6 你在request的时候要选择snapshot
最快的是3秒的bar
need
【在 c*****o 的大作中提到】 : 是从Ewrapper 里call吗? 如果在例子里的是SampleFrame : 是 : int reqId=1; : long time=0; : double open=0; : double high=0; : double low=0; : double close=0; : long volume=0; : double wap=0;
|
|