Get Stock Quote from Yahoo using Node-RED

[
    {
        "id": "d5d3c55c.ff8808",
        "type": "debug",
        "z": "3b163621.c03b8a",
        "name": "",
        "active": true,
        "console": "false",
        "complete": "false",
        "x": 930,
        "y": 180,
        "wires": []
    },
    {
        "id": "39834827.c17818",
        "type": "http request",
        "z": "3b163621.c03b8a",
        "name": "Yahoo Stock",
        "method": "GET",
        "ret": "txt",
        "url": "http://download.finance.yahoo.com/d/quotes.csv?s=^IXIC&f=nsl1opc1p2&e=.csv",
        "tls": "",
        "x": 510,
        "y": 180,
        "wires": [
            [
                "247647e3.b30f88",
                "5db14531.5fb30c"
            ]
        ]
    },
    {
        "id": "5aba260a.74be08",
        "type": "inject",
        "z": "3b163621.c03b8a",
        "name": "Click me to request a stock quote...",
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "repeat": "",
        "crontab": "",
        "once": true,
        "x": 210,
        "y": 180,
        "wires": [
            [
                "39834827.c17818"
            ]
        ]
    },
    {
        "id": "247647e3.b30f88",
        "type": "csv",
        "z": "3b163621.c03b8a",
        "name": "Columns",
        "sep": ",",
        "hdrin": "",
        "hdrout": "",
        "multi": "one",
        "ret": "\\n",
        "temp": "1,2,3,4,5,6,7",
        "x": 720,
        "y": 180,
        "wires": [
            [
                "d5d3c55c.ff8808"
            ]
        ]
    },
    {
        "id": "2f5e310b.99ce8e",
        "type": "comment",
        "z": "3b163621.c03b8a",
        "name": "Readme...",
        "info": "Reference for requesting stock quote...\nhttps://support.klipfolio.com/hc/en-us/articles/215546368-Use-Yahoo-Finance-as-a-data-source-\n\nTo play around, you may be able to change the \nURL in the node that says Yahoo Stock to \nthe URL of your Restful API?\n\nAnyway, aside from that, if you click on the \nlittle square box to the RHS of the node that\nsays \"Click me to request a stock quote...\"\nthat will inject a new timestamp and make a new\nrequest\n\nThere are two outputs.  Check the Debug tab to see them\n\n1 - The raw csv from Yahoo\n2 - The CSV converted to JSON\n\nGood luck!",
        "x": 100,
        "y": 100,
        "wires": []
    },
    {
        "id": "5db14531.5fb30c",
        "type": "debug",
        "z": "3b163621.c03b8a",
        "name": "",
        "active": true,
        "console": "false",
        "complete": "false",
        "x": 730,
        "y": 260,
        "wires": []
    }
]

Leave a Reply

Your email address will not be published. Required fields are marked *