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

error 404 #8

Closed
Denebulas opened this issue Apr 27, 2020 · 2 comments
Closed

error 404 #8

Denebulas opened this issue Apr 27, 2020 · 2 comments

Comments

@Denebulas
Copy link

I always receive a 404 error.
Example:
props.setProperty("tda.client_id", "...");
props.setProperty("tda.token.refresh","...")

    TdaClient tdaClient = new HttpTdaClient(props);
    
    Instrument resp = tdaClient.getBond("912810EG9");

RESULT:

[AWT-EventQueue-0] INFO com.studerw.tda.client.HttpTdaClient - Initiating HttpTdaClient...
[AWT-EventQueue-0] INFO com.studerw.tda.client.HttpTdaClient - Fetching Instrument with id: 912810EG9
[AWT-EventQueue-0] INFO TDA_HTTP - REQUEST GET: https://apis.tdameritrade.com/v1/instruments/912810EG9?fundamental=true
[AWT-EventQueue-0] INFO TDA_HTTP - RESPONSE [404 - /v1/instruments/912810EG9]: https://apis.tdameritrade.com/v1/instruments/912810EG9?fundamental=true in 1844.4 ms
Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: Non 200 response: [404 - /v1/instruments/912810EG9] - https://apis.tdameritrade.com/v1/instruments/912810EG9?fundamental=true
at com.studerw.tda.client.HttpTdaClient.checkResponse(HttpTdaClient.java:622)

Same for a request for quotes.
On the test website they bot work with 200.

BTW The request for quotes from your client has a different url:

GET /v1/marketdata/quotes?symbol=MSFT

while onn the official website is:

GET /v1/marketdata/MSFT/quotes?apikey=

@studerw
Copy link
Owner

studerw commented May 4, 2020

See the issue 9.

I made a new release, so you don't have to build the jar yourself, and it's no longer a snapshot.

So change your dependency to use version 2.0.0 instead of 2.0.0-SNAPSHOP. Let me know if it works.

@Denebulas
Copy link
Author

After git cloning again it works. Thank you very much

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