StockTwits

Zapier has StockTwits connection for these functions

  • My posts
  • Posts by symbol
  • New posts by user

If n8n can have a StockTwits node that can pull in “posts by symbol” that would be great. I will then be able to shed Zapier completely.

thank you very much

Hey @kooln8n! What do you mean by “posts by symbol”? I couldn’t find it in their API docs: https://api.stocktwits.com/developers/docs/api :sweat_smile:

Do you by any chance mean “streams by symbol”? In case that’s it, this workflow might just do the trick :slight_smile:

{
  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.start",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "url": "=https://api.stocktwits.com/api/2/streams/symbol/{{$json[\"symbol\"]}}.json",
        "options": {}
      },
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        670,
        300
      ]
    },
    {
      "parameters": {
        "keepOnlySet": true,
        "values": {
          "string": [
            {
              "name": "symbol",
              "value": "AAPL"
            }
          ]
        },
        "options": {}
      },
      "name": "Set",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        450,
        300
      ]
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Set",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Hope that helps!

Hello! I was just trying to do this same thing here…I can curl this StockTwits API from my laptop without issue but when I SSH into the DigitalOcean Ubuntu server where I’ve got n8n installed, and run the same curl command I get a 503 cloudflare error.

This is the same error I get when I try to run this code above here in my n8n instance which is running from Docker container in DigitalOcean…

So I’m guessing the issue isn’t anything to do with Docker or the n8n installation but due to something on the server itself…thought I’d check in here to see if it’s an error you’ve seen before.

Thanks! Joel.