Stonks 2
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
TEXT
Split
Updated Text
by
Custom
.

Split Text
SCRIPTING
Get
First Item
from
Split Text

Item from List
SCRIPTING
Get
Last Item
from
Split Text

Item from List
TEXT
Split
Item from List
by
Every Character

Split Text
SCRIPTING
Get
Items in Range
Start Index
to
2
from
Split Text

Item from List
TEXT
Combine
Item from List
with
Custom
Text

Combined Text
TEXT
Combined Text
Item from List

Text
SCRIPTING
Get
Value
for
Repeat Item
in
Stocks

Dictionary Value
MATHS
Text
×
Dictionary Value
Options Under Construction

Calculation Result
MATHS
Calculation Result
÷
100
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
DOCUMENTS
Replace
(\d+)(\.\$)
with
$1$
in
Text

Updated Text
SCRIPTING
Show
Updated Text
Showcuts