GithubHelp home page GithubHelp logo

wei-xia / alfred-stock-price-workflow Goto Github PK

View Code? Open in Web Editor NEW
41.0 41.0 2.0 3.31 MB

Get the real-time stock price from US stock market! (Dow Jones, Nasdaq, S&P 500) - stonks stonks stonks

License: MIT License

JavaScript 100.00%
alfred stock stock-prices workflow

alfred-stock-price-workflow's People

Contributors

andybergon avatar wei-xia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

alfred-stock-price-workflow's Issues

Error: Stock Is Forbidden

Cool workflow. When i try to search a ticker, i get this error:

Stock Is Forbidden

Stock 1.0
Alfred 4.3
darwin x64 19.6.0


I thought it'd be due to app Security but don't see anything there.

Suggestion: Accept ISIN as alternative input

It seems only the Symbol is accepted as input (e.g. AAPL), however I more often than not work with the ISIN instead (e.g. US0378331005), which is also internationally the more common standard. Therefore, I would suggest accepting ISIN as alternative input.

Packaged alfred workflow not updated properly?

I am using the packaged Alfred workflow you attached to the GitHub releases page. But I see the warning message as shown in the screenshot below. I double-checked that I downloaded the v1.1.2 release correctly.

Screenshot 2021-10-29 at 10 42 07 PM

Three icons in the status bar after using this workflow.

image

How to reproduce it?

  1. Make sure you have only one icon in the status bar first
  2. Use this workflow once, for example stock aapl and get the result.
  3. Check the status bar again.

Do you have the same issue? Not sure what causes it.

Version:

Alfred 3.8.6
alfred-stock-price-workflow v1.1.2

Cannot read property 'toFixed' of null

Hey, just downloaded your workflow from releases page, and immediately got the following errors:

Starting debug for 'Stock'

[2018-07-25 12:00:51][ERROR: input.scriptfilter] Code 1: {
	"items": [
		{
			"title": "TypeError: Cannot read property 'toFixed' of null\n    at alfy.fetch.then.result (/Users/dentuzhik/Documents/Alfred.alfredpreferences/workflows/user.workflow.02423D22-42A3-49BB-B933-2829C60AEC0D/index.js:7:72)\n    at <anonymous>\n    at process._tickCallback (internal/process/next_tick.js:188:7)",
			"subtitle": "Press ⌘L to see the full error and ⌘C to copy it.",
			"valid": false,
			"text": {
				"copy": "```\nTypeError: Cannot read property 'toFixed' of null\n    at alfy.fetch.then.result (/Users/dentuzhik/Documents/Alfred.alfredpreferences/workflows/user.workflow.02423D22-42A3-49BB-B933-2829C60AEC0D/index.js:7:72)\n    at <anonymous>\n```\n\n-\nStock undefined\nAlfred 3.6.2\ndarwin x64 17.7.0",
				"largetype": "TypeError: Cannot read property 'toFixed' of null\n    at alfy.fetch.then.result (/Users/dentuzhik/Documents/Alfred.alfredpreferences/workflows/user.workflow.02423D22-42A3-49BB-B933-2829C60AEC0D/index.js:7:72)\n    at <anonymous>"
			},
			"icon": {
				"path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"
			}
		}
	]
}
[2018-07-25 12:00:52][ERROR: input.scriptfilter] Code 1: {
	"items": [
		{
			"title": "TypeError: Cannot read property 'toFixed' of null\n    at alfy.fetch.then.result (/Users/dentuzhik/Documents/Alfred.alfredpreferences/workflows/user.workflow.02423D22-42A3-49BB-B933-2829C60AEC0D/index.js:7:72)\n    at <anonymous>\n    at process._tickCallback (internal/process/next_tick.js:188:7)",
			"subtitle": "Press ⌘L to see the full error and ⌘C to copy it.",
			"valid": false,
			"text": {
				"copy": "```\nTypeError: Cannot read property 'toFixed' of null\n    at alfy.fetch.then.result (/Users/dentuzhik/Documents/Alfred.alfredpreferences/workflows/user.workflow.02423D22-42A3-49BB-B933-2829C60AEC0D/index.js:7:72)\n    at <anonymous>\n```\n\n-\nStock undefined\nAlfred 3.6.2\ndarwin x64 17.7.0",
				"largetype": "TypeError: Cannot read property 'toFixed' of null\n    at alfy.fetch.then.result (/Users/dentuzhik/Documents/Alfred.alfredpreferences/workflows/user.workflow.02423D22-42A3-49BB-B933-2829C60AEC0D/index.js:7:72)\n    at <anonymous>"
			},
			"icon": {
				"path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"
			}
		}
	]
}

