@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
package/LICENSE.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright 2022 n8n
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
4
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
5
|
+
the Software without restriction, including without limitation the rights to
|
|
6
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
7
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
8
|
+
so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
## How to install a n8n-nodes-binance
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
1. Go to Settings > Community Nodes.
|
|
6
|
+
2. Select Install.
|
|
7
|
+
3. Enter the npm package name, and version number if required. Example: "n8n-nodes-binance"
|
|
8
|
+
4. Agree to the risks of using community nodes: select I understand the risks of installing unverified code from a public source.
|
|
9
|
+
5. Select Install. n8n installs the node, and returns to the Community Nodes list in Settings.
|
|
10
|
+
|
|
11
|
+
For more information, please click [here](https://docs.n8n.io/integrations/community-nodes/installation/#install-a-community-node).
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+
|
|
15
|
+
## Actions
|
|
16
|
+

|
|
17
|
+
|
|
18
|
+
## Settings
|
|
19
|
+

|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## Other Packages
|
|
23
|
+
|
|
24
|
+
- [n8n-nodes-moleculer](https://www.npmjs.com/package/n8n-nodes-moleculer)
|
|
25
|
+
- [n8n-nodes-indicators](https://www.npmjs.com/package/n8n-nodes-indicators)
|
|
26
|
+
- [n8n-nodes-binance](https://www.npmjs.com/package/n8n-nodes-binance)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BinanceApi = void 0;
|
|
4
|
+
class BinanceApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'binanceApi';
|
|
7
|
+
this.displayName = 'Binance API';
|
|
8
|
+
this.properties = [
|
|
9
|
+
{
|
|
10
|
+
displayName: 'API Key',
|
|
11
|
+
name: 'apiKey',
|
|
12
|
+
type: 'string',
|
|
13
|
+
typeOptions: {
|
|
14
|
+
password: true,
|
|
15
|
+
},
|
|
16
|
+
default: '',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
displayName: 'API Secret',
|
|
20
|
+
name: 'apiSecret',
|
|
21
|
+
type: 'string',
|
|
22
|
+
typeOptions: {
|
|
23
|
+
password: true,
|
|
24
|
+
},
|
|
25
|
+
default: '',
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.BinanceApi = BinanceApi;
|
|
31
|
+
//# sourceMappingURL=BinanceApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BinanceApi.credentials.js","sourceRoot":"","sources":["../../credentials/BinanceApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,UAAU;IAAvB;QACC,SAAI,GAAG,YAAY,CAAC;QACpB,gBAAW,GAAG,aAAa,CAAC;QAC5B,eAAU,GAAsB;YAI/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE,EAAE;aACX;YACD;gBACC,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE,EAAE;aACX;SACD,CAAC;IA0BH,CAAC;CAAA;AAnDD,gCAmDC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
import { IExecuteFunctions } from 'n8n-core';
|
|
3
|
+
import { loadOptions } from './methods';
|
|
4
|
+
export declare class Binance implements INodeType {
|
|
5
|
+
description: INodeTypeDescription;
|
|
6
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
7
|
+
methods: {
|
|
8
|
+
loadOptions: typeof loadOptions;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Binance = void 0;
|
|
4
|
+
const methods_1 = require("./methods");
|
|
5
|
+
const binance_properties_1 = require("./actions/binance.properties");
|
|
6
|
+
const binance_execute_1 = require("./actions/binance.execute");
|
|
7
|
+
class Binance {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.description = {
|
|
10
|
+
displayName: 'Binance',
|
|
11
|
+
name: 'binance',
|
|
12
|
+
description: 'Consume Binance API',
|
|
13
|
+
icon: 'file:Binance.svg',
|
|
14
|
+
version: 1,
|
|
15
|
+
inputs: ['main'],
|
|
16
|
+
outputs: ['main'],
|
|
17
|
+
defaults: {
|
|
18
|
+
name: 'Consume Binance API',
|
|
19
|
+
},
|
|
20
|
+
group: ['Binance'],
|
|
21
|
+
credentials: [{ name: 'binanceApi', required: true }],
|
|
22
|
+
properties: binance_properties_1.properties,
|
|
23
|
+
};
|
|
24
|
+
this.methods = { loadOptions: methods_1.loadOptions };
|
|
25
|
+
}
|
|
26
|
+
async execute() {
|
|
27
|
+
return binance_execute_1.execute.call(this);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.Binance = Binance;
|
|
31
|
+
//# sourceMappingURL=Binance.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Binance.node.js","sourceRoot":"","sources":["../../../nodes/Binance/Binance.node.ts"],"names":[],"mappings":";;;AAGA,uCAAwC;AAExC,qEAA0D;AAC1D,+DAAoD;AAEpD,MAAa,OAAO;IAApB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,SAAS;YACtB,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,qBAAqB;YAClC,IAAI,EAAE,kBAAkB;YACxB,OAAO,EAAE,CAAC;YACV,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,QAAQ,EAAE;gBACT,IAAI,EAAE,qBAAqB;aAC3B;YACD,KAAK,EAAE,CAAC,SAAS,CAAC;YAClB,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YACrD,UAAU,EAAV,+BAAU;SACV,CAAC;QAMF,YAAO,GAAG,EAAE,WAAW,EAAX,qBAAW,EAAE,CAAC;IAC3B,CAAC;IALA,KAAK,CAAC,OAAO;QACZ,OAAO,yBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;CAGD;AAtBD,0BAsBC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
4
|
+
<svg version="1.1" id="Your_design" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
|
|
5
|
+
y="0px" width="126.611px" height="126.611px" viewBox="0 0 126.611 126.611" enable-background="new 0 0 126.611 126.611"
|
|
6
|
+
xml:space="preserve">
|
|
7
|
+
<polygon fill="#F3BA2F" points="38.171,53.203 62.759,28.616 87.36,53.216 101.667,38.909 62.759,0 23.864,38.896 "/>
|
|
8
|
+
<rect x="3.644" y="53.188" transform="matrix(0.7071 0.7071 -0.7071 0.7071 48.7933 8.8106)" fill="#F3BA2F" width="20.233" height="20.234"/>
|
|
9
|
+
<polygon fill="#F3BA2F" points="38.171,73.408 62.759,97.995 87.359,73.396 101.674,87.695 101.667,87.703 62.759,126.611
|
|
10
|
+
23.863,87.716 23.843,87.696 "/>
|
|
11
|
+
<rect x="101.64" y="53.189" transform="matrix(-0.7071 0.7071 -0.7071 -0.7071 235.5457 29.0503)" fill="#F3BA2F" width="20.234" height="20.233"/>
|
|
12
|
+
<polygon fill="#F3BA2F" points="77.271,63.298 77.277,63.298 62.759,48.78 52.03,59.509 52.029,59.509 50.797,60.742 48.254,63.285
|
|
13
|
+
48.254,63.285 48.234,63.305 48.254,63.326 62.759,77.831 77.277,63.313 77.284,63.305 "/>
|
|
14
|
+
</svg>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ITriggerFunctions } from 'n8n-core';
|
|
2
|
+
import { INodeType, INodeTypeDescription, ITriggerResponse } from 'n8n-workflow';
|
|
3
|
+
import { loadOptions } from './methods';
|
|
4
|
+
export declare class BinanceTrigger implements INodeType {
|
|
5
|
+
description: INodeTypeDescription;
|
|
6
|
+
trigger(this: ITriggerFunctions): Promise<ITriggerResponse | undefined>;
|
|
7
|
+
methods: {
|
|
8
|
+
loadOptions: typeof loadOptions;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BinanceTrigger = void 0;
|
|
4
|
+
const binance_trigger_1 = require("./triggers/binance.trigger");
|
|
5
|
+
const binance_properties_1 = require("./triggers/binance.properties");
|
|
6
|
+
const methods_1 = require("./methods");
|
|
7
|
+
class BinanceTrigger {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.description = {
|
|
10
|
+
displayName: 'Binance Trigger',
|
|
11
|
+
name: 'binanceTrigger',
|
|
12
|
+
description: 'Binance Trigger',
|
|
13
|
+
icon: 'file:Binance.svg',
|
|
14
|
+
version: 1,
|
|
15
|
+
inputs: [],
|
|
16
|
+
outputs: ['main'],
|
|
17
|
+
defaults: {
|
|
18
|
+
name: 'Binance Trigger',
|
|
19
|
+
},
|
|
20
|
+
group: ['trigger', 'Binance'],
|
|
21
|
+
credentials: [{ name: 'binanceApi', required: true }],
|
|
22
|
+
properties: binance_properties_1.properties,
|
|
23
|
+
};
|
|
24
|
+
this.methods = { loadOptions: methods_1.loadOptions };
|
|
25
|
+
}
|
|
26
|
+
async trigger() {
|
|
27
|
+
return binance_trigger_1.trigger.call(this);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.BinanceTrigger = BinanceTrigger;
|
|
31
|
+
//# sourceMappingURL=BinanceTrigger.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BinanceTrigger.node.js","sourceRoot":"","sources":["../../../nodes/Binance/BinanceTrigger.node.ts"],"names":[],"mappings":";;;AAEA,gEAAqD;AACrD,sEAA2D;AAC3D,uCAAwC;AACxC,MAAa,cAAc;IAA3B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,iBAAiB;YAC9B,IAAI,EAAE,gBAAgB;YAEtB,WAAW,EAAE,iBAAiB;YAC9B,IAAI,EAAE,kBAAkB;YACxB,OAAO,EAAE,CAAC;YACV,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,QAAQ,EAAE;gBACT,IAAI,EAAE,iBAAiB;aACvB;YACD,KAAK,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;YAC7B,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YACrD,UAAU,EAAV,+BAAU;SACV,CAAC;QAMF,YAAO,GAAG,EAAE,WAAW,EAAX,qBAAW,EAAE,CAAC;IAC3B,CAAC;IALA,KAAK,CAAC,OAAO;QACZ,OAAO,yBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;CAGD;AAvBD,wCAuBC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
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 spot = __importStar(require("./spot"));
|
|
28
|
+
const future = __importStar(require("./future"));
|
|
29
|
+
const custom = __importStar(require("./custom"));
|
|
30
|
+
async function execute() {
|
|
31
|
+
const items = this.getInputData();
|
|
32
|
+
const executionData = [];
|
|
33
|
+
for (let index = 0; index < items.length; index++) {
|
|
34
|
+
const resource = this.getNodeParameter('resource', index);
|
|
35
|
+
try {
|
|
36
|
+
const data = resource === 'spot'
|
|
37
|
+
? await spot.execute.call(this, index)
|
|
38
|
+
: resource === 'future'
|
|
39
|
+
? await future.execute.call(this, index)
|
|
40
|
+
: resource === 'custom'
|
|
41
|
+
? await custom.execute.call(this, index)
|
|
42
|
+
: [];
|
|
43
|
+
const dataWithMeta = data.map((value) => ({
|
|
44
|
+
...value,
|
|
45
|
+
pairedItem: { item: index },
|
|
46
|
+
}));
|
|
47
|
+
executionData.push(dataWithMeta);
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
if (this.continueOnFail()) {
|
|
51
|
+
executionData.push([{ json: this.getInputData(index)[0].json, error }]);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
if (error.context)
|
|
55
|
+
error.context.itemIndex = index;
|
|
56
|
+
throw error;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return executionData;
|
|
61
|
+
}
|
|
62
|
+
exports.execute = execute;
|
|
63
|
+
//# sourceMappingURL=binance.execute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binance.execute.js","sourceRoot":"","sources":["../../../../nodes/Binance/actions/binance.execute.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,6CAA+B;AAC/B,iDAAmC;AACnC,iDAAmC;AAE5B,KAAK,UAAU,OAAO;IAC5B,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;IAElC,MAAM,aAAa,GAA2B,EAAE,CAAC;IAEjD,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;QAClD,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,KAAK,CAAW,CAAC;QAEpE,IAAI;YACH,MAAM,IAAI,GACT,QAAQ,KAAK,MAAM;gBAClB,CAAC,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;gBACtC,CAAC,CAAC,QAAQ,KAAK,QAAQ;oBACvB,CAAC,CAAC,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;oBACxC,CAAC,CAAC,QAAQ,KAAK,QAAQ;wBACvB,CAAC,CAAC,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;wBACxC,CAAC,CAAC,EAAE,CAAC;YAEP,MAAM,YAAY,GAAyB,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;gBAC/D,GAAG,KAAK;gBACR,UAAU,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;aAC3B,CAAC,CAAC,CAAC;YAEJ,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;SACjC;QAAC,OAAO,KAAK,EAAE;YACf,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE;gBAC1B,aAAa,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;aACxE;iBAAM;gBACN,IAAI,KAAK,CAAC,OAAO;oBAAE,KAAK,CAAC,OAAO,CAAC,SAAS,GAAG,KAAK,CAAC;gBACnD,MAAM,KAAK,CAAC;aACZ;SACD;KACD;IAED,OAAO,aAAa,CAAC;AACtB,CAAC;AAnCD,0BAmCC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
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 spot = __importStar(require("./spot"));
|
|
28
|
+
const future = __importStar(require("./future"));
|
|
29
|
+
const custom = __importStar(require("./custom"));
|
|
30
|
+
exports.properties = [
|
|
31
|
+
{
|
|
32
|
+
displayName: 'Resource',
|
|
33
|
+
name: 'resource',
|
|
34
|
+
type: 'options',
|
|
35
|
+
noDataExpression: true,
|
|
36
|
+
options: [
|
|
37
|
+
{
|
|
38
|
+
name: 'Spot',
|
|
39
|
+
value: 'spot',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'Future',
|
|
43
|
+
value: 'future',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: 'Margin',
|
|
47
|
+
value: 'margin',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: 'Custom',
|
|
51
|
+
value: 'custom',
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
default: 'spot',
|
|
55
|
+
},
|
|
56
|
+
...spot.properties,
|
|
57
|
+
...future.properties,
|
|
58
|
+
...custom.properties,
|
|
59
|
+
];
|
|
60
|
+
//# sourceMappingURL=binance.properties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binance.properties.js","sourceRoot":"","sources":["../../../../nodes/Binance/actions/binance.properties.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAA+B;AAC/B,iDAAmC;AACnC,iDAAmC;AAEtB,QAAA,UAAU,GAAsB;IAC5C;QACC,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,MAAM;aACb;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;aACf;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;aACf;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;aACf;SACD;QACD,OAAO,EAAE,MAAM;KACf;IACD,GAAG,IAAI,CAAC,UAAU;IAClB,GAAG,MAAM,CAAC,UAAU;IACpB,GAAG,MAAM,CAAC,UAAU;CACpB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
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 functionOperation = __importStar(require("./function"));
|
|
28
|
+
async function execute(index) {
|
|
29
|
+
const operation = this.getNodeParameter('operation', index);
|
|
30
|
+
switch (operation) {
|
|
31
|
+
case 'function':
|
|
32
|
+
return functionOperation.execute.call(this, index);
|
|
33
|
+
default:
|
|
34
|
+
return [];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.execute = execute;
|
|
38
|
+
//# sourceMappingURL=custom.execute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom.execute.js","sourceRoot":"","sources":["../../../../../nodes/Binance/actions/custom/custom.execute.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,8DAAgD;AAEzC,KAAK,UAAU,OAAO,CAE5B,KAAa;IAEb,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,KAAK,CAAW,CAAC;IAEtE,QAAQ,SAAS,EAAE;QAClB,KAAK,UAAU;YACd,OAAO,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACpD;YACC,OAAO,EAAE,CAAC;KACX;AACF,CAAC;AAZD,0BAYC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
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 functionOperation = __importStar(require("./function"));
|
|
28
|
+
exports.properties = [
|
|
29
|
+
{
|
|
30
|
+
displayName: 'Operation',
|
|
31
|
+
name: 'operation',
|
|
32
|
+
type: 'options',
|
|
33
|
+
noDataExpression: true,
|
|
34
|
+
displayOptions: {
|
|
35
|
+
show: {
|
|
36
|
+
resource: ['custom'],
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
options: [
|
|
40
|
+
{
|
|
41
|
+
name: 'Execute Custom Function',
|
|
42
|
+
value: 'function',
|
|
43
|
+
description: 'Execute a custom function',
|
|
44
|
+
action: 'Execute custom function',
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
default: 'function',
|
|
48
|
+
},
|
|
49
|
+
...functionOperation.properties,
|
|
50
|
+
];
|
|
51
|
+
//# sourceMappingURL=custom.properties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom.properties.js","sourceRoot":"","sources":["../../../../../nodes/Binance/actions/custom/custom.properties.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,8DAAgD;AAEnC,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,yBAAyB;gBAC/B,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,2BAA2B;gBACxC,MAAM,EAAE,yBAAyB;aACjC;SACD;QACD,OAAO,EAAE,UAAU;KACnB;IACD,GAAG,iBAAiB,CAAC,UAAU;CAC/B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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 functionName = this.getNodeParameter('functionName', index);
|
|
12
|
+
const json = this.getNodeParameter('parameters', index);
|
|
13
|
+
const parameters = Array.isArray(json) ? json : [json];
|
|
14
|
+
const data = await binanceClient[functionName](...parameters);
|
|
15
|
+
return this.helpers.returnJsonArray(data);
|
|
16
|
+
}
|
|
17
|
+
exports.execute = execute;
|
|
18
|
+
//# sourceMappingURL=function.execute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function.execute.js","sourceRoot":"","sources":["../../../../../../nodes/Binance/actions/custom/function/function.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,YAAY,GAAG,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,KAAK,CAAW,CAAC;IAC5E,MAAM,IAAI,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,KAAK,CAAQ,CAAC;IAG/D,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAEvD,MAAM,IAAI,GAAG,MAAO,aAAqB,CAAC,YAAY,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC;IAEvE,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAW,CAAC,CAAC;AAClD,CAAC;AAfD,0BAeC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.properties = void 0;
|
|
4
|
+
exports.properties = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Function Name or ID',
|
|
7
|
+
name: 'functionName',
|
|
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: ['custom'], operation: ['function'] },
|
|
12
|
+
},
|
|
13
|
+
typeOptions: {
|
|
14
|
+
loadOptionsMethod: 'getCustomFunctions',
|
|
15
|
+
},
|
|
16
|
+
options: [],
|
|
17
|
+
default: '',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
displayName: 'Parameters',
|
|
21
|
+
name: 'parameters',
|
|
22
|
+
displayOptions: {
|
|
23
|
+
show: {
|
|
24
|
+
resource: ['custom'],
|
|
25
|
+
operation: ['function'],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
description: 'The parameters for the custom function, in JSON format. <a href="https://www.npmjs.com/package/binance-api-node">binance-api-node</a>.',
|
|
29
|
+
type: 'json',
|
|
30
|
+
default: '',
|
|
31
|
+
},
|
|
32
|
+
];
|
|
33
|
+
//# sourceMappingURL=function.properties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function.properties.js","sourceRoot":"","sources":["../../../../../../nodes/Binance/actions/custom/function/function.properties.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAA6B;IACnD;QACC,WAAW,EAAE,qBAAqB;QAClC,IAAI,EAAE,cAAc;QACpB,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,oBAAoB;SACvC;QACD,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,EAAE;KACX;IACD;QACC,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,YAAY;QAClB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,QAAQ,CAAC;gBACpB,SAAS,EAAE,CAAC,UAAU,CAAC;aACvB;SACD;QACD,WAAW,EACV,wIAAwI;QACzI,IAAI,EAAE,MAAM;QACZ,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("./function.execute"), exports);
|
|
18
|
+
__exportStar(require("./function.properties"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/Binance/actions/custom/function/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,wDAAsC"}
|
|
@@ -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("./custom.execute"), exports);
|
|
18
|
+
__exportStar(require("./custom.properties"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Binance/actions/custom/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,sDAAoC"}
|
|
@@ -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.futuresAccountInfo();
|
|
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/future/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,kBAAkB,EAAE,CAAC;IAEzD,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,OAAc,CAAC,CAAC;AACrD,CAAC;AAVD,0BAUC"}
|