n8n-nodes-bitget 1.0.0
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/COMMERCIAL_LICENSE.md +31 -0
- package/LICENSE +46 -0
- package/LICENSING_FAQ.md +18 -0
- package/README.md +356 -0
- package/dist/credentials/BitgetApi.credentials.d.ts +8 -0
- package/dist/credentials/BitgetApi.credentials.d.ts.map +1 -0
- package/dist/credentials/BitgetApi.credentials.js +67 -0
- package/dist/credentials/BitgetApi.credentials.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -0
- package/dist/nodes/Bitget/Bitget.node.d.ts +6 -0
- package/dist/nodes/Bitget/Bitget.node.d.ts.map +1 -0
- package/dist/nodes/Bitget/Bitget.node.js +994 -0
- package/dist/nodes/Bitget/Bitget.node.js.map +1 -0
- package/dist/nodes/Bitget/BitgetTrigger.node.d.ts +6 -0
- package/dist/nodes/Bitget/BitgetTrigger.node.d.ts.map +1 -0
- package/dist/nodes/Bitget/BitgetTrigger.node.js +576 -0
- package/dist/nodes/Bitget/BitgetTrigger.node.js.map +1 -0
- package/dist/nodes/Bitget/actions/copyTrading/index.d.ts +4 -0
- package/dist/nodes/Bitget/actions/copyTrading/index.d.ts.map +1 -0
- package/dist/nodes/Bitget/actions/copyTrading/index.js +519 -0
- package/dist/nodes/Bitget/actions/copyTrading/index.js.map +1 -0
- package/dist/nodes/Bitget/actions/earn/index.d.ts +4 -0
- package/dist/nodes/Bitget/actions/earn/index.d.ts.map +1 -0
- package/dist/nodes/Bitget/actions/earn/index.js +326 -0
- package/dist/nodes/Bitget/actions/earn/index.js.map +1 -0
- package/dist/nodes/Bitget/actions/futuresAccount/index.d.ts +4 -0
- package/dist/nodes/Bitget/actions/futuresAccount/index.d.ts.map +1 -0
- package/dist/nodes/Bitget/actions/futuresAccount/index.js +335 -0
- package/dist/nodes/Bitget/actions/futuresAccount/index.js.map +1 -0
- package/dist/nodes/Bitget/actions/futuresTrading/index.d.ts +4 -0
- package/dist/nodes/Bitget/actions/futuresTrading/index.d.ts.map +1 -0
- package/dist/nodes/Bitget/actions/futuresTrading/index.js +933 -0
- package/dist/nodes/Bitget/actions/futuresTrading/index.js.map +1 -0
- package/dist/nodes/Bitget/actions/marketData/index.d.ts +4 -0
- package/dist/nodes/Bitget/actions/marketData/index.d.ts.map +1 -0
- package/dist/nodes/Bitget/actions/marketData/index.js +303 -0
- package/dist/nodes/Bitget/actions/marketData/index.js.map +1 -0
- package/dist/nodes/Bitget/actions/spotAccount/index.d.ts +4 -0
- package/dist/nodes/Bitget/actions/spotAccount/index.d.ts.map +1 -0
- package/dist/nodes/Bitget/actions/spotAccount/index.js +314 -0
- package/dist/nodes/Bitget/actions/spotAccount/index.js.map +1 -0
- package/dist/nodes/Bitget/actions/spotTrading/index.d.ts +4 -0
- package/dist/nodes/Bitget/actions/spotTrading/index.d.ts.map +1 -0
- package/dist/nodes/Bitget/actions/spotTrading/index.js +575 -0
- package/dist/nodes/Bitget/actions/spotTrading/index.js.map +1 -0
- package/dist/nodes/Bitget/bitget.svg +11 -0
- package/dist/nodes/Bitget/constants/index.d.ts +90 -0
- package/dist/nodes/Bitget/constants/index.d.ts.map +1 -0
- package/dist/nodes/Bitget/constants/index.js +127 -0
- package/dist/nodes/Bitget/constants/index.js.map +1 -0
- package/dist/nodes/Bitget/transport/index.d.ts +22 -0
- package/dist/nodes/Bitget/transport/index.d.ts.map +1 -0
- package/dist/nodes/Bitget/transport/index.js +267 -0
- package/dist/nodes/Bitget/transport/index.js.map +1 -0
- package/dist/nodes/Bitget/types/BitgetTypes.d.ts +396 -0
- package/dist/nodes/Bitget/types/BitgetTypes.d.ts.map +1 -0
- package/dist/nodes/Bitget/types/BitgetTypes.js +74 -0
- package/dist/nodes/Bitget/types/BitgetTypes.js.map +1 -0
- package/dist/nodes/Bitget/utils/index.d.ts +76 -0
- package/dist/nodes/Bitget/utils/index.d.ts.map +1 -0
- package/dist/nodes/Bitget/utils/index.js +210 -0
- package/dist/nodes/Bitget/utils/index.js.map +1 -0
- package/package.json +92 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Commercial License
|
|
2
|
+
|
|
3
|
+
Velocity BPA, LLC offers commercial licenses for its n8n community nodes.
|
|
4
|
+
|
|
5
|
+
## When a Commercial License Is Required
|
|
6
|
+
|
|
7
|
+
A commercial license is required if you:
|
|
8
|
+
- Use this node within a SaaS, PaaS, or hosted platform that is sold or monetized
|
|
9
|
+
- Offer this node as part of a managed services or consulting engagement
|
|
10
|
+
- Bundle or redistribute this node with a paid product
|
|
11
|
+
- Resell, sublicense, or white-label this node
|
|
12
|
+
- Embed this node into a commercial automation or integration platform
|
|
13
|
+
|
|
14
|
+
## What the Commercial License Provides
|
|
15
|
+
|
|
16
|
+
- Legal authorization for commercial deployment
|
|
17
|
+
- Organization-wide usage rights
|
|
18
|
+
- Rights to deploy across multiple environments
|
|
19
|
+
- Optional priority support and maintenance
|
|
20
|
+
- Optional custom development or feature extensions
|
|
21
|
+
|
|
22
|
+
## Licensing Model
|
|
23
|
+
|
|
24
|
+
Licenses are issued on a per-organization basis.
|
|
25
|
+
|
|
26
|
+
Enterprise, OEM, and platform licensing terms are available upon request.
|
|
27
|
+
|
|
28
|
+
## Contact
|
|
29
|
+
|
|
30
|
+
Email: licensing@velobpa.com
|
|
31
|
+
Website: https://velobpa.com
|
package/LICENSE
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
Business Source License 1.1
|
|
2
|
+
|
|
3
|
+
License text copyright (c) 2017 MariaDB Corporation Ab.
|
|
4
|
+
|
|
5
|
+
Licensor:
|
|
6
|
+
Velocity BPA, LLC
|
|
7
|
+
https://velobpa.com
|
|
8
|
+
|
|
9
|
+
Licensed Work:
|
|
10
|
+
This repository and all source code, documentation, and associated artifacts
|
|
11
|
+
contained herein, including all n8n community nodes published by Velocity BPA.
|
|
12
|
+
|
|
13
|
+
Additional Use Grant:
|
|
14
|
+
You may use, modify, and run the Licensed Work free of charge for:
|
|
15
|
+
- Personal use
|
|
16
|
+
- Educational use
|
|
17
|
+
- Research use
|
|
18
|
+
- Internal business use, provided such use does not involve resale,
|
|
19
|
+
redistribution, or offering the Licensed Work as part of a commercial
|
|
20
|
+
product or service.
|
|
21
|
+
|
|
22
|
+
Commercial Use Restriction:
|
|
23
|
+
Commercial Use of the Licensed Work is prohibited without a valid
|
|
24
|
+
Commercial License issued by the Licensor.
|
|
25
|
+
|
|
26
|
+
Commercial Use includes, but is not limited to:
|
|
27
|
+
- Use of the Licensed Work within any Software-as-a-Service (SaaS),
|
|
28
|
+
Platform-as-a-Service (PaaS), or hosted application that is sold,
|
|
29
|
+
licensed, or monetized in any form
|
|
30
|
+
- Offering the Licensed Work as part of a managed services engagement
|
|
31
|
+
- Bundling or redistributing the Licensed Work with a paid product
|
|
32
|
+
- Reselling, sublicensing, or white-labeling the Licensed Work
|
|
33
|
+
- Embedding the Licensed Work into any commercial automation platform,
|
|
34
|
+
integration product, or solution offering
|
|
35
|
+
|
|
36
|
+
Change Date:
|
|
37
|
+
January 1, 2030
|
|
38
|
+
|
|
39
|
+
Change License:
|
|
40
|
+
Apache License, Version 2.0
|
|
41
|
+
|
|
42
|
+
For commercial licensing inquiries:
|
|
43
|
+
licensing@velobpa.com
|
|
44
|
+
|
|
45
|
+
Business Source License 1.1 full text:
|
|
46
|
+
https://mariadb.com/bsl11/
|
package/LICENSING_FAQ.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
## Licensing FAQ
|
|
2
|
+
|
|
3
|
+
### Is internal SaaS infrastructure considered internal use?
|
|
4
|
+
No. If the infrastructure supports a revenue-generating service,
|
|
5
|
+
it is considered commercial use.
|
|
6
|
+
|
|
7
|
+
### What if customers never see the node?
|
|
8
|
+
Visibility is irrelevant. Revenue enablement constitutes commercial use.
|
|
9
|
+
|
|
10
|
+
### What if we are a startup?
|
|
11
|
+
Startups are commercial entities and require a commercial license.
|
|
12
|
+
|
|
13
|
+
### What if we only use one workflow?
|
|
14
|
+
Scope does not change license requirements.
|
|
15
|
+
|
|
16
|
+
### Do proof-of-concepts require a license?
|
|
17
|
+
Internal, non-customer-facing POCs are permitted.
|
|
18
|
+
Production SaaS deployments require a license.
|
package/README.md
ADDED
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
# n8n-nodes-bitget
|
|
2
|
+
|
|
3
|
+
> **[Velocity BPA Licensing Notice]**
|
|
4
|
+
>
|
|
5
|
+
> This n8n node is licensed under the Business Source License 1.1 (BSL 1.1).
|
|
6
|
+
>
|
|
7
|
+
> Use of this node by for-profit organizations in production environments requires a commercial license from Velocity BPA.
|
|
8
|
+
>
|
|
9
|
+
> For licensing information, visit https://velobpa.com/licensing or contact licensing@velobpa.com.
|
|
10
|
+
|
|
11
|
+
A comprehensive n8n community node for Bitget cryptocurrency exchange, providing full API v2 support for spot trading, futures trading, copy trading, market data, and earn products.
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+

