Slowness in requesting full option chain #105
Unanswered
jasonmellone
asked this question in
Q&A
Replies: 1 comment 2 replies
-
How long is "long"? I can download the full option chain for SPY in about 10 seconds all at once. Same for SPX. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Below is a snippet representing how I am attempting to pull a full option chain.
I chunk within expiration due to a timeout if I do not. On a reasonable wifi (130mb/s), SPY takes an extremely long time, if it finishes at all.
Is this common? Are there any common gotchas I'm running into that can be avoided?
`
def get_chain_instance_for_underlying(
self,
symbol: str = "",
exchange: str = "",
currency: str = "",
contract: typing.Optional[ib_async.Contract] = None,
):
if contract is None:
contract = ib_async.Stock(
symbol=symbol, exchange=exchange, currency=currency
)
self.qualifyContracts(contract)
`
Beta Was this translation helpful? Give feedback.
All reactions