Stonks 1
COMMENT
Shortcut by u/gianflo6
Find more of my shortcuts here:
https://www.reddit.com/user/gianflo6/comments/f0yh05/
DICTIONARY

Dictionary
COMMENT
Get your token at: (takes about 1 minute)
https://www.alphavantage.co/support/#api-key
Enter token here⬇️
TEXT
Text

Text
SCRIPTING
If
Text
does not have any value
SCRIPTING
Show alert
No API key found!
SCRIPTING
Exit shortcut with
Result
SCRIPTING
End If

If Result
SCRIPTING
Repeat with each item in
Stocks

Repeat Results
URL
https://www.alphavantage.co/query?function=GLOBAL_QUOTE&datatype=json&symbol=
Repeat Item
&apikey=
Text

URL
NETWORK
Get contents of
URL
Options Under Construction

Contents of URL
DOCUMENTS
Replace
(\d{1,})(\.)(\ )
with
World
in
Contents of URL

Updated Text
DOCUMENTS
Replace
.
with
,
in
Updated Text

Updated Text
SCRIPTING
Get
Value
for
Repeat Item
in
Stocks

Dictionary Value
MATHS
Updated Text
×
Dictionary Value
Options Under Construction

Calculation Result
MATHS
Round
Calculation Result
to
Ones Place

Rounded Number
TEXT
Dictionary Value
:
Updated Text
$
Your
Rounded Number
stocks are worth
Updated Text
$

Text
DOCUMENTS
Replace
([0]{1,})(\ )(\$)
with
$
in
Text

Updated Text
SCRIPTING
End Repeat

Repeat Results
TEXT
Combine
Repeat Results
with
New Lines

Combined Text
TEXT
Match
(?<=stocks\ are\ worth\ ).*(?=\$)
in
Combined Text

Matches
MATHS
Calculate the
Sum
of
Matches

Statistics
MATHS
Calculate the
Sum
of
Stocks

Statistics
TEXT
Sum
Total Value of your
Sum
Stocks:
Combined Text
$

Text
SCRIPTING
Show
Text
Showcuts