Do I need to configure some API keys? I haven't been able to find anything in configuration.

Getting parse error when looking up stock price

CleanShot 2020-09-06 at 11 54 02

Perhaps this API has been shut down?

[12:01:08.697] Stock[Script Filter] Script with argv 'tsla' finished
[12:01:08.704] ERROR: Stock[Script Filter] Code 1: {
	"items": [
		{
			"title": "ParseError: Unexpected token F in JSON at position 0 in \"https://api.iextrading.com/1.0/stock/tsla/batch?types=quote\": \nForbidden...\n    at /Users/messina/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.76E26C54-7B01-4307-86BD-C02C7C17B9F0/node_modules/got/index.js:118:14\n    at processTicksAndRejections (internal/process/task_queues.js:93:5)",
			"subtitle": "Press ⌘L to see the full error and ⌘C to copy it.",
			"valid": false,
			"text": {
				"copy": "```\nParseError: Unexpected token F in JSON at position 0 in \"https://api.iextrading.com/1.0/stock/tsla/batch?types=quote\": \nForbidden...\n    at /Users/messina/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.76E26C54-7B01-4307-86BD-C02C7C17B9F0/node_modules/got/index.js:118:14\n```\n\n-\nStock undefined\nAlfred 4.1.1\ndarwin x64 19.6.0",
				"largetype": "ParseError: Unexpected token F in JSON at position 0 in \"https://api.iextrading.com/1.0/stock/tsla/batch?types=quote\": \nForbidden...\n    at /Users/messina/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.76E26C54-7B01-4307-86BD-C02C7C17B9F0/node_modules/got/index.js:118:14"
			},
			"icon": {
				"path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"
			}
		}
	]
}

Getting error

Hello, I got this error when I run : sudo npm install -g alfred-real-time-stock-price

Error: Command failed with exit code 1 (EPERM): alfred-link
at makeError (/usr/local/lib/node_modules/alfred-real-time-stock-price/node_modules/execa/lib/error.js:59:11)
at handlePromise (/usr/local/lib/node_modules/alfred-real-time-stock-price/node_modules/execa/index.js:112:26)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async /usr/local/lib/node_modules/alfred-real-time-stock-price/node_modules/alfy/init.js:7:3 {
command: 'alfred-link',
exitCode: 1,
exitCodeName: 'EPERM',
stdout: '',
stderr: 'Error: Permission denied to read Alfred preferences at location /Users/sikai/Library/Preferences/com.runningwithcrayons.Alfred-Preferences-3.plist\n' +
' at module.exports (/usr/local/lib/node_modules/alfred-real-time-stock-price/node_modules/resolve-alfred-prefs/index.js:44:9)',
all: 'Error: Permission denied to read Alfred preferences at location /Users/sikai/Library/Preferences/com.runningwithcrayons.Alfred-Preferences-3.plist\n' +
' at module.exports (/usr/local/lib/node_modules/alfred-real-time-stock-price/node_modules/resolve-alfred-prefs/index.js:44:9)',
failed: true,
timedOut: false,
isCanceled: false,
killed: false,
signal: undefined
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.