[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Re: IB Tick data backfill



PureBytes Links

Trading Reference Links

"If I can count it gives 1 message per second."
 
You count very well Tomasz!!   8 - )
 
----- Original Message -----
Sent: Friday, April 21, 2006 3:28 PM
Subject: Re: [amibroker] Re: IB Tick data backfill

Hello,
 
"Not sure if this is worth mentioning but I attended an API webinar yesterday
with Jay Bailey and asked him about this issue.  He mentioned that there is a 50
API message per second limit.  If this limit is violated by client end, then the
socket will disconnect."
 
I am aware of the limit but I am not sure then what he means by the "message".
IB plugin uses separate connection solely for backfill and it does NOT send 50 messages per second, never. 
All it sends is one message (request for backfill) and waits for the response. Response usually
arrives in 2 seconds. So it is one message sent per 2 seconds and one response from IB.
If I can count it gives 1 message per second.
So It is not anywhere near touching 50 messages/second limit in any way UNLESS
he understands the "message" as single line of historical data.
But then - it would exceed the limit of 50 messages per second with just 50 minutes of 1-minute bar
backfill which is also not the case.
 
So one way or another no one really knows how IB counts the messages and how
to handle backfills without disconnects (see post from other people on IB discussion boards)
 
"Jay highly recommended to write a loop of some sort iterating every 1000"
 
Maybe he should simply update TWS API docs and provide at least one real-world working sample
because right now all developers just have to "discover" things because they are documented nowhere.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: JD Fagan
Sent: Friday, April 21, 2006 7:46 PM
Subject: [amibroker] Re: IB Tick data backfill

Tomasz Janeczko <amibroker@xxx> writes:
> Theory vs practice.

> 6 months of ONE MINUTE data - yes it is possible and I have
> done that in my development copy of IB plugin.
> Problem is that IB API backfills are inefficient and
> they start throttling (disconnect you) pretty quickly after requesting "too
> much".
> Gettin 6 months of 1-minute data requires you to use
> repeated requests since in one request you can only day 5 days,
> so you need to do 30 requests for one symbol - and it will
> start throttling (disconnecting about 50th request)
> - each request needing about 4-5 seconds to complete
> gives you >2 minutes to backfill one symbol ).


Not sure if this is worth mentioning but I attended an API webinar yesterday
with Jay Bailey and asked him about this issue.  He mentioned that there is a 50
API message per second limit.  If this limit is violated by client end, then the
socket will disconnect.

Jay highly recommended to write a loop of some sort iterating every 1000
milliseconds and to check total API messages count and make sure to not send
requests to server-side if that message count exceeds 50.  That would prevent
the disconnection.  So it may be better to write your own throttling routine
instead of relying on the socket disconnection to throttle you as its actually
more overhead/expensive for OS to re-obtain the socket connection than to just
wait a bit on client side for the 1000 millisecond boundary to cross again.

Regards,

JD




Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





YAHOO! GROUPS LINKS