|
|
15
|
+

|
|
16
|
+

|
|
17
|
+
|
|
18
|
+
## Features
|
|
19
|
+
|
|
20
|
+
- **Spot Trading**: Place orders, manage positions, view balances, and access trade history
|
|
21
|
+
- **Futures Trading**: USDT-M, USDC-M, and Coin-M perpetual contracts with leverage up to 125x
|
|
22
|
+
- **Copy Trading**: Follow elite traders, manage copy settings, and close copied positions
|
|
23
|
+
- **Market Data**: Real-time tickers, order books, candlesticks, and recent trades
|
|
24
|
+
- **Earn Products**: Flexible and fixed savings products subscription and redemption
|
|
25
|
+
- **Polling Triggers**: Price alerts, order fills, position changes, and balance updates
|
|
26
|
+
- **Demo Trading**: Full support for paper trading environment
|
|
27
|
+
|
|
28
|
+
## Installation
|
|
29
|
+
|
|
30
|
+
### Community Nodes (Recommended)
|
|
31
|
+
|
|
32
|
+
1. Open your n8n instance
|
|
33
|
+
2. Go to **Settings** > **Community Nodes**
|
|
34
|
+
3. Click **Install a community node**
|
|
35
|
+
4. Enter `n8n-nodes-bitget`
|
|
36
|
+
5. Click **Install**
|
|
37
|
+
|
|
38
|
+
### Manual Installation
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# Navigate to your n8n installation directory
|
|
42
|
+
cd ~/.n8n
|
|
43
|
+
|
|
44
|
+
# Install the package
|
|
45
|
+
npm install n8n-nodes-bitget
|
|
46
|
+
|
|
47
|
+
# Restart n8n
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Development Installation
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# Clone or extract the repository
|
|
54
|
+
git clone https://github.com/Velocity-BPA/n8n-nodes-bitget.git
|
|
55
|
+
cd n8n-nodes-bitget
|
|
56
|
+
|
|
57
|
+
# Install dependencies
|
|
58
|
+
npm install
|
|
59
|
+
|
|
60
|
+
# Build the project
|
|
61
|
+
npm run build
|
|
62
|
+
|
|
63
|
+
# Create symlink to n8n custom nodes
|
|
64
|
+
mkdir -p ~/.n8n/custom
|
|
65
|
+
ln -s $(pwd) ~/.n8n/custom/n8n-nodes-bitget
|
|
66
|
+
|
|
67
|
+
# Restart n8n
|
|
68
|
+
n8n start
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Credentials Setup
|
|
72
|
+
|
|
73
|
+
### Creating API Keys
|
|
74
|
+
|
|
75
|
+
1. Log in to your [Bitget account](https://www.bitget.com)
|
|
76
|
+
2. Navigate to **API Management**
|
|
77
|
+
3. Click **Create API Key**
|
|
78
|
+
4. Set permissions based on your needs:
|
|
79
|
+
- **Read**: Market data, balances, order history
|
|
80
|
+
- **Trade**: Place and cancel orders
|
|
81
|
+
- **Transfer**: Move funds between accounts
|
|
82
|
+
5. Set IP whitelist (recommended for production)
|
|
83
|
+
6. Save your API Key, Secret Key, and Passphrase
|
|
84
|
+
|
|
85
|
+
### Configuring in n8n
|
|
86
|
+
|
|
87
|
+
| Field | Description |
|
|
88
|
+
|-------|-------------|
|
|
89
|
+
| API Key | Your Bitget API key |
|
|
90
|
+
| Secret Key | Your Bitget API secret |
|
|
91
|
+
| Passphrase | The passphrase you set when creating the API key |
|
|
92
|
+
| Environment | `production` for real trading, `demo` for paper trading |
|
|
93
|
+
|
|
94
|
+
## Resources & Operations
|
|
95
|
+
|
|
96
|
+
### Spot Account
|
|
97
|
+
| Operation | Description |
|
|
98
|
+
|-----------|-------------|
|
|
99
|
+
| Get Balance | Retrieve spot account balances |
|
|
100
|
+
| Get Bills | View transaction history |
|
|
101
|
+
| Transfer | Transfer funds between accounts |
|
|
102
|
+
| Get Transfer History | View transfer records |
|
|
103
|
+
|
|
104
|
+
### Spot Trading
|
|
105
|
+
| Operation | Description |
|
|
106
|
+
|-----------|-------------|
|
|
107
|
+
| Place Order | Submit market or limit orders |
|
|
108
|
+
| Batch Place Orders | Submit up to 50 orders at once |
|
|
109
|
+
| Cancel Order | Cancel a specific order |
|
|
110
|
+
| Batch Cancel Orders | Cancel multiple orders |
|
|
111
|
+
| Get Open Orders | View current open orders |
|
|
112
|
+
| Get Order History | View historical orders |
|
|
113
|
+
| Get Order Detail | Get details of a specific order |
|
|
114
|
+
| Get Fills | View trade executions |
|
|
115
|
+
|
|
116
|
+
### Futures Account
|
|
117
|
+
| Operation | Description |
|
|
118
|
+
|-----------|-------------|
|
|
119
|
+
| Get Account | Retrieve futures account info |
|
|
120
|
+
| Get Positions | View all open positions |
|
|
121
|
+
| Get Single Position | Get specific position details |
|
|
122
|
+
| Set Leverage | Adjust leverage (1-125x) |
|
|
123
|
+
| Set Margin Mode | Switch between cross/isolated margin |
|
|
124
|
+
| Get Bills | View futures transaction history |
|
|
125
|
+
|
|
126
|
+
### Futures Trading
|
|
127
|
+
| Operation | Description |
|
|
128
|
+
|-----------|-------------|
|
|
129
|
+
| Place Order | Open/close futures positions |
|
|
130
|
+
| Batch Place Orders | Submit multiple orders |
|
|
131
|
+
| Modify Order | Update existing order |
|
|
132
|
+
| Cancel Order | Cancel specific order |
|
|
133
|
+
| Cancel All Orders | Cancel all orders for a symbol |
|
|
134
|
+
| Get Open Orders | View current orders |
|
|
135
|
+
| Get Order History | View historical orders |
|
|
136
|
+
| Get Fills | View trade executions |
|
|
137
|
+
| Place Plan Order | Create trigger/stop orders |
|
|
138
|
+
| Cancel Plan Order | Cancel trigger orders |
|
|
139
|
+
| Get Plan Orders | View pending trigger orders |
|
|
140
|
+
|
|
141
|
+
### Copy Trading
|
|
142
|
+
| Operation | Description |
|
|
143
|
+
|-----------|-------------|
|
|
144
|
+
| Get Traders | List elite traders to follow |
|
|
145
|
+
| Get Trader Positions | View a trader's positions |
|
|
146
|
+
| Follow Trader | Start copying a trader |
|
|
147
|
+
| Unfollow Trader | Stop copying |
|
|
148
|
+
| Get Follow Settings | View copy settings |
|
|
149
|
+
| Update Follow Settings | Modify copy ratio/amount |
|
|
150
|
+
| Get Follower History | View copy trade history |
|
|
151
|
+
| Close Follower Position | Close a copied position |
|
|
152
|
+
|
|
153
|
+
### Market Data
|
|
154
|
+
| Operation | Description |
|
|
155
|
+
|-----------|-------------|
|
|
156
|
+
| Get Tickers | All market tickers |
|
|
157
|
+
| Get Ticker | Single symbol ticker |
|
|
158
|
+
| Get Order Book | Market depth data |
|
|
159
|
+
| Get Candles | OHLCV candlestick data |
|
|
160
|
+
| Get Trades | Recent market trades |
|
|
161
|
+
| Get Symbols | Trading pairs info |
|
|
162
|
+
| Get Server Time | Exchange server time |
|
|
163
|
+
|
|
164
|
+
### Earn Products
|
|
165
|
+
| Operation | Description |
|
|
166
|
+
|-----------|-------------|
|
|
167
|
+
| Get Products | List available earn products |
|
|
168
|
+
| Subscribe | Subscribe to a product |
|
|
169
|
+
| Redeem | Redeem from a product |
|
|
170
|
+
| Get Subscriptions | View active subscriptions |
|
|
171
|
+
| Get History | View subscription history |
|
|
172
|
+
|
|
173
|
+
## Trigger Node
|
|
174
|
+
|
|
175
|
+
The Bitget Trigger node provides polling-based triggers for various events:
|
|
176
|
+
|
|
177
|
+
| Event | Description | Requires Auth |
|
|
178
|
+
|-------|-------------|---------------|
|
|
179
|
+
| Price Alert | Trigger when price crosses threshold | No |
|
|
180
|
+
| Order Filled | Trigger when orders are executed | Yes |
|
|
181
|
+
| Position Change | Trigger when futures positions change | Yes |
|
|
182
|
+
| Balance Change | Trigger when account balance changes | Yes |
|
|
183
|
+
| New Trade | Trigger on new market trades | No |
|
|
184
|
+
|
|
185
|
+
## Usage Examples
|
|
186
|
+
|
|
187
|
+
### Place a Spot Market Order
|
|
188
|
+
|
|
189
|
+
```json
|
|
190
|
+
{
|
|
191
|
+
"resource": "spotTrading",
|
|
192
|
+
"operation": "placeOrder",
|
|
193
|
+
"symbol": "BTCUSDT",
|
|
194
|
+
"side": "buy",
|
|
195
|
+
"orderType": "market",
|
|
196
|
+
"size": "0.001"
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Open a Long Futures Position
|
|
201
|
+
|
|
202
|
+
```json
|
|
203
|
+
{
|
|
204
|
+
"resource": "futuresTrading",
|
|
205
|
+
"operation": "placeOrder",
|
|
206
|
+
"productType": "USDT-FUTURES",
|
|
207
|
+
"symbol": "BTCUSDT",
|
|
208
|
+
"side": "open_long",
|
|
209
|
+
"orderType": "limit",
|
|
210
|
+
"price": "40000",
|
|
211
|
+
"size": "0.01",
|
|
212
|
+
"marginCoin": "USDT"
|
|
213
|
+
}
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### Follow a Trader
|
|
217
|
+
|
|
218
|
+
```json
|
|
219
|
+
{
|
|
220
|
+
"resource": "copyTrading",
|
|
221
|
+
"operation": "followTrader",
|
|
222
|
+
"traderId": "123456789",
|
|
223
|
+
"productType": "USDT-FUTURES",
|
|
224
|
+
"copyMode": "fixedAmount",
|
|
225
|
+
"fixedAmount": "100",
|
|
226
|
+
"maxFollowAmount": "1000"
|
|
227
|
+
}
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### Get OHLCV Candlesticks
|
|
231
|
+
|
|
232
|
+
```json
|
|
233
|
+
{
|
|
234
|
+
"resource": "marketData",
|
|
235
|
+
"operation": "getCandles",
|
|
236
|
+
"marketType": "spot",
|
|
237
|
+
"symbol": "BTCUSDT",
|
|
238
|
+
"granularity": "1H",
|
|
239
|
+
"limit": 100
|
|
240
|
+
}
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
## Bitget API Concepts
|
|
244
|
+
|
|
245
|
+
### Product Types (Futures)
|
|
246
|
+
- **USDT-FUTURES**: USDT-margined perpetual contracts
|
|
247
|
+
- **USDC-FUTURES**: USDC-margined perpetual contracts
|
|
248
|
+
- **COIN-FUTURES**: Coin-margined (inverse) perpetual contracts
|
|
249
|
+
|
|
250
|
+
### Order Types
|
|
251
|
+
- **limit**: Specify exact price
|
|
252
|
+
- **market**: Execute at best available price
|
|
253
|
+
|
|
254
|
+
### Time in Force
|
|
255
|
+
- **GTC** (Good Till Cancel): Order remains until filled or canceled
|
|
256
|
+
- **IOC** (Immediate or Cancel): Fill immediately or cancel remaining
|
|
257
|
+
- **FOK** (Fill or Kill): Fill entirely or cancel completely
|
|
258
|
+
- **post_only**: Only add liquidity, never take
|
|
259
|
+
|
|
260
|
+
### Margin Modes
|
|
261
|
+
- **crossed**: Share margin across all positions
|
|
262
|
+
- **isolated**: Dedicate margin to specific position
|
|
263
|
+
|
|
264
|
+
## Error Handling
|
|
265
|
+
|
|
266
|
+
The node handles common Bitget API errors:
|
|
267
|
+
|
|
268
|
+
| Code | Description |
|
|
269
|
+
|------|-------------|
|
|
270
|
+
| 00000 | Success |
|
|
271
|
+
| 40001 | Invalid API key |
|
|
272
|
+
| 40002 | Invalid signature |
|
|
273
|
+
| 40003 | Invalid timestamp |
|
|
274
|
+
| 40004 | API key expired |
|
|
275
|
+
| 40005 | Permission denied |
|
|
276
|
+
| 40006 | Rate limit exceeded |
|
|
277
|
+
| 40007 | IP not whitelisted |
|
|
278
|
+
| 43001 | Insufficient balance |
|
|
279
|
+
| 43002 | Order not found |
|
|
280
|
+
| 43003 | Order already cancelled |
|
|
281
|
+
| 45001 | Position not found |
|
|
282
|
+
| 45002 | Leverage exceeds limit |
|
|
283
|
+
|
|
284
|
+
Rate limit errors automatically retry with exponential backoff.
|
|
285
|
+
|
|
286
|
+
## Security Best Practices
|
|
287
|
+
|
|
288
|
+
1. **Use IP Whitelisting**: Restrict API access to known IPs
|
|
289
|
+
2. **Minimal Permissions**: Only enable required permissions
|
|
290
|
+
3. **Demo Environment**: Test workflows in paper trading first
|
|
291
|
+
4. **Secure Credentials**: Never expose API keys in workflows
|
|
292
|
+
5. **Regular Rotation**: Periodically rotate API keys
|
|
293
|
+
|
|
294
|
+
## Development
|
|
295
|
+
|
|
296
|
+
```bash
|
|
297
|
+
# Install dependencies
|
|
298
|
+
npm install
|
|
299
|
+
|
|
300
|
+
# Build
|
|
301
|
+
npm run build
|
|
302
|
+
|
|
303
|
+
# Run tests
|
|
304
|
+
npm test
|
|
305
|
+
|
|
306
|
+
# Run tests with coverage
|
|
307
|
+
npm run test:coverage
|
|
308
|
+
|
|
309
|
+
# Lint
|
|
310
|
+
npm run lint
|
|
311
|
+
|
|
312
|
+
# Format code
|
|
313
|
+
npm run format
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
## Author
|
|
317
|
+
|
|
318
|
+
**Velocity BPA**
|
|
319
|
+
- Website: [velobpa.com](https://velobpa.com)
|
|
320
|
+
- GitHub: [Velocity-BPA](https://github.com/Velocity-BPA)
|
|
321
|
+
|
|
322
|
+
## Licensing
|
|
323
|
+
|
|
324
|
+
This n8n community node is licensed under the **Business Source License 1.1**.
|
|
325
|
+
|
|
326
|
+
### Free Use
|
|
327
|
+
Permitted for personal, educational, research, and internal business use.
|
|
328
|
+
|
|
329
|
+
### Commercial Use
|
|
330
|
+
Use of this node within any SaaS, PaaS, hosted platform, managed service,
|
|
331
|
+
or paid automation offering requires a commercial license.
|
|
332
|
+
|
|
333
|
+
For licensing inquiries:
|
|
334
|
+
**licensing@velobpa.com**
|
|
335
|
+
|
|
336
|
+
See [LICENSE](LICENSE), [COMMERCIAL_LICENSE.md](COMMERCIAL_LICENSE.md), and [LICENSING_FAQ.md](LICENSING_FAQ.md) for details.
|
|
337
|
+
|
|
338
|
+
## Contributing
|
|
339
|
+
|
|
340
|
+
1. Fork the repository
|
|
341
|
+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
342
|
+
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
343
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
344
|
+
5. Open a Pull Request
|
|
345
|
+
|
|
346
|
+
## Support
|
|
347
|
+
|
|
348
|
+
- **Issues**: [GitHub Issues](https://github.com/Velocity-BPA/n8n-nodes-bitget/issues)
|
|
349
|
+
- **Licensing**: licensing@velobpa.com
|
|
350
|
+
- **General**: support@velobpa.com
|
|
351
|
+
|
|
352
|
+
## Acknowledgments
|
|
353
|
+
|
|
354
|
+
- [n8n](https://n8n.io) - Workflow automation platform
|
|
355
|
+
- [Bitget](https://www.bitget.com) - Cryptocurrency exchange
|
|
356
|
+
- [Velocity BPA](https://velobpa.com) - Business process automation
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class BitgetApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
properties: INodeProperties[];
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=BitgetApi.credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BitgetApi.credentials.d.ts","sourceRoot":"","sources":["../../credentials/BitgetApi.credentials.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEhE,qBAAa,SAAU,YAAW,eAAe;IAC/C,IAAI,SAAe;IACnB,WAAW,SAAgB;IAC3B,gBAAgB,SAAiD;IAEjE,UAAU,EAAE,eAAe,EAAE,CAgD3B;CACH"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) Velocity BPA, LLC
|
|
4
|
+
* Licensed under the Business Source License 1.1
|
|
5
|
+
* Commercial use requires a separate commercial license.
|
|
6
|
+
* See LICENSE file for details.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.BitgetApi = void 0;
|
|
10
|
+
class BitgetApi {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.name = 'bitgetApi';
|
|
13
|
+
this.displayName = 'Bitget API';
|
|
14
|
+
this.documentationUrl = 'https://www.bitget.com/api-doc/common/intro';
|
|
15
|
+
this.properties = [
|
|
16
|
+
{
|
|
17
|
+
displayName: 'API Key',
|
|
18
|
+
name: 'apiKey',
|
|
19
|
+
type: 'string',
|
|
20
|
+
default: '',
|
|
21
|
+
required: true,
|
|
22
|
+
description: 'Your Bitget API Key from the API management dashboard',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
displayName: 'Secret Key',
|
|
26
|
+
name: 'secretKey',
|
|
27
|
+
type: 'string',
|
|
28
|
+
typeOptions: {
|
|
29
|
+
password: true,
|
|
30
|
+
},
|
|
31
|
+
default: '',
|
|
32
|
+
required: true,
|
|
33
|
+
description: 'Your Bitget API Secret Key',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
displayName: 'Passphrase',
|
|
37
|
+
name: 'passphrase',
|
|
38
|
+
type: 'string',
|
|
39
|
+
typeOptions: {
|
|
40
|
+
password: true,
|
|
41
|
+
},
|
|
42
|
+
default: '',
|
|
43
|
+
required: true,
|
|
44
|
+
description: 'The passphrase you set when creating the API key',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
displayName: 'Environment',
|
|
48
|
+
name: 'environment',
|
|
49
|
+
type: 'options',
|
|
50
|
+
options: [
|
|
51
|
+
{
|
|
52
|
+
name: 'Production',
|
|
53
|
+
value: 'production',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: 'Demo (Paper Trading)',
|
|
57
|
+
value: 'demo',
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
default: 'production',
|
|
61
|
+
description: 'Choose between production and demo/paper trading environment',
|
|
62
|
+
},
|
|
63
|
+
];
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.BitgetApi = BitgetApi;
|
|
67
|
+
//# sourceMappingURL=BitgetApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BitgetApi.credentials.js","sourceRoot":"","sources":["../../credentials/BitgetApi.credentials.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAIH,MAAa,SAAS;IAAtB;QACE,SAAI,GAAG,WAAW,CAAC;QACnB,gBAAW,GAAG,YAAY,CAAC;QAC3B,qBAAgB,GAAG,6CAA6C,CAAC;QAEjE,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,uDAAuD;aACrE;YACD;gBACE,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACX,QAAQ,EAAE,IAAI;iBACf;gBACD,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,4BAA4B;aAC1C;YACD;gBACE,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACX,QAAQ,EAAE,IAAI;iBACf;gBACD,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,kDAAkD;aAChE;YACD;gBACE,WAAW,EAAE,aAAa;gBAC1B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,YAAY;wBAClB,KAAK,EAAE,YAAY;qBACpB;oBACD;wBACE,IAAI,EAAE,sBAAsB;wBAC5B,KAAK,EAAE,MAAM;qBACd;iBACF;gBACD,OAAO,EAAE,YAAY;gBACrB,WAAW,EAAE,8DAA8D;aAC5E;SACF,CAAC;IACJ,CAAC;CAAA;AAtDD,8BAsDC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAOA,cAAc,qCAAqC,CAAC;AACpD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) Velocity BPA, LLC
|
|
4
|
+
* Licensed under the Business Source License 1.1
|
|
5
|
+
* Commercial use requires a separate commercial license.
|
|
6
|
+
* See LICENSE file for details.
|
|
7
|
+
*/
|
|
8
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
}) : (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
}));
|
|
19
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
20
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
21
|
+
};
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
__exportStar(require("./credentials/BitgetApi.credentials"), exports);
|
|
24
|
+
__exportStar(require("./nodes/Bitget/Bitget.node"), exports);
|
|
25
|
+
__exportStar(require("./nodes/Bitget/BitgetTrigger.node"), exports);
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,sEAAoD;AACpD,6DAA2C;AAC3C,oEAAkD"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class Bitget implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=Bitget.node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Bitget.node.d.ts","sourceRoot":"","sources":["../../../nodes/Bitget/Bitget.node.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,oBAAoB,EAErB,MAAM,cAAc,CAAC;AAuBtB,qBAAa,MAAO,YAAW,SAAS;IACtC,WAAW,EAAE,oBAAoB,CAiF/B;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CA+DxE"}
|