{
  "nodes": [
    {
      "parameters": {
        "functionCode": "const stocks = $json[\"stocks\"];\nif (!Array.isArray(stocks)) throw new Error('Stocks must be an array');\nreturn stocks.map(stock => ({ json: { symbol: stock } }));"
      },
      "name": "Split Stocks List",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        300,
        300
      ]
    },
    {
      "parameters": {
        "requestMethod": "POST",
        "url": "http://localhost:5000/api/trade/buy",
        "jsonParameters": true,
        "options": {},
        "bodyParametersJson": "{ \"symbol\": \"={{$json.symbol}}\" }"
      },
      "name": "Buy Stock",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        600,
        300
      ]
    }
  ],
  "connections": {
    "Split Stocks List": {
      "main": [
        [
          {
            "node": "Buy Stock",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}