@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("./order.properties"), exports);
|
|
18
|
+
__exportStar(require("./order.execute"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/Binance/actions/future/order/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,kDAAgC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
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 side = this.getNodeParameter('side', index);
|
|
12
|
+
const symbol = this.getNodeParameter('symbol', index);
|
|
13
|
+
if (side === 'CLEAR') {
|
|
14
|
+
const order = await binanceClient.futuresCancelAllOpenOrders({ symbol });
|
|
15
|
+
return this.helpers.returnJsonArray(order);
|
|
16
|
+
}
|
|
17
|
+
if (side === 'GET') {
|
|
18
|
+
const orders = await binanceClient.futuresOpenOrders({ symbol });
|
|
19
|
+
return this.helpers.returnJsonArray(orders);
|
|
20
|
+
}
|
|
21
|
+
const quantity = this.getNodeParameter('quantity', index);
|
|
22
|
+
const orderType = this.getNodeParameter('orderType', index);
|
|
23
|
+
const reduceOnly = this.getNodeParameter('reduceOnly', index);
|
|
24
|
+
if (orderType === 'MARKET') {
|
|
25
|
+
const order = await binanceClient.futuresOrder({
|
|
26
|
+
symbol,
|
|
27
|
+
quantity,
|
|
28
|
+
side: side,
|
|
29
|
+
type: 'MARKET',
|
|
30
|
+
reduceOnly: `${reduceOnly}`,
|
|
31
|
+
});
|
|
32
|
+
return this.helpers.returnJsonArray(order);
|
|
33
|
+
}
|
|
34
|
+
const price = this.getNodeParameter('price', index);
|
|
35
|
+
const timeInForce = this.getNodeParameter('timeInForce', index);
|
|
36
|
+
const order = await binanceClient.futuresOrder({
|
|
37
|
+
symbol,
|
|
38
|
+
quantity,
|
|
39
|
+
price,
|
|
40
|
+
side: side,
|
|
41
|
+
type: 'LIMIT',
|
|
42
|
+
timeInForce,
|
|
43
|
+
reduceOnly: `${reduceOnly}`,
|
|
44
|
+
});
|
|
45
|
+
return this.helpers.returnJsonArray(order);
|
|
46
|
+
}
|
|
47
|
+
exports.execute = execute;
|
|
48
|
+
//# sourceMappingURL=order.execute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order.execute.js","sourceRoot":"","sources":["../../../../../../nodes/Binance/actions/future/order/order.execute.ts"],"names":[],"mappings":";;;;;;AAEA,wEAA6F;AAEtF,KAAK,UAAU,O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AAC,KAAY,CAAC,CAAC;KAClD;IAGD,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAW,CAAC;IAC9D,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,aAAa,EAAE,KAAK,CAAmB,CAAC;IAElF,MAAM,KAAK,GAAG,MAAM,aAAa,CAAC,YAAY,CAAC;QAC9C,MAAM;QACN,QAAQ;QACR,KAAK;QACL,IAAI,EAAE,IAAoB;QAC1B,IAAI,EAAE,OAAO;QACb,WAAW;QACX,UAAU,EAAE,GAAG,UAAU,EAAE;KAC3B,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,KAAY,CAAC,CAAC;AACnD,CAAC;AArDD,0BAqDC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.properties = void 0;
|
|
4
|
+
exports.properties = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Side',
|
|
7
|
+
name: 'side',
|
|
8
|
+
type: 'options',
|
|
9
|
+
required: true,
|
|
10
|
+
displayOptions: {
|
|
11
|
+
show: { resource: ['future'], operation: ['order'] },
|
|
12
|
+
},
|
|
13
|
+
options: [
|
|
14
|
+
{ name: 'BUY', value: 'BUY' },
|
|
15
|
+
{ name: 'SELL', value: 'SELL' },
|
|
16
|
+
{ name: 'Clear Orders', value: 'CLEAR' },
|
|
17
|
+
{ name: 'Open Orders', value: 'GET' },
|
|
18
|
+
],
|
|
19
|
+
default: 'BUY',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
displayName: 'Symbol Name or ID',
|
|
23
|
+
name: 'symbol',
|
|
24
|
+
type: 'options',
|
|
25
|
+
required: true,
|
|
26
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
|
27
|
+
displayOptions: {
|
|
28
|
+
show: { resource: ['future'], operation: ['order'] },
|
|
29
|
+
},
|
|
30
|
+
typeOptions: {
|
|
31
|
+
loadOptionsMethod: 'getSymbols',
|
|
32
|
+
},
|
|
33
|
+
options: [],
|
|
34
|
+
default: '',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
displayName: 'Order Type',
|
|
38
|
+
name: 'orderType',
|
|
39
|
+
type: 'options',
|
|
40
|
+
required: true,
|
|
41
|
+
displayOptions: {
|
|
42
|
+
show: { resource: ['future'], operation: ['order'], side: ['BUY', 'SELL'] },
|
|
43
|
+
},
|
|
44
|
+
options: [
|
|
45
|
+
{ name: 'Limit', value: 'LIMIT' },
|
|
46
|
+
{ name: 'Market', value: 'MARKET' },
|
|
47
|
+
],
|
|
48
|
+
default: 'LIMIT',
|
|
49
|
+
description: 'LIMIT requires price, MARKET executes at current market price',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
displayName: 'Time In Force',
|
|
53
|
+
name: 'timeInForce',
|
|
54
|
+
type: 'options',
|
|
55
|
+
required: true,
|
|
56
|
+
displayOptions: {
|
|
57
|
+
show: { resource: ['future'], operation: ['order'], side: ['BUY', 'SELL'], orderType: ['LIMIT'] },
|
|
58
|
+
},
|
|
59
|
+
options: [
|
|
60
|
+
{ name: 'GTC (Good Till Cancel)', value: 'GTC', description: 'Order remains until cancelled' },
|
|
61
|
+
{ name: 'IOC (Immediate or Cancel)', value: 'IOC', description: 'Fill immediately or cancel unfilled portion' },
|
|
62
|
+
{ name: 'FOK (Fill or Kill)', value: 'FOK', description: 'Fill entire order immediately or cancel completely' },
|
|
63
|
+
{ name: 'GTX (Post Only)', value: 'GTX', description: 'Maker only, rejected if would take liquidity' },
|
|
64
|
+
],
|
|
65
|
+
default: 'GTC',
|
|
66
|
+
description: 'How long the order remains active',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
displayName: 'Quantity',
|
|
70
|
+
name: 'quantity',
|
|
71
|
+
type: 'number',
|
|
72
|
+
required: true,
|
|
73
|
+
displayOptions: {
|
|
74
|
+
show: { resource: ['future'], operation: ['order'] },
|
|
75
|
+
hide: { side: ['CLEAR', 'GET'] },
|
|
76
|
+
},
|
|
77
|
+
default: 0,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
displayName: 'Price',
|
|
81
|
+
name: 'price',
|
|
82
|
+
type: 'number',
|
|
83
|
+
required: true,
|
|
84
|
+
displayOptions: {
|
|
85
|
+
show: { resource: ['future'], operation: ['order'], orderType: ['LIMIT'] },
|
|
86
|
+
hide: { side: ['CLEAR', 'GET'] },
|
|
87
|
+
},
|
|
88
|
+
default: 0,
|
|
89
|
+
description: 'Limit price for the order',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
displayName: 'Reduce Only',
|
|
93
|
+
name: 'reduceOnly',
|
|
94
|
+
type: 'boolean',
|
|
95
|
+
displayOptions: {
|
|
96
|
+
show: { resource: ['future'], operation: ['order'] },
|
|
97
|
+
hide: { side: ['CLEAR', 'GET'] },
|
|
98
|
+
},
|
|
99
|
+
default: false,
|
|
100
|
+
description: 'Whether the order can only reduce position size',
|
|
101
|
+
},
|
|
102
|
+
];
|
|
103
|
+
//# sourceMappingURL=order.properties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order.properties.js","sourceRoot":"","sources":["../../../../../../nodes/Binance/actions/future/order/order.properties.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAA6B;IACnD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC,OAAO,CAAC,EAAE;SACpD;QACD,OAAO,EAAE;YACR,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;YAC7B,EAAE,IAAI,EAAE,MAAM,E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W,EAAE,aAAa;QAC1B,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,SAAS;QACf,cAAc,EAAE;YACf,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC,OAAO,CAAC,EAAE;YACpD,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE;SAChC;QACD,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,iDAAiD;KAC9D;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("./position.execute"), exports);
|
|
18
|
+
__exportStar(require("./position.properties"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/Binance/actions/future/position/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,wDAAsC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
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 positions = await binanceClient.futuresPositionRisk({ symbol });
|
|
13
|
+
return this.helpers.returnJsonArray(positions);
|
|
14
|
+
}
|
|
15
|
+
exports.execute = execute;
|
|
16
|
+
//# sourceMappingURL=position.execute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"position.execute.js","sourceRoot":"","sources":["../../../../../../nodes/Binance/actions/future/position/position.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,SAAS,GAAG,MAAM,aAAa,CAAC,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IAEtE,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,SAAgB,CAAC,CAAC;AACvD,CAAC;AAXD,0BAWC"}
|
|
@@ -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: ['position'] },
|
|
12
|
+
},
|
|
13
|
+
typeOptions: {
|
|
14
|
+
loadOptionsMethod: 'getSymbols',
|
|
15
|
+
},
|
|
16
|
+
options: [],
|
|
17
|
+
default: '',
|
|
18
|
+
},
|
|
19
|
+
];
|
|
20
|
+
//# sourceMappingURL=position.properties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"position.properties.js","sourceRoot":"","sources":["../../../../../../nodes/Binance/actions/future/position/position.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("./statistics.execute"), exports);
|
|
18
|
+
__exportStar(require("./statistics.properties"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/Binance/actions/future/statistics/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,0DAAwC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
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 stats = await binanceClient.futuresDailyStats({ symbol });
|
|
13
|
+
return this.helpers.returnJsonArray(stats);
|
|
14
|
+
}
|
|
15
|
+
exports.execute = execute;
|
|
16
|
+
//# sourceMappingURL=statistics.execute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statistics.execute.js","sourceRoot":"","sources":["../../../../../../nodes/Binance/actions/future/statistics/statistics.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,KAAK,GAAG,MAAM,aAAa,CAAC,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IAEhE,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,KAAY,CAAC,CAAC;AACnD,CAAC;AAXD,0BAWC"}
|
|
@@ -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: ['statistics'] },
|
|
12
|
+
},
|
|
13
|
+
typeOptions: {
|
|
14
|
+
loadOptionsMethod: 'getSymbols',
|
|
15
|
+
},
|
|
16
|
+
options: [],
|
|
17
|
+
default: '',
|
|
18
|
+
},
|
|
19
|
+
];
|
|
20
|
+
//# sourceMappingURL=statistics.properties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statistics.properties.js","sourceRoot":"","sources":["../../../../../../nodes/Binance/actions/future/statistics/statistics.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,YAAY,CAAC,EAAE;SACzD;QACD,WAAW,EAAE;YACZ,iBAAiB,EAAE,YAAY;SAC/B;QACD,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,EAAE;KACX;CACD,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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 account = await binanceClient.accountInfo();
|
|
12
|
+
return this.helpers.returnJsonArray(account);
|
|
13
|
+
}
|
|
14
|
+
exports.execute = execute;
|
|
15
|
+
//# sourceMappingURL=execute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../../../nodes/Binance/actions/spot/account/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;IAEjD,MAAM,OAAO,GAAG,MAAM,aAAa,CAAC,WAAW,EAAE,CAAC;IAElD,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,OAAc,CAAC,CAAC;AACrD,CAAC;AAVD,0BAUC"}
|
|
@@ -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/spot/account/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,+CAA6B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"properties.js","sourceRoot":"","sources":["../../../../../../nodes/Binance/actions/spot/account/properties.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAA2B,EAAE,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
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 options = {
|
|
17
|
+
symbol,
|
|
18
|
+
interval,
|
|
19
|
+
limit,
|
|
20
|
+
};
|
|
21
|
+
if (startTimeString) {
|
|
22
|
+
options.startTime = new Date(startTimeString).getTime();
|
|
23
|
+
}
|
|
24
|
+
if (endTimeString) {
|
|
25
|
+
options.endTime = new Date(endTimeString).getTime();
|
|
26
|
+
}
|
|
27
|
+
const candles = await binanceClient.candles(options);
|
|
28
|
+
const executionData = candles.map((candle) => ({
|
|
29
|
+
...candle,
|
|
30
|
+
open: Number(candle.open),
|
|
31
|
+
close: Number(candle.close),
|
|
32
|
+
low: Number(candle.low),
|
|
33
|
+
high: Number(candle.high),
|
|
34
|
+
volume: Number(candle.volume),
|
|
35
|
+
}));
|
|
36
|
+
return this.helpers.returnJsonArray(executionData);
|
|
37
|
+
}
|
|
38
|
+
exports.execute = execute;
|
|
39
|
+
//# sourceMappingURL=candle.execute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"candle.execute.js","sourceRoot":"","sources":["../../../../../../nodes/Binance/actions/spot/candle/candle.execute.ts"],"names":[],"mappings":";;;;;;AAGA,wEAAyE;AAElE,KAAK,UAAU,OAAO,CAE5B,KAAa;IAEb,MAAM,WAAW,GAAG,MAAM,IAAI,C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CAAC,MAAM,CAAC,MAAM,CAAC;KAC7B,CAAC,CAAC,CAAC;IAEJ,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;AACpD,CAAC;AAvCD,0BAuCC"}
|
|
@@ -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: ['spot'], 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: ['spot'], 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: ['spot'], operation: ['candle'] },
|
|
46
|
+
},
|
|
47
|
+
default: 50,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
displayName: 'Start Time',
|
|
51
|
+
name: 'startTime',
|
|
52
|
+
type: 'dateTime',
|
|
53
|
+
displayOptions: {
|
|
54
|
+
show: { resource: ['spot'], operation: ['candle'] },
|
|
55
|
+
},
|
|
56
|
+
default: '',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
displayName: 'End Time',
|
|
60
|
+
name: 'endTime',
|
|
61
|
+
type: 'dateTime',
|
|
62
|
+
displayOptions: {
|
|
63
|
+
show: { resource: ['spot'], 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/spot/candle/candle.properties.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAA2B;IACjD;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,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE;SACnD;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,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE;SACnD;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,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE;SACnD;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,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE;SACnD;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,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE;SACnD;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/spot/candle/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,mDAAiC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
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 executionData = await binanceClient.exchangeInfo({ symbol });
|
|
13
|
+
return this.helpers.returnJsonArray(executionData);
|
|
14
|
+
}
|
|
15
|
+
exports.execute = execute;
|
|
16
|
+
//# sourceMappingURL=exchange.execute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exchange.execute.js","sourceRoot":"","sources":["../../../../../../nodes/Binance/actions/spot/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,aAAa,GAAG,MAAM,aAAa,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IAEnE,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,aAAoB,CAAC,CAAC;AAC3D,CAAC;AAXD,0BAWC"}
|