Financial Assistant

By Highlight User
1 Users

By fetching stock API market data this shortcut helps you decide to buy/sell

Prompt

{{! These are comments, they won't effect the output of your app }}
{{! The app prompt determines how your app will behave to the user. }}
{
  "trigger": "Analyze Current Screen or Input Ticker",
  "steps": [
    {
      "action": "Get Screen Content",
      "params": {
        "type": "Text",
        "context": "Stock Ticker"
      }
    },
    {
      "action": "Get User Input",
      "params": {
        "prompt": "Enter Stock Ticker",
        "variable": "stock_ticker"
      }
    },
    {
      "action": "Fetch API",
      "params": {
        "url": "https://query1.finance.yahoo.com/v7/finance/quote?symbols={stock_ticker}",
        "method": "GET",
        "outputVariable": "market_data"
      }
    },
    {
      "action": "Parse JSON",
      "params": {
        "input": "{market_data}",
        "fields": ["currentPrice", "dayHigh", "dayLow"],
        "outputVariable": "parsed_market_data"
      }
    },
    {
      "action": "Fetch API",
      "params": {
        "url": "https://newsapi.org/v2/everything?q={stock_ticker}&apiKey=YOUR_API_KEY",
        "method": "GET",
        "outputVariable": "news_data"
      }
    },
    {
      "action": "Parse JSON",
      "params": {
        "input": "{news_data}",
        "fields": ["title", "url"],
        "outputVariable": "parsed_news_data"
      }
    },
    {
      "action": "Combine Text",
      "params": {
        "input": [
          "Market Data: {parsed_market_data}",
          "Top News Articles: {parsed_news_data}"
        ],
        "outputVariable": "summary"
      }
    },
    {
      "action": "Show Result",
      "params": {
        "content": "{summary}"
      }
    }
  ]
}


How it works