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

No information displayed #59

Closed
adupuis2 opened this issue Feb 4, 2021 · 9 comments
Closed

No information displayed #59

adupuis2 opened this issue Feb 4, 2021 · 9 comments

Comments

@adupuis2
Copy link

adupuis2 commented Feb 4, 2021

Ticker is not showing any stock data at all.
Here is the result for ticker -w NET,AAPL,TSLA
image

Here is ticker -w NET,AAPL,TSLA --show-tags --show-fundamentals --show-separator --show-summary
image

Installed via brew. No internet filtering/firewalls are enabled. Here is the computer's information:
image

@fspoettel
Copy link

seeing the same, ubuntu 20.04, new installation

@adupuis2
Copy link
Author

adupuis2 commented Feb 4, 2021

BTW I'd be happy to take a crack at debugging this, if you wouldn't mind pointing me in the right direction @achannarasappa. I've never done anything in Go so I have no idea how the project is structured or where to start.

@achannarasappa
Copy link
Owner

@adupuis2 , would you be able to try running a curl to confirm there's no network level issue?:

curl https://query1.finance.yahoo.com/v7/finance/quote?lang=en-US&region=US&corsDomain=finance.yahoo.com&symbols=AAPL

@fspoettel
Copy link

can't speak for OP, but it does not seem to be a network issue for me.

curl 'https://query1.finance.yahoo.com/v7/finance/quote?lang=en-US&region=US&corsDomain=finance.yahoo.com&symbols=AAPL'

returns a well-formatted response.

@adupuis2
Copy link
Author

adupuis2 commented Feb 5, 2021

The same is true for me:

➜  ~ curl https://query1.finance.yahoo.com/v7/finance/quote\?lang\=en-US\&region\=US\&corsDomain\=finance.yahoo.com\&symbols\=AAPL\ | python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2041  100  2041    0     0  11729      0 --:--:-- --:--:-- --:--:-- 11797
{
    "quoteResponse": {
        "error": null,
        "result": [
            {
                "ask": 136.29,
                "askSize": 30,
                "averageDailyVolume10Day": 115343925,
                "averageDailyVolume3Month": 107765003,
                "bid": 136.25,
                "bidSize": 18,
                "bookValue": 3.936,
                "currency": "USD",
                "displayName": "Apple",
                "dividendDate": 1613001600,
                "earningsTimestamp": 1611765000,
                "earningsTimestampEnd": 1620043200,
                "earningsTimestampStart": 1619607540,
                "epsCurrentYear": 4.44,
                "epsForward": 4.65,
                "epsTrailingTwelveMonths": 3.687,
                "esgPopulated": false,
                "exchange": "NMS",
                "exchangeDataDelayedBy": 0,
                "exchangeTimezoneName": "America/New_York",
                "exchangeTimezoneShortName": "EST",
                "fiftyDayAverage": 132.86455,
                "fiftyDayAverageChange": 4.1754456,
                "fiftyDayAverageChangePercent": 0.031426333,
                "fiftyTwoWeekHigh": 145.09,
                "fiftyTwoWeekHighChange": -8.050003,
                "fiftyTwoWeekHighChangePercent": -0.055482827,
                "fiftyTwoWeekLow": 53.1525,
                "fiftyTwoWeekLowChange": 83.8875,
                "fiftyTwoWeekLowChangePercent": 1.5782418,
                "fiftyTwoWeekRange": "53.1525 - 145.09",
                "financialCurrency": "USD",
                "firstTradeDateMilliseconds": 345479400000,
                "forwardPE": 29.470966,
                "fullExchangeName": "NasdaqGS",
                "gmtOffSetMilliseconds": -18000000,
                "language": "en-US",
                "longName": "Apple Inc.",
                "market": "us_market",
                "marketCap": 2300641017856,
                "marketState": "REGULAR",
                "messageBoardId": "finmb_24937",
                "priceEpsCurrentYear": 30.864862,
                "priceHint": 2,
                "priceToBook": 34.81707,
                "quoteSourceName": "Nasdaq Real Time Price",
                "quoteType": "EQUITY",
                "region": "US",
                "regularMarketChange": -0.14500427,
                "regularMarketChangePercent": -0.10569981,
                "regularMarketDayHigh": 137.41,
                "regularMarketDayLow": 136.08,
                "regularMarketDayRange": "136.08 - 137.41",
                "regularMarketOpen": 137.35,
                "regularMarketPreviousClose": 137.185,
                "regularMarketPrice": 137.04,
                "regularMarketTime": 1612536759,
                "regularMarketVolume": 12026244,
                "sharesOutstanding": 16788100096,
                "shortName": "Apple Inc.",
                "sourceInterval": 15,
                "symbol": "AAPL",
                "tradeable": false,
                "trailingAnnualDividendRate": 0.807,
                "trailingAnnualDividendYield": 0.0058825673,
                "trailingPE": 37.168427,
                "triggerable": true,
                "twoHundredDayAverage": 119.50164,
                "twoHundredDayAverageChange": 17.538353,
                "twoHundredDayAverageChangePercent": 0.14676245
            }
        ]
    }
}

@achannarasappa
Copy link
Owner

The next step would be to use a debugger to have a closer look. From what's being rendered in the screenshots, it looks like data from the HTTP request never gets set. Unfortunately, without being able to replicate the issue myself, I can't add much here myself.

If you're up for debugging the issue, have a look at this article that explains how to do that with the go toolchain.

@fspoettel
Copy link

Thanks for providing the debugging article, it's very helpful and I learned something.
Turns out the problem was sitting in front of the screen in my case 🙈 Copied over the sample config in the README and did not unset the proxy which leads to the request silently failing with : proxyconnect tcp: dial tcp 127.0.0.1:3128: connect: connection refused.

Now that it works it looks like a very nice and useful program! 🙂 Thank you for creating it and your assistance here.

@achannarasappa
Copy link
Owner

Thanks for debugging this @fspoettel ! Glad to see you were able to find the root cause

I've removed the proxy setting from the readme so that folks who can copy the example config and expect it to work for them in most cases.

I also opened #79 in order to implement better error reporting. Ideally a debugger is not needed to detect errors like this :)

@adupuis2
Copy link
Author

adupuis2 commented Feb 6, 2021

Oof, that's embarrassing. I can confirm it was the same issue for me as well. Thank you both!

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

3 participants