AutomationFlowsGeneral › Buy Stocks via API

Buy Stocks via API

Original n8n title: Workflow Buy Stocks

Workflow-Buy-Stocks. Uses httpRequest. Manual trigger; 2 nodes.

Manual trigger★★★★☆ complexity2 nodesHTTP Request
General Trigger: Manual Nodes: 2 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "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
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Workflow-Buy-Stocks. Uses httpRequest. Manual trigger; 2 nodes.

Source: https://github.com/ManojKumar-A-17/Thresh_Bot/blob/6ffc2c82f0587019026b39664cfe80e980cecd9a/n8n/workflow-buy-stocks.json — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

General

Transporeon - orders - step 3 - process single. Uses start, functionItem, httpRequest, microsoftSql. Manual trigger; 26 nodes.

Start, Function Item, HTTP Request +3
General

Email to Notion. Uses stickyNote, emailReadImap, httpRequest, noOp. Manual trigger; 13 nodes.

Email Read Imap, HTTP Request
General

ACAPS. Uses start, httpRequest, itemLists. Manual trigger; 10 nodes.

Start, HTTP Request, Item Lists
General

Apify. Uses httpRequest, stickyNote. Manual trigger; 9 nodes.

HTTP Request
General

Portfolio Orchestrator. Uses httpRequest. Webhook trigger; 59 nodes.

HTTP Request