@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,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("./execute"), exports);
|
|
18
|
+
__exportStar(require("./properties"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/Binance/actions/future/account/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,+CAA6B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"properties.js","sourceRoot":"","sources":["../../../../../../nodes/Binance/actions/future/account/properties.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAA6B,EAAE,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
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.execute = void 0;
|
|
7
|
+
const binance_api_node_1 = __importDefault(require("binance-api-node"));
|
|
8
|
+
async function execute(index) {
|
|
9
|
+
const credentials = await this.getCredentials('binanceApi', index);
|
|
10
|
+
const binanceClient = (0, binance_api_node_1.default)(credentials);
|
|
11
|
+
const symbol = this.getNodeParameter('symbol', index);
|
|
12
|
+
const interval = this.getNodeParameter('interval', index);
|
|
13
|
+
const limit = this.getNodeParameter('limit', index);
|
|
14
|
+
const startTimeString = this.getNodeParameter('startTime', index);
|
|
15
|
+
const endTimeString = this.getNodeParameter('endTime', index);
|
|
16
|
+
const startTime = (startTimeString && new Date(startTimeString).getTime()) || undefined;
|
|
17
|
+
const endTime = (endTimeString && new Date(endTimeString).getTime()) || undefined;
|
|
18
|
+
const candles = await binanceClient.futuresCandles({
|
|
19
|
+
symbol,
|
|
20
|
+
interval,
|
|
21
|
+
limit,
|
|
22
|
+
startTime,
|
|
23
|
+
endTime,
|
|
24
|
+
});
|
|
25
|
+
const executionData = candles.map((candle) => ({
|
|
26
|
+
...candle,
|
|
27
|
+
open: Number(candle.open),
|
|
28
|
+
close: Number(candle.close),
|
|
29
|
+
low: Number(candle.low),
|
|
30
|
+
high: Number(candle.high),
|
|
31
|
+
volume: Number(candle.volume),
|
|
32
|
+
}));
|
|
33
|
+
return this.helpers.returnJsonArray(executionData);
|
|
34
|
+
}
|
|
35
|
+
exports.execute = execute;
|
|
36
|
+
//# sourceMappingURL=candle.execute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"candle.execute.js","sourceRoot":"","sources":["../../../../../../nodes/Binance/actions/future/candle/candle.execute.ts"],"names":[],"mappings":";;;;;;AAGA,wEAAyE;AAElE,KAAK,UAAU,OAAO,CAE5B,KAAa;IAEb,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;IACnE,MAAM,aAAa,GAAG,IAAA,0BAAa,EAAC,WAAW,CAAC,CAAC;IAEjD,MAAM,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAW,CAAC;IAChE,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,KAAK,CAA2B,CAAC;IACpF,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAW,CAAC;IAC9D,MAAM,eAAe,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,KAAK,CAAW,CAAC;IAC5E,MAAM,aAAa,GAAG,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,KAAK,CAAW,CAAC;IAExE,MAAM,SAAS,GAAG,CAAC,eAAe,IAAI,IAAI,IAAI,CAAC,eAAe,CAAC,CAAC,OAAO,EAAE,CAAC,IAAI,SAAS,CAAC;IACxF,MAAM,OAAO,GAAG,CAAC,aAAa,IAAI,IAAI,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,EAAE,CAAC,IAAI,SAAS,CAAC;IAElF,MAAM,OAAO,GAAG,MAAM,aAAa,CAAC,cAAc,CAAC;QAClD,MAAM;QACN,QAAQ;QACR,KAAK;QACL,SAAS;QACT,OAAO;KACP,CAAC,CAAC;IAEH,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAC9C,GAAG,MAAM;QACT,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;QACzB,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;QAC3B,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC;QACvB,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;QACzB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC;KAC7B,CAAC,CAAC,CAAC;IAEJ,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;AACpD,CAAC;AAlCD,0BAkCC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.properties = void 0;
|
|
4
|
+
exports.properties = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Symbol Name or ID',
|
|
7
|
+
name: 'symbol',
|
|
8
|
+
type: 'options',
|
|
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>',
|
|
11
|
+
displayOptions: {
|
|
12
|
+
show: { resource: ['future'], 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: ['future'], operation: ['candle'] },
|
|
28
|
+
},
|
|
29
|
+
typeOptions: {
|
|
30
|
+
loadOptionsMethod: 'getIntervals',
|
|
31
|
+
},
|
|
32
|
+
options: [],
|
|
33
|
+
default: '',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
displayName: 'Limit',
|
|
37
|
+
name: 'limit',
|
|
38
|
+
type: 'number',
|
|
39
|
+
description: 'Max number of results to return',
|
|
40
|
+
typeOptions: {
|
|
41
|
+
minValue: 1,
|
|
42
|
+
},
|
|
43
|
+
required: true,
|
|
44
|
+
displayOptions: {
|
|
45
|
+
show: { resource: ['future'], operation: ['candle'] },
|
|
46
|
+
},
|
|
47
|
+
default: 50,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
displayName: 'Start Time',
|
|
51
|
+
name: 'startTime',
|
|
52
|
+
type: 'dateTime',
|
|
53
|
+
displayOptions: {
|
|
54
|
+
show: { resource: ['future'], operation: ['candle'] },
|
|
55
|
+
},
|
|
56
|
+
default: '',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
displayName: 'End Time',
|
|
60
|
+
name: 'endTime',
|
|
61
|
+
type: 'dateTime',
|
|
62
|
+
displayOptions: {
|
|
63
|
+
show: { resource: ['future'], operation: ['candle'] },
|
|
64
|
+
},
|
|
65
|
+
default: '',
|
|
66
|
+
},
|
|
67
|
+
];
|
|
68
|
+
//# sourceMappingURL=candle.properties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"candle.properties.js","sourceRoot":"","sources":["../../../../../../nodes/Binance/actions/future/candle/candle.properties.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAA6B;IACnD;QACC,WAAW,EAAE,mBAAmB;QAChC,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,IAAI;QACd,WAAW,EACV,yHAAyH;QAC1H,cAAc,EAAE;YACf,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE;SACrD;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,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE;SACrD;QACD,WAAW,EAAE;YACZ,iBAAiB,EAAE,cAAc;SACjC;QACD,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,EAAE;KACX;IACD;QACC,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,iCAAiC;QAC9C,WAAW,EAAE;YACZ,QAAQ,EAAE,CAAC;SACX;QACD,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE;SACrD;QACD,OAAO,EAAE,EAAE;KACX;IACD;QACC,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,UAAU;QAChB,cAAc,EAAE;YACf,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE;SACrD;QACD,OAAO,EAAE,EAAE;KACX;IACD;QACC,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,UAAU;QAChB,cAAc,EAAE;YACf,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE;SACrD;QACD,OAAO,EAAE,EAAE;KACX;CACD,CAAC"}
|
|
@@ -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.properties"), exports);
|
|
18
|
+
__exportStar(require("./candle.execute"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/Binance/actions/future/candle/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,mDAAiC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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.execute = void 0;
|
|
7
|
+
const binance_api_node_1 = __importDefault(require("binance-api-node"));
|
|
8
|
+
async function execute(index) {
|
|
9
|
+
const credentials = await this.getCredentials('binanceApi', index);
|
|
10
|
+
const binanceClient = (0, binance_api_node_1.default)(credentials);
|
|
11
|
+
const symbol = this.getNodeParameter('symbol', index);
|
|
12
|
+
const exchangeInfo = await binanceClient.futuresExchangeInfo();
|
|
13
|
+
const executionData = symbol
|
|
14
|
+
? exchangeInfo.symbols.find((item) => item.symbol === symbol)
|
|
15
|
+
: exchangeInfo.symbols;
|
|
16
|
+
return this.helpers.returnJsonArray(executionData);
|
|
17
|
+
}
|
|
18
|
+
exports.execute = execute;
|
|
19
|
+
//# sourceMappingURL=exchange.execute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exchange.execute.js","sourceRoot":"","sources":["../../../../../../nodes/Binance/actions/future/exchange/exchange.execute.ts"],"names":[],"mappings":";;;;;;AAEA,wEAA6C;AAEtC,KAAK,UAAU,OAAO,CAE5B,KAAa;IAEb,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;IACnE,MAAM,aAAa,GAAG,IAAA,0BAAa,EAAC,WAAW,CAAC,CAAC;IACjD,MAAM,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAW,CAAC;IAEhE,MAAM,YAAY,GAAG,MAAM,aAAa,CAAC,mBAAmB,EAAE,CAAC;IAE/D,MAAM,aAAa,GAAG,MAAM;QAC3B,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,MAAM,CAAC;QAC7D,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC;IAExB,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,aAAoB,CAAC,CAAC;AAC3D,CAAC;AAfD,0BAeC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.properties = void 0;
|
|
4
|
+
exports.properties = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Symbol Name or ID',
|
|
7
|
+
name: 'symbol',
|
|
8
|
+
type: 'options',
|
|
9
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
|
10
|
+
displayOptions: {
|
|
11
|
+
show: { resource: ['future'], operation: ['exchange'] },
|
|
12
|
+
},
|
|
13
|
+
typeOptions: {
|
|
14
|
+
loadOptionsMethod: 'getSymbols',
|
|
15
|
+
},
|
|
16
|
+
options: [],
|
|
17
|
+
default: '',
|
|
18
|
+
},
|
|
19
|
+
];
|
|
20
|
+
//# sourceMappingURL=exchange.properties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exchange.properties.js","sourceRoot":"","sources":["../../../../../../nodes/Binance/actions/future/exchange/exchange.properties.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAA6B;IACnD;QACC,WAAW,EAAE,mBAAmB;QAChC,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,SAAS;QACf,WAAW,EACV,yHAAyH;QAC1H,cAAc,EAAE;YACf,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC,UAAU,CAAC,EAAE;SACvD;QACD,WAAW,EAAE;YACZ,iBAAiB,EAAE,YAAY;SAC/B;QACD,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,EAAE;KACX;CACD,CAAC"}
|
|
@@ -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("./exchange.execute"), exports);
|
|
18
|
+
__exportStar(require("./exchange.properties"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/Binance/actions/future/exchange/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,wDAAsC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.execute = void 0;
|
|
27
|
+
const order = __importStar(require("./order"));
|
|
28
|
+
const candle = __importStar(require("./candle"));
|
|
29
|
+
const exchange = __importStar(require("./exchange"));
|
|
30
|
+
const leverage = __importStar(require("./leverage"));
|
|
31
|
+
const position = __importStar(require("./position"));
|
|
32
|
+
const account = __importStar(require("./account"));
|
|
33
|
+
const statistics = __importStar(require("./statistics"));
|
|
34
|
+
async function execute(index) {
|
|
35
|
+
const operation = this.getNodeParameter('operation', index);
|
|
36
|
+
switch (operation) {
|
|
37
|
+
case 'order':
|
|
38
|
+
return order.execute.call(this, index);
|
|
39
|
+
case 'candle':
|
|
40
|
+
return candle.execute.call(this, index);
|
|
41
|
+
case 'exchange':
|
|
42
|
+
return exchange.execute.call(this, index);
|
|
43
|
+
case 'leverage':
|
|
44
|
+
return leverage.execute.call(this, index);
|
|
45
|
+
case 'position':
|
|
46
|
+
return position.execute.call(this, index);
|
|
47
|
+
case 'account':
|
|
48
|
+
return account.execute.call(this, index);
|
|
49
|
+
case 'statistics':
|
|
50
|
+
return statistics.execute.call(this, index);
|
|
51
|
+
default:
|
|
52
|
+
return [];
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.execute = execute;
|
|
56
|
+
//# sourceMappingURL=future.execute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"future.execute.js","sourceRoot":"","sources":["../../../../../nodes/Binance/actions/future/future.execute.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,+CAAiC;AACjC,iDAAmC;AACnC,qDAAuC;AACvC,qDAAuC;AACvC,qDAAuC;AACvC,mDAAqC;AACrC,yDAA2C;AAEpC,KAAK,UAAU,OAAO,CAE5B,KAAa;IAEb,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,KAAK,CAAW,CAAC;IAEtE,QAAQ,SAAS,EAAE;QAClB,KAAK,OAAO;YACX,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACxC,KAAK,QAAQ;YACZ,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACzC,KAAK,UAAU;YACd,OAAO,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC3C,KAAK,UAAU;YACd,OAAO,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC3C,KAAK,UAAU;YACd,OAAO,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC3C,KAAK,SAAS;YACb,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC1C,KAAK,YAAY;YAChB,OAAO,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC7C;YACC,OAAO,EAAE,CAAC;KACX;AACF,CAAC;AAxBD,0BAwBC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.properties = void 0;
|
|
27
|
+
const order = __importStar(require("./order"));
|
|
28
|
+
const candle = __importStar(require("./candle"));
|
|
29
|
+
const exchange = __importStar(require("./exchange"));
|
|
30
|
+
const leverage = __importStar(require("./leverage"));
|
|
31
|
+
const position = __importStar(require("./position"));
|
|
32
|
+
const account = __importStar(require("./account"));
|
|
33
|
+
const statistics = __importStar(require("./statistics"));
|
|
34
|
+
exports.properties = [
|
|
35
|
+
{
|
|
36
|
+
displayName: 'Operation',
|
|
37
|
+
name: 'operation',
|
|
38
|
+
type: 'options',
|
|
39
|
+
noDataExpression: true,
|
|
40
|
+
displayOptions: {
|
|
41
|
+
show: {
|
|
42
|
+
resource: ['future'],
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
options: [
|
|
46
|
+
{
|
|
47
|
+
name: 'Account',
|
|
48
|
+
value: 'account',
|
|
49
|
+
description: 'Get the account',
|
|
50
|
+
action: 'Get the account',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'Candle',
|
|
54
|
+
value: 'candle',
|
|
55
|
+
description: 'Get the candles',
|
|
56
|
+
action: 'Get the candles',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'Exchange',
|
|
60
|
+
value: 'exchange',
|
|
61
|
+
description: 'Get the exchange info',
|
|
62
|
+
action: 'Get the exchange',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'Leverage',
|
|
66
|
+
value: 'leverage',
|
|
67
|
+
action: 'Update leverage',
|
|
68
|
+
description: 'Update leverage',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'Order',
|
|
72
|
+
value: 'order',
|
|
73
|
+
action: 'Buy or sell a cryptocurrency',
|
|
74
|
+
description: 'Buy or sell a cryptocurrency',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: 'Position',
|
|
78
|
+
value: 'position',
|
|
79
|
+
action: 'Get position info',
|
|
80
|
+
description: 'Get position info',
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'Statistics',
|
|
84
|
+
value: 'statistics',
|
|
85
|
+
action: 'Get daily statistics',
|
|
86
|
+
description: 'Get daily statistics',
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
default: 'account',
|
|
90
|
+
},
|
|
91
|
+
...order.properties,
|
|
92
|
+
...candle.properties,
|
|
93
|
+
...exchange.properties,
|
|
94
|
+
...leverage.properties,
|
|
95
|
+
...position.properties,
|
|
96
|
+
...account.properties,
|
|
97
|
+
...statistics.properties,
|
|
98
|
+
];
|
|
99
|
+
//# sourceMappingURL=future.properties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"future.properties.js","sourceRoot":"","sources":["../../../../../nodes/Binance/actions/future/future.properties.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,+CAAiC;AACjC,iDAAmC;AACnC,qDAAuC;AACvC,qDAAuC;AACvC,qDAAuC;AACvC,mDAAqC;AACrC,yDAA2C;AAE9B,QAAA,UAAU,GAAsB;IAC5C;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,QAAQ,CAAC;aACpB;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,iBAAiB;gBAC9B,MAAM,EAAE,iBAAiB;aACzB;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,iBAAiB;gBAC9B,MAAM,EAAE,iBAAiB;aACzB;YACD;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,uBAAuB;gBACpC,MAAM,EAAE,kBAAkB;aAC1B;YACD;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,UAAU;gBACjB,MAAM,EAAE,iBAAiB;gBACzB,WAAW,EAAE,iBAAiB;aAC9B;YACD;gBACC,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,OAAO;gBACd,MAAM,EAAE,8BAA8B;gBACtC,WAAW,EAAE,8BAA8B;aAC3C;YACD;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,UAAU;gBACjB,MAAM,EAAE,mBAAmB;gBAC3B,WAAW,EAAE,mBAAmB;aAChC;YACD;gBACC,IAAI,EAAE,YAAY;gBAClB,KAAK,EAAE,YAAY;gBACnB,MAAM,EAAE,sBAAsB;gBAC9B,WAAW,EAAE,sBAAsB;aACnC;SACD;QACD,OAAO,EAAE,SAAS;KAClB;IAED,GAAG,KAAK,CAAC,UAAU;IACnB,GAAG,MAAM,CAAC,UAAU;IACpB,GAAG,QAAQ,CAAC,UAAU;IACtB,GAAG,QAAQ,CAAC,UAAU;IACtB,GAAG,QAAQ,CAAC,UAAU;IACtB,GAAG,OAAO,CAAC,UAAU;IACrB,GAAG,UAAU,CAAC,UAAU;CACxB,CAAC"}
|
|
@@ -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("./future.execute"), exports);
|
|
18
|
+
__exportStar(require("./future.properties"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Binance/actions/future/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,sDAAoC"}
|
|
@@ -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("./leverage.execute"), exports);
|
|
18
|
+
__exportStar(require("./leverage.properties"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/Binance/actions/future/leverage/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,wDAAsC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
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.execute = void 0;
|
|
7
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
8
|
+
const binance_api_node_1 = __importDefault(require("binance-api-node"));
|
|
9
|
+
async function execute(index) {
|
|
10
|
+
const credentials = await this.getCredentials('binanceApi', index);
|
|
11
|
+
const binanceClient = (0, binance_api_node_1.default)(credentials);
|
|
12
|
+
const symbol = this.getNodeParameter('symbol', index);
|
|
13
|
+
const leverage = this.getNodeParameter('leverage', index);
|
|
14
|
+
const marginType = this.getNodeParameter('marginType', index);
|
|
15
|
+
const response = await binanceClient.futuresLeverage({ symbol, leverage });
|
|
16
|
+
try {
|
|
17
|
+
await binanceClient.futuresMarginType({ symbol, marginType });
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
if (error.code !== -4046) {
|
|
21
|
+
throw error;
|
|
22
|
+
}
|
|
23
|
+
n8n_workflow_1.LoggerProxy.warn(`${symbol} ${error}`);
|
|
24
|
+
}
|
|
25
|
+
return this.helpers.returnJsonArray({ ...response, marginType });
|
|
26
|
+
}
|
|
27
|
+
exports.execute = execute;
|
|
28
|
+
//# sourceMappingURL=leverage.execute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"leverage.execute.js","sourceRoot":"","sources":["../../../../../../nodes/Binance/actions/future/leverage/leverage.execute.ts"],"names":[],"mappings":";;;;;;AACA,+CAA+D;AAC/D,wEAAgE;AAEzD,KAAK,UAAU,OAAO,CAE5B,KAAa;IAEb,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;IACnE,MAAM,aAAa,GAAG,IAAA,0BAAa,EAAC,WAAW,CAAC,CAAC;IACjD,MAAM,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAW,CAAC;IAChE,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,KAAK,CAAW,CAAC;IACpE,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,KAAK,CAAkB,CAAC;IAE/E,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;IAE3E,IAAI;QACH,MAAM,aAAa,CAAC,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;KAC9D;IAAC,OAAO,KAAK,EAAE;QACf,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,EAAE;YACzB,MAAM,KAAK,CAAC;SACZ;QAGD,0BAAW,CAAC,IAAI,CAAC,GAAG,MAAM,IAAI,KAAK,EAAE,CAAC,CAAC;KACvC;IAED,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,GAAG,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAC;AAClE,CAAC;AAxBD,0BAwBC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.properties = void 0;
|
|
4
|
+
exports.properties = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Symbol Name or ID',
|
|
7
|
+
name: 'symbol',
|
|
8
|
+
type: 'options',
|
|
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>',
|
|
11
|
+
displayOptions: {
|
|
12
|
+
show: { resource: ['future'], operation: ['leverage'] },
|
|
13
|
+
},
|
|
14
|
+
typeOptions: {
|
|
15
|
+
loadOptionsMethod: 'getSymbols',
|
|
16
|
+
},
|
|
17
|
+
options: [],
|
|
18
|
+
default: '',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
displayName: 'Leverage',
|
|
22
|
+
name: 'leverage',
|
|
23
|
+
type: 'number',
|
|
24
|
+
required: true,
|
|
25
|
+
typeOptions: {
|
|
26
|
+
minValue: 1,
|
|
27
|
+
maxValue: 75,
|
|
28
|
+
numberStepSize: 1,
|
|
29
|
+
},
|
|
30
|
+
default: 20,
|
|
31
|
+
displayOptions: {
|
|
32
|
+
show: { resource: ['future'], operation: ['leverage'] },
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
displayName: 'Margin Type',
|
|
37
|
+
name: 'marginType',
|
|
38
|
+
type: 'options',
|
|
39
|
+
required: true,
|
|
40
|
+
options: [
|
|
41
|
+
{ name: 'ISOLATED', value: 'ISOLATED' },
|
|
42
|
+
{ name: 'CROSSED', value: 'CROSSED' },
|
|
43
|
+
],
|
|
44
|
+
default: 'ISOLATED',
|
|
45
|
+
displayOptions: {
|
|
46
|
+
show: { resource: ['future'], operation: ['leverage'] },
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
];
|
|
50
|
+
//# sourceMappingURL=leverage.properties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"leverage.properties.js","sourceRoot":"","sources":["../../../../../../nodes/Binance/actions/future/leverage/leverage.properties.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAA6B;IACnD;QACC,WAAW,EAAE,mBAAmB;QAChC,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,IAAI;QACd,WAAW,EACV,yHAAyH;QAC1H,cAAc,EAAE;YACf,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC,UAAU,CAAC,EAAE;SACvD;QACD,WAAW,EAAE;YACZ,iBAAiB,EAAE,YAAY;SAC/B;QACD,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,EAAE;KACX;IACD;QACC,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE;YACZ,QAAQ,EAAE,CAAC;YACX,QAAQ,EAAE,EAAE;YACZ,cAAc,EAAE,CAAC;SACjB;QACD,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC,UAAU,CAAC,EAAE;SACvD;KACD;IACD;QACC,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE;YACR,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;YACvC,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;SACrC;QACD,OAAO,EAAE,UAAU;QACnB,cAAc,EAAE;YACf,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC,UAAU,CAAC,EAAE;SACvD;KACD;CACD,CAAC"}
|