$(stockprice)
- Syntax
$(stockprice <symbol>)- Arguments
- Required
The $(stockprice) variable allows you to display the current stock price of a specified company directly in your stream chat. This feature is useful for finance-focused streams or for viewers interested in real-time market data.
Use it
Section titled “Use it”!command add !stock Apple is currently trading at $(stockprice AAPL)To use the $(stockprice) variable, you need to include it in your chat message along with the stock symbol of the company you want to check. The syntax is:
$(stockprice <symbol>)Replace <symbol> with the actual stock symbol of the company you’re interested in.
Examples
Section titled “Examples”Comparing two tech stocks:
Current prices: Microsoft $(stockprice MSFT) vs Google $(stockprice GOOGL)Parameters
Section titled “Parameters”The $(stockprice) variable requires one parameter:
symbol: The stock symbol of the company you want to check. This is typically a 1-5 letter code used on stock exchanges.
Q: How often is the stock price updated?
A: The stock price is fetched in real-time when the command is used, but may have a slight delay (usually less than a minute) depending on the data provider.
Q: Can I use this for cryptocurrency prices?
A: No, this variable is specifically for stock prices.
Q: What happens if the lookup fails?
A: If the price service can’t be reached or the lookup fails, the variable outputs Something went wrong during prompt execution or failed to get stock price instead of a price.