@n8njimmy/n8n-nodes-binance 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +19 -0
- package/README.md +26 -0
- package/dist/credentials/BinanceApi.credentials.d.ts +6 -0
- package/dist/credentials/BinanceApi.credentials.js +31 -0
- package/dist/credentials/BinanceApi.credentials.js.map +1 -0
- package/dist/nodes/Binance/Binance.node.d.ts +10 -0
- package/dist/nodes/Binance/Binance.node.js +31 -0
- package/dist/nodes/Binance/Binance.node.js.map +1 -0
- package/dist/nodes/Binance/Binance.node.json +10 -0
- package/dist/nodes/Binance/Binance.svg +14 -0
- package/dist/nodes/Binance/BinanceTrigger.node.d.ts +10 -0
- package/dist/nodes/Binance/BinanceTrigger.node.js +31 -0
- package/dist/nodes/Binance/BinanceTrigger.node.js.map +1 -0
- package/dist/nodes/Binance/actions/binance.execute.d.ts +3 -0
- package/dist/nodes/Binance/actions/binance.execute.js +63 -0
- package/dist/nodes/Binance/actions/binance.execute.js.map +1 -0
- package/dist/nodes/Binance/actions/binance.properties.d.ts +2 -0
- package/dist/nodes/Binance/actions/binance.properties.js +60 -0
- package/dist/nodes/Binance/actions/binance.properties.js.map +1 -0
- package/dist/nodes/Binance/actions/custom/custom.execute.d.ts +3 -0
- package/dist/nodes/Binance/actions/custom/custom.execute.js +38 -0
- package/dist/nodes/Binance/actions/custom/custom.execute.js.map +1 -0
- package/dist/nodes/Binance/actions/custom/custom.properties.d.ts +2 -0
- package/dist/nodes/Binance/actions/custom/custom.properties.js +51 -0
- package/dist/nodes/Binance/actions/custom/custom.properties.js.map +1 -0
- package/dist/nodes/Binance/actions/custom/function/function.execute.d.ts +3 -0
- package/dist/nodes/Binance/actions/custom/function/function.execute.js +18 -0
- package/dist/nodes/Binance/actions/custom/function/function.execute.js.map +1 -0
- package/dist/nodes/Binance/actions/custom/function/function.properties.d.ts +2 -0
- package/dist/nodes/Binance/actions/custom/function/function.properties.js +33 -0
- package/dist/nodes/Binance/actions/custom/function/function.properties.js.map +1 -0
- package/dist/nodes/Binance/actions/custom/function/index.d.ts +2 -0
- package/dist/nodes/Binance/actions/custom/function/index.js +19 -0
- package/dist/nodes/Binance/actions/custom/function/index.js.map +1 -0
- package/dist/nodes/Binance/actions/custom/index.d.ts +2 -0
- package/dist/nodes/Binance/actions/custom/index.js +19 -0
- package/dist/nodes/Binance/actions/custom/index.js.map +1 -0
- package/dist/nodes/Binance/actions/future/account/execute.d.ts +3 -0
- package/dist/nodes/Binance/actions/future/account/execute.js +15 -0
- package/dist/nodes/Binance/actions/future/account/execute.js.map +1 -0
- package/dist/nodes/Binance/actions/future/account/index.d.ts +2 -0
- package/dist/nodes/Binance/actions/future/account/index.js +19 -0
- package/dist/nodes/Binance/actions/future/account/index.js.map +1 -0
- package/dist/nodes/Binance/actions/future/account/properties.d.ts +2 -0
- package/dist/nodes/Binance/actions/future/account/properties.js +5 -0
- package/dist/nodes/Binance/actions/future/account/properties.js.map +1 -0
- package/dist/nodes/Binance/actions/future/candle/candle.execute.d.ts +3 -0
- package/dist/nodes/Binance/actions/future/candle/candle.execute.js +36 -0
- package/dist/nodes/Binance/actions/future/candle/candle.execute.js.map +1 -0
- package/dist/nodes/Binance/actions/future/candle/candle.properties.d.ts +2 -0
- package/dist/nodes/Binance/actions/future/candle/candle.properties.js +68 -0
- package/dist/nodes/Binance/actions/future/candle/candle.properties.js.map +1 -0
- package/dist/nodes/Binance/actions/future/candle/index.d.ts +2 -0
- package/dist/nodes/Binance/actions/future/candle/index.js +19 -0
- package/dist/nodes/Binance/actions/future/candle/index.js.map +1 -0
- package/dist/nodes/Binance/actions/future/exchange/exchange.execute.d.ts +3 -0
- package/dist/nodes/Binance/actions/future/exchange/exchange.execute.js +19 -0
- package/dist/nodes/Binance/actions/future/exchange/exchange.execute.js.map +1 -0
- package/dist/nodes/Binance/actions/future/exchange/exchange.properties.d.ts +2 -0
- package/dist/nodes/Binance/actions/future/exchange/exchange.properties.js +20 -0
- package/dist/nodes/Binance/actions/future/exchange/exchange.properties.js.map +1 -0
- package/dist/nodes/Binance/actions/future/exchange/index.d.ts +2 -0
- package/dist/nodes/Binance/actions/future/exchange/index.js +19 -0
- package/dist/nodes/Binance/actions/future/exchange/index.js.map +1 -0
- package/dist/nodes/Binance/actions/future/future.execute.d.ts +3 -0
- package/dist/nodes/Binance/actions/future/future.execute.js +56 -0
- package/dist/nodes/Binance/actions/future/future.execute.js.map +1 -0
- package/dist/nodes/Binance/actions/future/future.properties.d.ts +2 -0
- package/dist/nodes/Binance/actions/future/future.properties.js +99 -0
- package/dist/nodes/Binance/actions/future/future.properties.js.map +1 -0
- package/dist/nodes/Binance/actions/future/index.d.ts +2 -0
- package/dist/nodes/Binance/actions/future/index.js +19 -0
- package/dist/nodes/Binance/actions/future/index.js.map +1 -0
- package/dist/nodes/Binance/actions/future/leverage/index.d.ts +2 -0
- package/dist/nodes/Binance/actions/future/leverage/index.js +19 -0
- package/dist/nodes/Binance/actions/future/leverage/index.js.map +1 -0
- package/dist/nodes/Binance/actions/future/leverage/leverage.execute.d.ts +3 -0
- package/dist/nodes/Binance/actions/future/leverage/leverage.execute.js +28 -0
- package/dist/nodes/Binance/actions/future/leverage/leverage.execute.js.map +1 -0
- package/dist/nodes/Binance/actions/future/leverage/leverage.properties.d.ts +2 -0
- package/dist/nodes/Binance/actions/future/leverage/leverage.properties.js +50 -0
- package/dist/nodes/Binance/actions/future/leverage/leverage.properties.js.map +1 -0
- package/dist/nodes/Binance/actions/future/order/index.d.ts +2 -0
- package/dist/nodes/Binance/actions/future/order/index.js +19 -0
- package/dist/nodes/Binance/actions/future/order/index.js.map +1 -0
- package/dist/nodes/Binance/actions/future/order/order.execute.d.ts +3 -0
- package/dist/nodes/Binance/actions/future/order/order.execute.js +48 -0
- package/dist/nodes/Binance/actions/future/order/order.execute.js.map +1 -0
- package/dist/nodes/Binance/actions/future/order/order.properties.d.ts +2 -0
- package/dist/nodes/Binance/actions/future/order/order.properties.js +103 -0
- package/dist/nodes/Binance/actions/future/order/order.properties.js.map +1 -0
- package/dist/nodes/Binance/actions/future/position/index.d.ts +2 -0
- package/dist/nodes/Binance/actions/future/position/index.js +19 -0
- package/dist/nodes/Binance/actions/future/position/index.js.map +1 -0
- package/dist/nodes/Binance/actions/future/position/position.execute.d.ts +3 -0
- package/dist/nodes/Binance/actions/future/position/position.execute.js +16 -0
- package/dist/nodes/Binance/actions/future/position/position.execute.js.map +1 -0
- package/dist/nodes/Binance/actions/future/position/position.properties.d.ts +2 -0
- package/dist/nodes/Binance/actions/future/position/position.properties.js +20 -0
- package/dist/nodes/Binance/actions/future/position/position.properties.js.map +1 -0
- package/dist/nodes/Binance/actions/future/statistics/index.d.ts +2 -0
- package/dist/nodes/Binance/actions/future/statistics/index.js +19 -0
- package/dist/nodes/Binance/actions/future/statistics/index.js.map +1 -0
- package/dist/nodes/Binance/actions/future/statistics/statistics.execute.d.ts +3 -0
- package/dist/nodes/Binance/actions/future/statistics/statistics.execute.js +16 -0
- package/dist/nodes/Binance/actions/future/statistics/statistics.execute.js.map +1 -0
- package/dist/nodes/Binance/actions/future/statistics/statistics.properties.d.ts +2 -0
- package/dist/nodes/Binance/actions/future/statistics/statistics.properties.js +20 -0
- package/dist/nodes/Binance/actions/future/statistics/statistics.properties.js.map +1 -0
- package/dist/nodes/Binance/actions/spot/account/execute.d.ts +3 -0
- package/dist/nodes/Binance/actions/spot/account/execute.js +15 -0
- package/dist/nodes/Binance/actions/spot/account/execute.js.map +1 -0
- package/dist/nodes/Binance/actions/spot/account/index.d.ts +2 -0
- package/dist/nodes/Binance/actions/spot/account/index.js +19 -0
- package/dist/nodes/Binance/actions/spot/account/index.js.map +1 -0
- package/dist/nodes/Binance/actions/spot/account/properties.d.ts +2 -0
- package/dist/nodes/Binance/actions/spot/account/properties.js +5 -0
- package/dist/nodes/Binance/actions/spot/account/properties.js.map +1 -0
- package/dist/nodes/Binance/actions/spot/candle/candle.execute.d.ts +3 -0
- package/dist/nodes/Binance/actions/spot/candle/candle.execute.js +39 -0
- package/dist/nodes/Binance/actions/spot/candle/candle.execute.js.map +1 -0
- package/dist/nodes/Binance/actions/spot/candle/candle.properties.d.ts +2 -0
- package/dist/nodes/Binance/actions/spot/candle/candle.properties.js +68 -0
- package/dist/nodes/Binance/actions/spot/candle/candle.properties.js.map +1 -0
- package/dist/nodes/Binance/actions/spot/candle/index.d.ts +2 -0
- package/dist/nodes/Binance/actions/spot/candle/index.js +19 -0
- package/dist/nodes/Binance/actions/spot/candle/index.js.map +1 -0
- package/dist/nodes/Binance/actions/spot/exchange/exchange.execute.d.ts +3 -0
- package/dist/nodes/Binance/actions/spot/exchange/exchange.execute.js +16 -0
- package/dist/nodes/Binance/actions/spot/exchange/exchange.execute.js.map +1 -0
- package/dist/nodes/Binance/actions/spot/exchange/exchange.properties.d.ts +2 -0
- package/dist/nodes/Binance/actions/spot/exchange/exchange.properties.js +21 -0
- package/dist/nodes/Binance/actions/spot/exchange/exchange.properties.js.map +1 -0
- package/dist/nodes/Binance/actions/spot/exchange/index.d.ts +2 -0
- package/dist/nodes/Binance/actions/spot/exchange/index.js +19 -0
- package/dist/nodes/Binance/actions/spot/exchange/index.js.map +1 -0
- package/dist/nodes/Binance/actions/spot/index.d.ts +2 -0
- package/dist/nodes/Binance/actions/spot/index.js +19 -0
- package/dist/nodes/Binance/actions/spot/index.js.map +1 -0
- package/dist/nodes/Binance/actions/spot/order/index.d.ts +2 -0
- package/dist/nodes/Binance/actions/spot/order/index.js +19 -0
- package/dist/nodes/Binance/actions/spot/order/index.js.map +1 -0
- package/dist/nodes/Binance/actions/spot/order/order.execute.d.ts +3 -0
- package/dist/nodes/Binance/actions/spot/order/order.execute.js +29 -0
- package/dist/nodes/Binance/actions/spot/order/order.execute.js.map +1 -0
- package/dist/nodes/Binance/actions/spot/order/order.properties.d.ts +2 -0
- package/dist/nodes/Binance/actions/spot/order/order.properties.js +58 -0
- package/dist/nodes/Binance/actions/spot/order/order.properties.js.map +1 -0
- package/dist/nodes/Binance/actions/spot/spot.execute.d.ts +3 -0
- package/dist/nodes/Binance/actions/spot/spot.execute.js +47 -0
- package/dist/nodes/Binance/actions/spot/spot.execute.js.map +1 -0
- package/dist/nodes/Binance/actions/spot/spot.properties.d.ts +2 -0
- package/dist/nodes/Binance/actions/spot/spot.properties.js +75 -0
- package/dist/nodes/Binance/actions/spot/spot.properties.js.map +1 -0
- package/dist/nodes/Binance/interface.d.ts +17 -0
- package/dist/nodes/Binance/interface.js +3 -0
- package/dist/nodes/Binance/interface.js.map +1 -0
- package/dist/nodes/Binance/methods/index.d.ts +1 -0
- package/dist/nodes/Binance/methods/index.js +28 -0
- package/dist/nodes/Binance/methods/index.js.map +1 -0
- package/dist/nodes/Binance/methods/loadOptions.d.ts +4 -0
- package/dist/nodes/Binance/methods/loadOptions.js +49 -0
- package/dist/nodes/Binance/methods/loadOptions.js.map +1 -0
- package/dist/nodes/Binance/triggers/binance.properties.d.ts +2 -0
- package/dist/nodes/Binance/triggers/binance.properties.js +46 -0
- package/dist/nodes/Binance/triggers/binance.properties.js.map +1 -0
- package/dist/nodes/Binance/triggers/binance.trigger.d.ts +3 -0
- package/dist/nodes/Binance/triggers/binance.trigger.js +42 -0
- package/dist/nodes/Binance/triggers/binance.trigger.js.map +1 -0
- package/dist/nodes/Binance/triggers/candle/candle.properties.d.ts +2 -0
- package/dist/nodes/Binance/triggers/candle/candle.properties.js +54 -0
- package/dist/nodes/Binance/triggers/candle/candle.properties.js.map +1 -0
- package/dist/nodes/Binance/triggers/candle/candle.trigger.d.ts +3 -0
- package/dist/nodes/Binance/triggers/candle/candle.trigger.js +47 -0
- package/dist/nodes/Binance/triggers/candle/candle.trigger.js.map +1 -0
- package/dist/nodes/Binance/triggers/candle/index.d.ts +2 -0
- package/dist/nodes/Binance/triggers/candle/index.js +19 -0
- package/dist/nodes/Binance/triggers/candle/index.js.map +1 -0
- package/dist/package.json +69 -0
- package/index.js +0 -0
- package/package.json +69 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.properties = void 0;
|
|
4
|
+
exports.properties = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Symbol Names or IDs',
|
|
7
|
+
name: 'symbols',
|
|
8
|
+
type: 'multiOptions',
|
|
9
|
+
required: true,
|
|
10
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
|
11
|
+
displayOptions: {
|
|
12
|
+
show: { resource: ['trigger'], operation: ['candle'] },
|
|
13
|
+
},
|
|
14
|
+
typeOptions: {
|
|
15
|
+
loadOptionsMethod: 'getSymbols',
|
|
16
|
+
},
|
|
17
|
+
options: [],
|
|
18
|
+
default: [],
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
displayName: 'Interval Name or ID',
|
|
22
|
+
name: 'interval',
|
|
23
|
+
type: 'options',
|
|
24
|
+
required: true,
|
|
25
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
|
26
|
+
displayOptions: {
|
|
27
|
+
show: { resource: ['trigger'], operation: ['candle'] },
|
|
28
|
+
},
|
|
29
|
+
typeOptions: {
|
|
30
|
+
loadOptionsMethod: 'getIntervals',
|
|
31
|
+
},
|
|
32
|
+
options: [],
|
|
33
|
+
default: '',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
displayName: 'Percent Threshold',
|
|
37
|
+
name: 'percentThreshold',
|
|
38
|
+
type: 'number',
|
|
39
|
+
default: 0,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
displayName: 'TimeThreshold',
|
|
43
|
+
name: 'timeThreshold',
|
|
44
|
+
type: 'number',
|
|
45
|
+
default: 0,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
displayName: 'Is Final',
|
|
49
|
+
name: 'isFinal',
|
|
50
|
+
type: 'boolean',
|
|
51
|
+
default: false,
|
|
52
|
+
},
|
|
53
|
+
];
|
|
54
|
+
//# sourceMappingURL=candle.properties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"candle.properties.js","sourceRoot":"","sources":["../../../../../nodes/Binance/triggers/candle/candle.properties.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAsB;IAC5C;QACC,WAAW,EAAE,qBAAqB;QAClC,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,cAAc;QACpB,QAAQ,EAAE,IAAI;QACd,WAAW,EACV,iPAAiP;QAClP,cAAc,EAAE;YACf,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE;SACtD;QACD,WAAW,EAAE;YACZ,iBAAiB,EAAE,YAAY;SAC/B;QACD,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,EAAE;KACX;IACD;QACC,WAAW,EAAE,qBAAqB;QAClC,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,IAAI;QACd,WAAW,EACV,yHAAyH;QAC1H,cAAc,EAAE;YACf,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE;SACtD;QACD,WAAW,EAAE;YACZ,iBAAiB,EAAE,cAAc;SACjC;QACD,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,EAAE;KACX;IACD;QACC,WAAW,EAAE,mBAAmB;QAChC,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,CAAC;KACV;IACD;QACC,WAAW,EAAE,eAAe;QAC5B,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,CAAC;KACV;IACD;QACC,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,KAAK;KACd;CACD,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.trigger = void 0;
|
|
7
|
+
const binance_api_node_1 = __importDefault(require("binance-api-node"));
|
|
8
|
+
async function trigger() {
|
|
9
|
+
const credentials = await this.getCredentials('binanceApi');
|
|
10
|
+
const binanceClient = (0, binance_api_node_1.default)(credentials);
|
|
11
|
+
const symbols = this.getNodeParameter('symbols');
|
|
12
|
+
const interval = this.getNodeParameter('interval');
|
|
13
|
+
const percentThreshold = this.getNodeParameter('percentThreshold');
|
|
14
|
+
const timeThreshold = this.getNodeParameter('timeThreshold');
|
|
15
|
+
const isFinal = this.getNodeParameter('isFinal');
|
|
16
|
+
const waiters = {};
|
|
17
|
+
const executeTrigger = (data) => {
|
|
18
|
+
this.emit([this.helpers.returnJsonArray([data])]);
|
|
19
|
+
};
|
|
20
|
+
const ws = binanceClient.ws.futuresCandles(symbols, interval, (ticker) => {
|
|
21
|
+
if (isFinal && ticker.isFinal) {
|
|
22
|
+
executeTrigger(ticker);
|
|
23
|
+
}
|
|
24
|
+
if (percentThreshold > 0 && timeThreshold > 0) {
|
|
25
|
+
const open = Number(ticker.open);
|
|
26
|
+
const close = Number(ticker.close);
|
|
27
|
+
const percent = Math.abs(close - open) / Math.min(close, open);
|
|
28
|
+
const waitTime = Date.now() - (waiters[ticker.symbol] || 0);
|
|
29
|
+
if (percent > percentThreshold && waitTime > timeThreshold) {
|
|
30
|
+
waiters[ticker.symbol] = Date.now();
|
|
31
|
+
executeTrigger(ticker);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
async function closeFunction() {
|
|
36
|
+
ws();
|
|
37
|
+
}
|
|
38
|
+
async function manualTriggerFunction() {
|
|
39
|
+
executeTrigger({});
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
closeFunction,
|
|
43
|
+
manualTriggerFunction,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
exports.trigger = trigger;
|
|
47
|
+
//# sourceMappingURL=candle.trigger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"candle.trigger.js","sourceRoot":"","sources":["../../../../../nodes/Binance/triggers/candle/candle.trigger.ts"],"names":[],"mappings":";;;;;;AACA,wEAA6C;AAGtC,KAAK,UAAU,OAAO;IAC5B,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;IAC5D,MAAM,aAAa,GAAG,IAAA,0BAAa,EAAC,WAAW,CAAC,CAAC;IAEjD,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAa,CAAC;IAC7D,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAW,CAAC;IAC7D,MAAM,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAW,CAAC;IAC7E,MAAM,aAAa,GAAG,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAW,CAAC;IACvE,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAY,CAAC;IAE5D,MAAM,OAAO,GAAQ,EAAE,CAAC;IAExB,MAAM,cAAc,GAAG,CAAC,IAAS,EAAE,EAAE;QACpC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACnD,CAAC,CAAC;IAEF,MAAM,EAAE,GAAG,aAAa,CAAC,EAAE,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE;QACxE,IAAI,OAAO,IAAI,MAAM,CAAC,OAAO,EAAE;YAC9B,cAAc,CAAC,MAAM,CAAC,CAAC;SACvB;QAED,IAAI,gBAAgB,GAAG,CAAC,IAAI,aAAa,GAAG,CAAC,EAAE;YAC9C,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACjC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAEnC,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YAC/D,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;YAE5D,IAAI,OAAO,GAAG,gBAAgB,IAAI,QAAQ,GAAG,aAAa,EAAE;gBAC3D,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;gBACpC,cAAc,CAAC,MAAM,CAAC,CAAC;aACvB;SACD;IACF,CAAC,CAAC,CAAC;IAEH,KAAK,UAAU,aAAa;QAC3B,EAAE,EAAE,CAAC;IACN,CAAC;IAED,KAAK,UAAU,qBAAqB;QACnC,cAAc,CAAC,EAAE,CAAC,CAAC;IACpB,CAAC;IAED,OAAO;QACN,aAAa;QACb,qBAAqB;KACrB,CAAC;AACH,CAAC;AA/CD,0BA+CC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./candle.trigger"), exports);
|
|
18
|
+
__exportStar(require("./candle.properties"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Binance/triggers/candle/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,sDAAoC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@n8njimmy/n8n-nodes-binance",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "N8N nodes for Binance Exchange",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"n8n-community-node-package"
|
|
7
|
+
],
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"homepage": "",
|
|
10
|
+
"author": {
|
|
11
|
+
"name": "Seungho Lee",
|
|
12
|
+
"email": "jimmylee871124@gmail.com"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/jimmylegendary/n8n-nodes-binance.git"
|
|
17
|
+
},
|
|
18
|
+
"main": "index.js",
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"prebuild": "rimraf dist",
|
|
24
|
+
"build": "tsc && gulp build:icons",
|
|
25
|
+
"predev": "npm run build & npm link & npm link n8n-nodes-binance",
|
|
26
|
+
"dev": "npm run watch & npm run n8n:watch",
|
|
27
|
+
"watch": "tsc --watch",
|
|
28
|
+
"format": "prettier nodes credentials --write",
|
|
29
|
+
"n8n": "n8n start",
|
|
30
|
+
"n8n:watch": "nodemon --exec npm run n8n",
|
|
31
|
+
"lint": "tslint -p tsconfig.json -c tslint.json && eslint nodes credentials package.json",
|
|
32
|
+
"lintfix": "tslint --fix -p tsconfig.json -c tslint.json && eslint nodes credentials package.json --fix",
|
|
33
|
+
"prepublishOnly": "npm run build && npm run lint -c .eslintrc.prepublish.js nodes credentials package.json"
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist"
|
|
37
|
+
],
|
|
38
|
+
"n8n": {
|
|
39
|
+
"n8nNodesApiVersion": 1,
|
|
40
|
+
"credentials": [
|
|
41
|
+
"dist/credentials/BinanceApi.credentials.js"
|
|
42
|
+
],
|
|
43
|
+
"nodes": [
|
|
44
|
+
"dist/nodes/Binance/Binance.node.js",
|
|
45
|
+
"dist/nodes/Binance/BinanceTrigger.node.js"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@types/express": "^4.17.17",
|
|
50
|
+
"@types/request-promise-native": "~1.0.18",
|
|
51
|
+
"@typescript-eslint/parser": "^5.51.0",
|
|
52
|
+
"eslint": "^8.34.0",
|
|
53
|
+
"eslint-plugin-n8n-nodes-base": "^1.12.1",
|
|
54
|
+
"gulp": "^4.0.2",
|
|
55
|
+
"n8n": "1.32.2",
|
|
56
|
+
"n8n-core": "^0.154.1",
|
|
57
|
+
"n8n-workflow": "^0.136.1",
|
|
58
|
+
"nodemon": "^2.0.20",
|
|
59
|
+
"prettier": "^2.8.4",
|
|
60
|
+
"tslint": "^6.1.3",
|
|
61
|
+
"typescript": "~4.9.5",
|
|
62
|
+
"rimraf": "6.1.0"
|
|
63
|
+
},
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"binance-api-node": "^0.12.3",
|
|
66
|
+
"technicalindicators": "^3.1.0",
|
|
67
|
+
"typescript": "~4.9.5"
|
|
68
|
+
}
|
|
69
|
+
}
|
package/index.js
ADDED
|
File without changes
|
package/package.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@n8njimmy/n8n-nodes-binance",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "N8N nodes for Binance Exchange",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"n8n-community-node-package"
|
|
7
|
+
],
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"homepage": "",
|
|
10
|
+
"author": {
|
|
11
|
+
"name": "Seungho Lee",
|
|
12
|
+
"email": "jimmylee871124@gmail.com"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/jimmylegendary/n8n-nodes-binance.git"
|
|
17
|
+
},
|
|
18
|
+
"main": "index.js",
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"prebuild": "rimraf dist",
|
|
24
|
+
"build": "tsc && gulp build:icons",
|
|
25
|
+
"predev": "npm run build & npm link & npm link n8n-nodes-binance",
|
|
26
|
+
"dev": "npm run watch & npm run n8n:watch",
|
|
27
|
+
"watch": "tsc --watch",
|
|
28
|
+
"format": "prettier nodes credentials --write",
|
|
29
|
+
"n8n": "n8n start",
|
|
30
|
+
"n8n:watch": "nodemon --exec npm run n8n",
|
|
31
|
+
"lint": "tslint -p tsconfig.json -c tslint.json && eslint nodes credentials package.json",
|
|
32
|
+
"lintfix": "tslint --fix -p tsconfig.json -c tslint.json && eslint nodes credentials package.json --fix",
|
|
33
|
+
"prepublishOnly": "npm run build && npm run lint -c .eslintrc.prepublish.js nodes credentials package.json"
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist"
|
|
37
|
+
],
|
|
38
|
+
"n8n": {
|
|
39
|
+
"n8nNodesApiVersion": 1,
|
|
40
|
+
"credentials": [
|
|
41
|
+
"dist/credentials/BinanceApi.credentials.js"
|
|
42
|
+
],
|
|
43
|
+
"nodes": [
|
|
44
|
+
"dist/nodes/Binance/Binance.node.js",
|
|
45
|
+
"dist/nodes/Binance/BinanceTrigger.node.js"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@types/express": "^4.17.17",
|
|
50
|
+
"@types/request-promise-native": "~1.0.18",
|
|
51
|
+
"@typescript-eslint/parser": "^5.51.0",
|
|
52
|
+
"eslint": "^8.34.0",
|
|
53
|
+
"eslint-plugin-n8n-nodes-base": "^1.12.1",
|
|
54
|
+
"gulp": "^4.0.2",
|
|
55
|
+
"n8n": "1.32.2",
|
|
56
|
+
"n8n-core": "^0.154.1",
|
|
57
|
+
"n8n-workflow": "^0.136.1",
|
|
58
|
+
"nodemon": "^2.0.20",
|
|
59
|
+
"prettier": "^2.8.4",
|
|
60
|
+
"tslint": "^6.1.3",
|
|
61
|
+
"typescript": "~4.9.5",
|
|
62
|
+
"rimraf": "6.1.0"
|
|
63
|
+
},
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"binance-api-node": "^0.12.3",
|
|
66
|
+
"technicalindicators": "^3.1.0",
|
|
67
|
+
"typescript": "~4.9.5"
|
|
68
|
+
}
|
|
69
|
+
}
|