Comments (9)
I tried looking at the web requests for this in a browser. If I enter that symbol in the quote bar at the bottom of the webpage, it says "Please enter a valid symbol." If I enter that symbol on the All-In-One Trade Ticket page, it says "Quotes are unavailable. Only limit/stop limit orders are accepted." and "This account is not approved to trade options." This is not surprising, since I never had any reason to get approved to trade options in my Schwab accounts. So I may not be able to help debug this. I even tried changing the AccountRegType from S1 to S3 with no change in the result.
Coincidentally, the internal browser request to the relevant url returns 500: InternalServerError "Server Error - Error while getting quotes", which is similar to the error message returned from the code that you posted in the other thread.
What happens when you try getting this quote in the All-In-One Trade Ticket on the webpage? Do you perhaps only have one account approved for options? In that case, maybe the request would need to be sure to specify that account. Just throwing out ideas.
from schwab-api.
Thanks a lot. This was working before he changed the code to _V2 so I think it is the code and not my account.
from schwab-api.
I eventually found the place on the website other than the order ticket that retrieves options quotes using the same endpoint/url as the code (Research -> Options, enter a symbol on that page, click on Options just below that entry box, then click on a particular bid or ask). There I noticed that their request uses three spaces between SPY and the option specification. I tried that, and it works for me regardless of my options access (and with any different number of spaces it fails with the same error that you received regardless of my options access):
api.quote_v2(["SPY 240216C00475000"])
After some additional trial and error, it looks like the option specification must start at the seventh character with spaces in between, i.e.:
api.quote_v2(["F 240216C00012000"])
api.quote_v2(["TSLA 240216C00255000"])
from schwab-api.
Yes that is what I had. As I keep testing it sometimes brings me back a quote and sometimes I just get this. Well pretty much it works the first run then stops working and I just get back blank.
from
quotes = api.quote_v2(["SPY 231226C00475000"])
pprint.pprint(quotes)
I get
([''], False)
from schwab-api.
The code you pasted does not have three species between SPY and 231226C00475000, so it's not clear that you tried what I suggested.
If your comments aren't preserving your exact code, it would be helpful if you would double check those as you post so we can figure this out.
from schwab-api.
Yes looks like it removed the extra spaces. It is exactly 3. It worked the first try then stops.
quotes = api.quote_v2(["SPY 231226C00475000"]) #quotes = api.quote_v2(["SPY"]) pprint.pprint(quotes)
from schwab-api.
Strange. I'm unable to reproduce any errors with api.quote_v2(["SPY 231226C00475000"])
, even with repeated calls. I've tried calling it in a for loop with a delay, in a for loop without a delay, and several times in an IPython session. I tried with a fresh install of v0.3.5 in a fresh miniconda python 3.12 environment, as well as in a python 3.9 environment that has a variety of other packages installed.
Sorry I couldn't help.
from schwab-api.
Ok I think i see what is going on it is getting back only my roth ira now and not both my accounts in the login like it was before.
Any ideas how to fix that?
account_info = api.get_account_info()
pprint.pprint(account_info)
from schwab-api.
Not sure if that is part of the problem but the call option you posted initially was with expiration on december 19th 2023 and you posted on december 22 2023. By then, the option call already expired.
from schwab-api.
Related Issues (20)
- margin account orders hit and miss HOT 11
- quote function change? HOT 4
- Error when placing order: This order cannot be accepted. Please ensure logged into correct account for order processing through Charles Schwab or TD Ameritrade HOT 1
- Response 413 error in get_account_info_v2() HOT 3
- `get_account_info_v2` KeyError: costDetail HOT 1
- Unable to login - Timeout error HOT 1
- order confirmation to buy or sell a symbol that's traded before today HOT 1
- Locking My Account HOT 3
- Login issue HOT 6
- TOTP login failing HOT 1
- Symantec ID not working anymore HOT 16
- Allow session to be cached to disk HOT 6
- totp secret HOT 1
- Welcome to Charles Schwab Developer Club (including migration from TD). HOT 1
- OrderManagementSystem in cancel_order_v2() seems to take value 1 HOT 2
- Shorting? HOT 3
- Login Error: waiting for locator("select#landingPageOptions") HOT 13
- This error "It looks like you are using Playwright Sync API inside the asyncio loop. Please use the Async API instead."
- You want us to enter our Schwab username and password on your website? AYFKM? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from schwab-api.