Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting all contracts for the symbol #37

Open
levshinD opened this issue Dec 19, 2024 · 9 comments
Open

Getting all contracts for the symbol #37

levshinD opened this issue Dec 19, 2024 · 9 comments

Comments

@levshinD
Copy link

I'm trying to search for all available contracts for a symbol, cant figure out how to do it with your API

@levshinD
Copy link
Author

@levshinD
Copy link
Author

do you mind sharing a code example, i keep getting exceptions. I would like to get all the contracts for IBIT for all durations and all strikes

@levshinD
Copy link
Author

found an example in stock querying

@levshinD
Copy link
Author

for a stock, but not for an option

@levshinD
Copy link
Author

{"IBIT":[{"name":"ISHARES BITCOIN TRUST ETF","chineseName":null,"assetClass":"STK","contracts":[{"conid":677037673,"exchange":"NASDAQ","isUS":true}]}]}

i get back only one contract from all the queries, not the chain

@levshinD
Copy link
Author

i suspect that this call has a bug[
(https://localhost:5000/v1/api/iserver/secdef/info?conid=677037673&sectype=OPT&month=D&strike=15.0&right=C)
the month is not properly sent

@Voyz
Copy link
Owner

Voyz commented Dec 23, 2024

i suspect that this call has a bug[(https://localhost:5000/v1/api/iserver/secdef/info?conid=677037673&sectype=OPT&month=D&strike=15.0&right=C) the month is not properly sent

That's right, the example contained an error. I've fixed it now on the master branch, feel free to try it out.

do you mind sharing a code example

Just to clarify on this - the rest_06 example was contributed by one of the users as I don't trade options, hence my help in this space will be somewhat limited. But please share what exceptions you're running into and I will try to aid you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants