Skip to content

RuntimeException: Empty json body: [200 - ] - https://api.tdameritrade.com/v1/marketdata/quotes?symbol=blahblah1 #56

@jschlade

Description

@jschlade

Hi,

Using:

<dependency>
   <groupId>com.studerw.tda</groupId>
   <artifactId>td-ameritrade-client</artifactId>
   <version>2.4.1</version>
</dependency>

TdaClient client = new HttpTdaClient();
ArrayList<String> symbols = new ArrayList<>();
symbols.add("blahblah1");
List<Quote> quotes = client.fetchQuotes(symbols);

causes:

Exception in thread "main" java.lang.RuntimeException: Empty json body:  [200 - ] - https://api.tdameritrade.com/v1/marketdata/quotes?symbol=blahblah1
	at com.studerw.tda.client.HttpTdaClient.checkResponse(HttpTdaClient.java:852)
	at com.studerw.tda.client.HttpTdaClient.fetchQuotes(HttpTdaClient.java:241)

The code should be able to handle a bad symbol without throwing a RuntimeException.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions