Trader Binance au comptant - Sans credential dans le cloud
Ceci est unFinanceworkflow d'automatisation du domainecontenant 30 nœuds.Utilise principalement des nœuds comme Set, Code, Crypto, HttpRequest, ManualTrigger. Trader de spot Binance - ordres limite et marché via API
- •Peut nécessiter les informations d'identification d'authentification de l'API cible
Nœuds utilisés (30)
Catégorie
{
"id": "8p4wKxUqY1fAABOu",
"meta": {
"instanceId": "6585ca078ed5b28a93952b5698b0afc81474ac00ac5460a2d5d58ca9f7d86532"
},
"name": "trader-binance-spot-cloud-no-credential",
"tags": [
{
"id": "1EML6gc9DSYmybCZ",
"name": "trader",
"createdAt": "2025-06-16T02:31:44.015Z",
"updatedAt": "2025-06-16T02:31:44.015Z"
}
],
"nodes": [
{
"id": "93a8429c-b9ef-43de-934b-2c6fd9db1bb3",
"name": "When clicking ‘Execute workflow’",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-1880,
360
],
"parameters": {},
"typeVersion": 1
},
{
"id": "250640b9-95f7-48b7-bf1d-07fc90026bee",
"name": "Set Account Query",
"type": "n8n-nodes-base.set",
"position": [
-1200,
-180
],
"parameters": {
"mode": "raw",
"include": "selected",
"options": {},
"jsonOutput": "={\n \"timestamp\": \"{{ $now.toMillis() }}\"\n}\n",
"includeFields": "timestamp"
},
"typeVersion": 3
},
{
"id": "6dcb5a49-149d-4f62-bb69-137cec92f81f",
"name": "Signature Get Account",
"type": "n8n-nodes-base.crypto",
"position": [
-800,
-180
],
"parameters": {
"type": "SHA256",
"value": "={{ $json.queryString }}",
"action": "hmac",
"secret": "={{ $('Set Credentials').item.json.api_secret }}",
"dataPropertyName": "signature"
},
"typeVersion": 1
},
{
"id": "4983062d-1e68-4f15-a4d2-955fc81267b5",
"name": "Account Info Query",
"type": "n8n-nodes-base.code",
"position": [
-1000,
-180
],
"parameters": {
"jsCode": "// แปลง JSON object เป็น query string\nconst data = items[0].json;\n\n// วิธีที่ 1: ใช้ Object.keys() และ map()\nconst queryString = Object.keys(data)\n .map(key => `${key}=${data[key]}`)\n .join('&');\n\nreturn [{\n json: {\n queryString: queryString,\n originalData: data\n }\n}];"
},
"typeVersion": 2
},
{
"id": "57699751-49fa-4420-aa5a-291bc11fa631",
"name": "Order Query",
"type": "n8n-nodes-base.code",
"position": [
-1000,
0
],
"parameters": {
"jsCode": "// แปลง JSON object เป็น query string\nconst data = items[0].json;\n\n// วิธีที่ 1: ใช้ Object.keys() และ map()\nconst queryString = Object.keys(data)\n .map(key => `${key}=${data[key]}`)\n .join('&');\n\nreturn [{\n json: {\n queryString: queryString,\n originalData: data\n }\n}];"
},
"typeVersion": 2
},
{
"id": "92ff9826-2f60-4d35-8c58-30b483db49d6",
"name": "LimitBuy Parameter",
"type": "n8n-nodes-base.set",
"position": [
-1200,
0
],
"parameters": {
"mode": "raw",
"include": "none",
"options": {},
"jsonOutput": "={\n \"symbol\": \"BTCUSDT\",\n \"side\": \"BUY\",\n \"type\": \"LIMIT\",\n \"price\": 98000.20,\n \"quantity\": 0.0001,\n \"timeInForce\": \"GTC\",\n \"timestamp\": \"{{ $now.toMillis() }}\"\n}"
},
"typeVersion": 3
},
{
"id": "94a537dd-b59d-49cd-9daf-848a22df9e8d",
"name": "Set Credentials",
"type": "n8n-nodes-base.set",
"notes": "กรุณาสร้าง Binance API Credentials ใน n8n:\n1. ไปที่ Credentials > New\n2. เลือก Binance API\n3. ใส่ API Key และ Secret Key\n4. ตั้งชื่อว่า 'Binance API'\n5. Save\n\nทุก node จะใช้ credential เดียวกันนี้",
"position": [
-1680,
360
],
"parameters": {
"values": {
"string": [
{
"name": "api_key"
},
{
"name": "api_secret"
}
]
},
"options": {}
},
"notesInFlow": true,
"typeVersion": 1
},
{
"id": "9850ff29-6d6a-4fcc-bcc9-ed14c0fe1e7b",
"name": "Get Account Info",
"type": "n8n-nodes-base.httpRequest",
"position": [
-580,
-180
],
"parameters": {
"url": "https://api.binance.com/api/v3/account",
"options": {},
"sendQuery": true,
"sendHeaders": true,
"queryParameters": {
"parameters": [
{
"name": "timestamp",
"value": "={{ $('Set Account Query').item.json.timestamp }}"
},
{
"name": "signature",
"value": "={{ $json.signature }}"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "X-MBX-APIKEY",
"value": "={{ $('Set Credentials').item.json.api_key }}"
}
]
}
},
"typeVersion": 3
},
{
"id": "9a3e31fc-7da7-48dc-8758-4d109addea56",
"name": "LimitSale Parameter",
"type": "n8n-nodes-base.set",
"position": [
-1200,
180
],
"parameters": {
"mode": "raw",
"include": "none",
"options": {},
"jsonOutput": "={\n \"symbol\": \"BTCUSDT\",\n \"side\": \"SELL\",\n \"type\": \"LIMIT\",\n \"price\": 98000.20,\n \"quantity\": 0.0001,\n \"timeInForce\": \"GTC\",\n \"timestamp\": \"{{ $now.toMillis() }}\"\n}"
},
"typeVersion": 3
},
{
"id": "4d43ab9f-69a8-4eb3-a700-234f480cb8d7",
"name": "Sale Query",
"type": "n8n-nodes-base.code",
"position": [
-1000,
180
],
"parameters": {
"jsCode": "// แปลง JSON object เป็น query string\nconst data = items[0].json;\n\n// วิธีที่ 1: ใช้ Object.keys() และ map()\nconst queryString = Object.keys(data)\n .map(key => `${key}=${data[key]}`)\n .join('&');\n\nreturn [{\n json: {\n queryString: queryString,\n originalData: data\n }\n}];"
},
"typeVersion": 2
},
{
"id": "684e1d96-a2ef-4075-9545-ed904c8d798a",
"name": "Execute Limit SELL",
"type": "n8n-nodes-base.httpRequest",
"position": [
-580,
180
],
"parameters": {
"url": "https://api.binance.com/api/v3/order",
"body": "={{ $json.queryString }}&signature={{ $json.signature }}",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "form-urlencoded",
"sendHeaders": true,
"specifyBody": "string",
"headerParameters": {
"parameters": [
{
"name": "X-MBX-APIKEY",
"value": "={{ $('Set Credentials').item.json.api_key }}"
}
]
}
},
"typeVersion": 3
},
{
"id": "96ca7f7d-e60d-4944-80ec-c2b9ba02876a",
"name": "Execute Limit BUY",
"type": "n8n-nodes-base.httpRequest",
"position": [
-580,
0
],
"parameters": {
"url": "https://api.binance.com/api/v3/order",
"body": "={{ $json.queryString }}&signature={{ $json.signature }}",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "form-urlencoded",
"sendHeaders": true,
"specifyBody": "string",
"headerParameters": {
"parameters": [
{
"name": "X-MBX-APIKEY",
"value": "={{ $('Set Credentials').item.json.api_key }}"
}
]
}
},
"typeVersion": 3
},
{
"id": "b13d8b19-0222-45fe-9558-b33aeffa2bc1",
"name": "Market Buy Query",
"type": "n8n-nodes-base.code",
"position": [
-1000,
360
],
"parameters": {
"jsCode": "// แปลง JSON object เป็น query string\nconst data = items[0].json;\n\n// วิธีที่ 1: ใช้ Object.keys() และ map()\nconst queryString = Object.keys(data)\n .map(key => `${key}=${data[key]}`)\n .join('&');\n\nreturn [{\n json: {\n queryString: queryString,\n originalData: data\n }\n}];"
},
"typeVersion": 2
},
{
"id": "4fb1f7a5-9a70-4870-bfd7-5575d587cb43",
"name": "MarketBuy Parameter",
"type": "n8n-nodes-base.set",
"position": [
-1200,
360
],
"parameters": {
"mode": "raw",
"include": "none",
"options": {},
"jsonOutput": "={\n \"symbol\": \"BTCUSDT\",\n \"side\": \"BUY\",\n \"type\": \"MARKET\",\n \"quantity\": 0.0001,\n \"timestamp\": \"{{ $now.toMillis() }}\"\n}"
},
"typeVersion": 3
},
{
"id": "b4e45c9e-5a1c-4cf0-aed3-30520bf92cb9",
"name": "Signature MarketBuy",
"type": "n8n-nodes-base.crypto",
"position": [
-800,
360
],
"parameters": {
"type": "SHA256",
"value": "={{ $json.queryString }}",
"action": "hmac",
"secret": "={{ $('Set Credentials').item.json.api_secret }}",
"dataPropertyName": "signature"
},
"typeVersion": 1
},
{
"id": "4c9f4a4d-049e-431d-b053-a694698bd0ba",
"name": "Signature Limit BUY",
"type": "n8n-nodes-base.crypto",
"position": [
-800,
0
],
"parameters": {
"type": "SHA256",
"value": "={{ $json.queryString }}",
"action": "hmac",
"secret": "={{ $('Set Credentials').item.json.api_secret }}",
"dataPropertyName": "signature"
},
"typeVersion": 1
},
{
"id": "5c148d9e-c980-4485-944e-9535ca79d7af",
"name": "Signature Limit SELL",
"type": "n8n-nodes-base.crypto",
"position": [
-800,
180
],
"parameters": {
"type": "SHA256",
"value": "={{ $json.queryString }}",
"action": "hmac",
"secret": "={{ $('Set Credentials').item.json.api_secret }}",
"dataPropertyName": "signature"
},
"typeVersion": 1
},
{
"id": "d519fced-aaca-4dfb-bae0-818491d9791f",
"name": "Execute MarketBuy",
"type": "n8n-nodes-base.httpRequest",
"position": [
-580,
360
],
"parameters": {
"url": "https://api.binance.com/api/v3/order",
"body": "={{ $json.queryString }}&signature={{ $json.signature }}",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "form-urlencoded",
"sendHeaders": true,
"specifyBody": "string",
"headerParameters": {
"parameters": [
{
"name": "X-MBX-APIKEY",
"value": "={{ $('Set Credentials').item.json.api_key }}"
}
]
}
},
"typeVersion": 3
},
{
"id": "916751cf-0525-4d7e-b6ee-6412beecf870",
"name": "MarketSell Parameter",
"type": "n8n-nodes-base.set",
"position": [
-1200,
560
],
"parameters": {
"mode": "raw",
"include": "none",
"options": {},
"jsonOutput": "={\n \"symbol\": \"BTCUSDT\",\n \"side\": \"SELL\",\n \"type\": \"MARKET\",\n \"quantity\": 0.0001,\n \"timestamp\": \"{{ $now.toMillis() }}\"\n}"
},
"typeVersion": 3
},
{
"id": "0e03892e-4c5d-4a7c-9bff-acc014fbff03",
"name": "Market Sell Query",
"type": "n8n-nodes-base.code",
"position": [
-1000,
560
],
"parameters": {
"jsCode": "// แปลง JSON object เป็น query string\nconst data = items[0].json;\n\n// วิธีที่ 1: ใช้ Object.keys() และ map()\nconst queryString = Object.keys(data)\n .map(key => `${key}=${data[key]}`)\n .join('&');\n\nreturn [{\n json: {\n queryString: queryString,\n originalData: data\n }\n}];"
},
"typeVersion": 2
},
{
"id": "493074d1-7a6d-4b63-956d-55cda01e885d",
"name": "Signature MarketSell",
"type": "n8n-nodes-base.crypto",
"position": [
-800,
560
],
"parameters": {
"type": "SHA256",
"value": "={{ $json.queryString }}",
"action": "hmac",
"secret": "={{ $('Set Credentials').item.json.api_secret }}",
"dataPropertyName": "signature"
},
"typeVersion": 1
},
{
"id": "537afa17-ac5e-4d73-ac9c-ceabc644cc22",
"name": "Execute MarketSell",
"type": "n8n-nodes-base.httpRequest",
"position": [
-580,
560
],
"parameters": {
"url": "https://api.binance.com/api/v3/order",
"body": "={{ $json.queryString }}&signature={{ $json.signature }}",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "form-urlencoded",
"sendHeaders": true,
"specifyBody": "string",
"headerParameters": {
"parameters": [
{
"name": "X-MBX-APIKEY",
"value": "={{ $('Set Credentials').item.json.api_key }}"
}
]
}
},
"typeVersion": 3
},
{
"id": "877a0eb7-866b-4c73-bbee-cb5b9e49b786",
"name": "OpenOrder Query",
"type": "n8n-nodes-base.code",
"position": [
-1000,
760
],
"parameters": {
"jsCode": "// แปลง JSON object เป็น query string\nconst data = items[0].json;\n\n// วิธีที่ 1: ใช้ Object.keys() และ map()\nconst queryString = Object.keys(data)\n .map(key => `${key}=${data[key]}`)\n .join('&');\n\nreturn [{\n json: {\n queryString: queryString,\n originalData: data\n }\n}];"
},
"typeVersion": 2
},
{
"id": "641c40ab-e673-4acd-8a48-5d7592800da2",
"name": "Open Orders Params",
"type": "n8n-nodes-base.set",
"position": [
-1200,
760
],
"parameters": {
"mode": "raw",
"include": "none",
"options": {},
"jsonOutput": "={\n \"timestamp\": \"{{ $now.toMillis() }}\",\n \"symbol\": \"BTCUSDT\",\n \"recvWindow\": 2000\n}\n"
},
"typeVersion": 3
},
{
"id": "d0457455-134c-4425-bbbc-b4e1c3eedccf",
"name": "Signature OpenOrder",
"type": "n8n-nodes-base.crypto",
"position": [
-800,
760
],
"parameters": {
"type": "SHA256",
"value": "={{ $json.queryString }}",
"action": "hmac",
"secret": "={{ $('Set Credentials').item.json.api_secret }}",
"dataPropertyName": "signature"
},
"typeVersion": 1
},
{
"id": "3e8f723a-22ae-418c-9def-f95588d51080",
"name": "Get Open Orders",
"type": "n8n-nodes-base.httpRequest",
"position": [
-580,
760
],
"parameters": {
"url": "=https://api.binance.com/api/v3/openOrders?{{ $json.queryString }}",
"options": {},
"sendQuery": true,
"sendHeaders": true,
"queryParameters": {
"parameters": [
{
"name": "signature",
"value": "={{ $json.signature }}"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "X-MBX-APIKEY",
"value": "={{ $('Set Credentials').item.json.api_key }}"
}
]
}
},
"typeVersion": 3
},
{
"id": "4c65712a-2a49-4dd6-b346-1b61fbfed417",
"name": "Cancel All Order Params",
"type": "n8n-nodes-base.set",
"position": [
-1200,
960
],
"parameters": {
"mode": "raw",
"include": "none",
"options": {},
"jsonOutput": "={\n \"timestamp\": \"{{ $now.toMillis() }}\",\n \"symbol\": \"BTCUSDT\",\n \"recvWindow\": 2000\n}\n"
},
"typeVersion": 3
},
{
"id": "cde8a4d3-678a-464f-886b-763982ebfe01",
"name": "CancelAllOrder Query",
"type": "n8n-nodes-base.code",
"position": [
-1000,
960
],
"parameters": {
"jsCode": "// แปลง JSON object เป็น query string\nconst data = items[0].json;\n\n// วิธีที่ 1: ใช้ Object.keys() และ map()\nconst queryString = Object.keys(data)\n .map(key => `${key}=${data[key]}`)\n .join('&');\n\nreturn [{\n json: {\n queryString: queryString,\n originalData: data\n }\n}];"
},
"typeVersion": 2
},
{
"id": "bcb50ec1-cf95-464d-989f-e5c577b6695f",
"name": "Signature Cancel All Order",
"type": "n8n-nodes-base.crypto",
"position": [
-800,
960
],
"parameters": {
"type": "SHA256",
"value": "={{ $json.queryString }}",
"action": "hmac",
"secret": "={{ $('Set Credentials').item.json.api_secret }}",
"dataPropertyName": "signature"
},
"typeVersion": 1
},
{
"id": "2ceec541-944d-42c8-b36d-dee7abef0a26",
"name": "Cancell All Order",
"type": "n8n-nodes-base.httpRequest",
"position": [
-580,
960
],
"parameters": {
"url": "=https://api.binance.com/api/v3/openOrders",
"body": "={{ $json.queryString }}",
"method": "DELETE",
"options": {},
"sendBody": true,
"sendQuery": true,
"contentType": "form-urlencoded",
"sendHeaders": true,
"specifyBody": "string",
"queryParameters": {
"parameters": [
{
"name": "signature",
"value": "={{ $json.signature }}"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "X-MBX-APIKEY",
"value": "={{ $('Set Credentials').item.json.api_key }}"
}
]
}
},
"typeVersion": 3
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "9625a34a-ecfe-42fd-adef-c57e036d3d7d",
"connections": {
"4d43ab9f-69a8-4eb3-a700-234f480cb8d7": {
"main": [
[
{
"node": "5c148d9e-c980-4485-944e-9535ca79d7af",
"type": "main",
"index": 0
}
]
]
},
"57699751-49fa-4420-aa5a-291bc11fa631": {
"main": [
[
{
"node": "4c9f4a4d-049e-431d-b053-a694698bd0ba",
"type": "main",
"index": 0
}
]
]
},
"877a0eb7-866b-4c73-bbee-cb5b9e49b786": {
"main": [
[
{
"node": "d0457455-134c-4425-bbbc-b4e1c3eedccf",
"type": "main",
"index": 0
}
]
]
},
"94a537dd-b59d-49cd-9daf-848a22df9e8d": {
"main": [
[
{
"node": "250640b9-95f7-48b7-bf1d-07fc90026bee",
"type": "main",
"index": 0
}
]
]
},
"b13d8b19-0222-45fe-9558-b33aeffa2bc1": {
"main": [
[
{
"node": "b4e45c9e-5a1c-4cf0-aed3-30520bf92cb9",
"type": "main",
"index": 0
}
]
]
},
"92ff9826-2f60-4d35-8c58-30b483db49d6": {
"main": [
[
{
"node": "57699751-49fa-4420-aa5a-291bc11fa631",
"type": "main",
"index": 0
}
]
]
},
"0e03892e-4c5d-4a7c-9bff-acc014fbff03": {
"main": [
[
{
"node": "493074d1-7a6d-4b63-956d-55cda01e885d",
"type": "main",
"index": 0
}
]
]
},
"250640b9-95f7-48b7-bf1d-07fc90026bee": {
"main": [
[
{
"node": "4983062d-1e68-4f15-a4d2-955fc81267b5",
"type": "main",
"index": 0
}
]
]
},
"4983062d-1e68-4f15-a4d2-955fc81267b5": {
"main": [
[
{
"node": "6dcb5a49-149d-4f62-bb69-137cec92f81f",
"type": "main",
"index": 0
}
]
]
},
"641c40ab-e673-4acd-8a48-5d7592800da2": {
"main": [
[
{
"node": "877a0eb7-866b-4c73-bbee-cb5b9e49b786",
"type": "main",
"index": 0
}
]
]
},
"9a3e31fc-7da7-48dc-8758-4d109addea56": {
"main": [
[
{
"node": "4d43ab9f-69a8-4eb3-a700-234f480cb8d7",
"type": "main",
"index": 0
}
]
]
},
"4fb1f7a5-9a70-4870-bfd7-5575d587cb43": {
"main": [
[
{
"node": "b13d8b19-0222-45fe-9558-b33aeffa2bc1",
"type": "main",
"index": 0
}
]
]
},
"4c9f4a4d-049e-431d-b053-a694698bd0ba": {
"main": [
[
{
"node": "96ca7f7d-e60d-4944-80ec-c2b9ba02876a",
"type": "main",
"index": 0
}
]
]
},
"b4e45c9e-5a1c-4cf0-aed3-30520bf92cb9": {
"main": [
[
{
"node": "d519fced-aaca-4dfb-bae0-818491d9791f",
"type": "main",
"index": 0
}
]
]
},
"d0457455-134c-4425-bbbc-b4e1c3eedccf": {
"main": [
[
{
"node": "3e8f723a-22ae-418c-9def-f95588d51080",
"type": "main",
"index": 0
}
]
]
},
"cde8a4d3-678a-464f-886b-763982ebfe01": {
"main": [
[
{
"node": "bcb50ec1-cf95-464d-989f-e5c577b6695f",
"type": "main",
"index": 0
}
]
]
},
"916751cf-0525-4d7e-b6ee-6412beecf870": {
"main": [
[
{
"node": "0e03892e-4c5d-4a7c-9bff-acc014fbff03",
"type": "main",
"index": 0
}
]
]
},
"5c148d9e-c980-4485-944e-9535ca79d7af": {
"main": [
[
{
"node": "684e1d96-a2ef-4075-9545-ed904c8d798a",
"type": "main",
"index": 0
}
]
]
},
"493074d1-7a6d-4b63-956d-55cda01e885d": {
"main": [
[
{
"node": "537afa17-ac5e-4d73-ac9c-ceabc644cc22",
"type": "main",
"index": 0
}
]
]
},
"6dcb5a49-149d-4f62-bb69-137cec92f81f": {
"main": [
[
{
"node": "9850ff29-6d6a-4fcc-bcc9-ed14c0fe1e7b",
"type": "main",
"index": 0
}
]
]
},
"4c65712a-2a49-4dd6-b346-1b61fbfed417": {
"main": [
[
{
"node": "cde8a4d3-678a-464f-886b-763982ebfe01",
"type": "main",
"index": 0
}
]
]
},
"bcb50ec1-cf95-464d-989f-e5c577b6695f": {
"main": [
[
{
"node": "2ceec541-944d-42c8-b36d-dee7abef0a26",
"type": "main",
"index": 0
}
]
]
},
"93a8429c-b9ef-43de-934b-2c6fd9db1bb3": {
"main": [
[
{
"node": "94a537dd-b59d-49cd-9daf-848a22df9e8d",
"type": "main",
"index": 0
}
]
]
}
}
}Comment utiliser ce workflow ?
Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.
Dans quelles scénarios ce workflow est-il adapté ?
Avancé - Finance
Est-ce payant ?
Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.
Workflows recommandés
Todsaporn Sangboon
@nolifeloverTeaching AI & Automation for devs, teams & business owners. Sharing real-world workflows & tools to work smarter with n8n. Follow for weekly tips — Diary of a Dev 🧠✨
Partager ce workflow