<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi<br>
<br>
I'm trying to download one years price history using this:<br>
<br>
This works perfectly:<br>
<br>
# prices from IBrokers<br>
<br>
library("IBrokers")<br>
<br>
# IBrokersRef()<br>
<br>
tws <- twsConnect()<br>
# reqCurrentTime(tws)<br>
<br>
<br>
<br>
contract <- twsEquity('GLD', primary='ARCA', currency="USD")<br>
<br>
reqHistoricalData(tws, contract)<br>
<br>
but its for the 30 day limit period.<br>
<br>
So I try this:<br>
<br>
Sys.sleep(10) # mandatory 10s between request to avoid IB pacing
violation<br>
reqHistory(tws, Contract=contract, endDateTime = '20151231
24:00:00', barSize='1 day', duration='1 Y')<br>
<br>
and I get an error:<br>
<br>
Error in reqHistoricalData(conn, Contract, barSize = barSize,
duration = duration, : <br>
formal argument "endDateTime" matched by multiple actual arguments<br>
> <br>
<br>
although running it on the default looks as though it would work:<br>
<br>
> reqHistory(tws, Contract=contract)<br>
waiting for TWS reply on GLD .... done.<br>
waiting for TWS reply on GLD .... done.<br>
waiting for TWS reply on GLD .... done.<br>
<br>
<br>
although I have never run it to conclusion.<br>
<br>
Can anyone tell me what I am doing wrong with the parameters in:<br>
<br>
reqHistory(tws, Contract=contract, endDateTime = '20151231
24:00:00', barSize='1 day', duration='1 Y')<br>
<br>
Thanks<br>
<br>
<br>
<br>
<br>
<br>
<div class="moz-signature">-- <br>
<div class="moz-signature">-----------------------------------------------------------------------------------------------------------------------------------
<br>
Stephen Choularton PhD, FIoD<br>
0413 545 182<br>
<br>
<iframe src="http://www.organicfoodmarkets.com.au/signature.php"
frame="0" moz-do-not-send="false" scrolling="no" height="300"
width="650"></iframe>> </div>
</div>
</body>
</html>