n8n-nodes-deribit 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.
Files changed (72) hide show
  1. package/LICENSE +46 -0
  2. package/README.md +378 -0
  3. package/dist/credentials/DeribitApi.credentials.d.ts +10 -0
  4. package/dist/credentials/DeribitApi.credentials.d.ts.map +1 -0
  5. package/dist/credentials/DeribitApi.credentials.js +72 -0
  6. package/dist/credentials/DeribitApi.credentials.js.map +1 -0
  7. package/dist/index.d.ts +4 -0
  8. package/dist/index.d.ts.map +1 -0
  9. package/dist/index.js +26 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/nodes/Deribit/Deribit.node.d.ts +6 -0
  12. package/dist/nodes/Deribit/Deribit.node.d.ts.map +1 -0
  13. package/dist/nodes/Deribit/Deribit.node.js +197 -0
  14. package/dist/nodes/Deribit/Deribit.node.js.map +1 -0
  15. package/dist/nodes/Deribit/DeribitTrigger.node.d.ts +6 -0
  16. package/dist/nodes/Deribit/DeribitTrigger.node.d.ts.map +1 -0
  17. package/dist/nodes/Deribit/DeribitTrigger.node.js +283 -0
  18. package/dist/nodes/Deribit/DeribitTrigger.node.js.map +1 -0
  19. package/dist/nodes/Deribit/actions/account/index.d.ts +5 -0
  20. package/dist/nodes/Deribit/actions/account/index.d.ts.map +1 -0
  21. package/dist/nodes/Deribit/actions/account/index.js +278 -0
  22. package/dist/nodes/Deribit/actions/account/index.js.map +1 -0
  23. package/dist/nodes/Deribit/actions/authentication/index.d.ts +5 -0
  24. package/dist/nodes/Deribit/actions/authentication/index.d.ts.map +1 -0
  25. package/dist/nodes/Deribit/actions/authentication/index.js +123 -0
  26. package/dist/nodes/Deribit/actions/authentication/index.js.map +1 -0
  27. package/dist/nodes/Deribit/actions/blockTrade/index.d.ts +5 -0
  28. package/dist/nodes/Deribit/actions/blockTrade/index.d.ts.map +1 -0
  29. package/dist/nodes/Deribit/actions/blockTrade/index.js +206 -0
  30. package/dist/nodes/Deribit/actions/blockTrade/index.js.map +1 -0
  31. package/dist/nodes/Deribit/actions/combo/index.d.ts +5 -0
  32. package/dist/nodes/Deribit/actions/combo/index.d.ts.map +1 -0
  33. package/dist/nodes/Deribit/actions/combo/index.js +130 -0
  34. package/dist/nodes/Deribit/actions/combo/index.js.map +1 -0
  35. package/dist/nodes/Deribit/actions/marketData/index.d.ts +5 -0
  36. package/dist/nodes/Deribit/actions/marketData/index.d.ts.map +1 -0
  37. package/dist/nodes/Deribit/actions/marketData/index.js +562 -0
  38. package/dist/nodes/Deribit/actions/marketData/index.js.map +1 -0
  39. package/dist/nodes/Deribit/actions/options/index.d.ts +5 -0
  40. package/dist/nodes/Deribit/actions/options/index.d.ts.map +1 -0
  41. package/dist/nodes/Deribit/actions/options/index.js +82 -0
  42. package/dist/nodes/Deribit/actions/options/index.js.map +1 -0
  43. package/dist/nodes/Deribit/actions/portfolio/index.d.ts +5 -0
  44. package/dist/nodes/Deribit/actions/portfolio/index.d.ts.map +1 -0
  45. package/dist/nodes/Deribit/actions/portfolio/index.js +120 -0
  46. package/dist/nodes/Deribit/actions/portfolio/index.js.map +1 -0
  47. package/dist/nodes/Deribit/actions/public/index.d.ts +5 -0
  48. package/dist/nodes/Deribit/actions/public/index.d.ts.map +1 -0
  49. package/dist/nodes/Deribit/actions/public/index.js +75 -0
  50. package/dist/nodes/Deribit/actions/public/index.js.map +1 -0
  51. package/dist/nodes/Deribit/actions/trading/index.d.ts +5 -0
  52. package/dist/nodes/Deribit/actions/trading/index.d.ts.map +1 -0
  53. package/dist/nodes/Deribit/actions/trading/index.js +612 -0
  54. package/dist/nodes/Deribit/actions/trading/index.js.map +1 -0
  55. package/dist/nodes/Deribit/actions/wallet/index.d.ts +5 -0
  56. package/dist/nodes/Deribit/actions/wallet/index.d.ts.map +1 -0
  57. package/dist/nodes/Deribit/actions/wallet/index.js +279 -0
  58. package/dist/nodes/Deribit/actions/wallet/index.js.map +1 -0
  59. package/dist/nodes/Deribit/constants/index.d.ts +112 -0
  60. package/dist/nodes/Deribit/constants/index.d.ts.map +1 -0
  61. package/dist/nodes/Deribit/constants/index.js +93 -0
  62. package/dist/nodes/Deribit/constants/index.js.map +1 -0
  63. package/dist/nodes/Deribit/deribit.svg +5 -0
  64. package/dist/nodes/Deribit/transport/index.d.ts +33 -0
  65. package/dist/nodes/Deribit/transport/index.d.ts.map +1 -0
  66. package/dist/nodes/Deribit/transport/index.js +158 -0
  67. package/dist/nodes/Deribit/transport/index.js.map +1 -0
  68. package/dist/nodes/Deribit/utils/index.d.ts +36 -0
  69. package/dist/nodes/Deribit/utils/index.d.ts.map +1 -0
  70. package/dist/nodes/Deribit/utils/index.js +115 -0
  71. package/dist/nodes/Deribit/utils/index.js.map +1 -0
  72. package/package.json +85 -0
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/README.md ADDED
@@ -0,0 +1,378 @@
1
+ # n8n-nodes-deribit
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 **Deribit**, the world's largest cryptocurrency options and derivatives exchange. This node provides full access to Deribit's REST API v2 for trading options, perpetual futures, and futures contracts with up to 50x leverage.
12
+
13
+ ![n8n Version](https://img.shields.io/badge/n8n-community--node-orange)
14
+ ![Node Version](https://img.shields.io/badge/version-1.0.0-blue)
15
+ ![License](https://img.shields.io/badge/license-BSL--1.1-blue)
16
+ ![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue)
17
+
18
+ ## Features
19
+
20
+ - **Complete Trading Operations**: Place market, limit, stop-limit, and stop-market orders
21
+ - **Options Trading**: Full support for BTC and ETH options with Greeks data
22
+ - **Perpetual Futures**: Trade perpetual contracts with up to 50x leverage
23
+ - **Portfolio Management**: Monitor positions, margins, and account balances
24
+ - **Market Data**: Access real-time order books, tickers, trades, and OHLCV data
25
+ - **Block Trading**: Execute and verify block trades for institutional volumes
26
+ - **Wallet Management**: Handle deposits, withdrawals, and internal transfers
27
+ - **Testnet Support**: Safe testing environment with testnet API
28
+ - **Polling Triggers**: React to order fills, position changes, settlements, and more
29
+ - **OAuth 2.0 Authentication**: Secure API access with automatic token refresh
30
+
31
+ ## Installation
32
+
33
+ ### Community Nodes (Recommended)
34
+
35
+ 1. Open n8n
36
+ 2. Go to **Settings** → **Community Nodes**
37
+ 3. Click **Install**
38
+ 4. Enter `n8n-nodes-deribit`
39
+ 5. Click **Install**
40
+
41
+ ### Manual Installation
42
+
43
+ ```bash
44
+ # Navigate to your n8n installation
45
+ cd ~/.n8n
46
+
47
+ # Install the package
48
+ npm install n8n-nodes-deribit
49
+
50
+ # Restart n8n
51
+ ```
52
+
53
+ ### Development Installation
54
+
55
+ ```bash
56
+ # Clone and build
57
+ git clone https://github.com/Velocity-BPA/n8n-nodes-deribit.git
58
+ cd n8n-nodes-deribit
59
+ npm install
60
+ npm run build
61
+
62
+ # Link to n8n
63
+ mkdir -p ~/.n8n/custom
64
+ ln -s $(pwd) ~/.n8n/custom/n8n-nodes-deribit
65
+
66
+ # Restart n8n
67
+ ```
68
+
69
+ ## Credentials Setup
70
+
71
+ | Field | Description |
72
+ |-------|-------------|
73
+ | **Client ID** | Your Deribit API client ID |
74
+ | **Client Secret** | Your Deribit API client secret |
75
+ | **Environment** | Production or Testnet |
76
+
77
+ ### Getting API Credentials
78
+
79
+ 1. Log in to your Deribit account
80
+ 2. Navigate to **Account** → **API**
81
+ 3. Click **Add New Key**
82
+ 4. Set appropriate permissions (read, trade, wallet)
83
+ 5. Copy the Client ID and Client Secret
84
+
85
+ > **Note**: Use testnet credentials for development. Get testnet credentials at https://test.deribit.com
86
+
87
+ ## Resources & Operations
88
+
89
+ ### Authentication
90
+ | Operation | Description |
91
+ |-----------|-------------|
92
+ | `auth` | Get access token using client credentials |
93
+ | `refreshToken` | Refresh access token |
94
+ | `logout` | Invalidate token |
95
+ | `forkToken` | Clone session token for multiple connections |
96
+
97
+ ### Account
98
+ | Operation | Description |
99
+ |-----------|-------------|
100
+ | `getAccountSummary` | Get account summary by currency |
101
+ | `getPositions` | Get all positions for currency |
102
+ | `getPosition` | Get position for specific instrument |
103
+ | `getSubaccounts` | List subaccounts |
104
+ | `createSubaccount` | Create new subaccount |
105
+ | `changeSubaccountName` | Rename subaccount |
106
+ | `getTransactionLog` | Get transaction history |
107
+ | `getAnnouncements` | Get platform announcements |
108
+
109
+ ### Trading
110
+ | Operation | Description |
111
+ |-----------|-------------|
112
+ | `buy` | Place buy order |
113
+ | `sell` | Place sell order |
114
+ | `edit` | Modify existing order |
115
+ | `cancel` | Cancel order by ID |
116
+ | `cancelAll` | Cancel all orders |
117
+ | `cancelAllByCurrency` | Cancel all by currency |
118
+ | `cancelAllByInstrument` | Cancel all by instrument |
119
+ | `cancelByLabel` | Cancel orders by label |
120
+ | `closePosition` | Close position for instrument |
121
+ | `getMargins` | Calculate margin for order |
122
+ | `getOpenOrders` | Get open orders |
123
+ | `getOpenOrdersByCurrency` | Get open orders by currency |
124
+ | `getOpenOrdersByInstrument` | Get open orders by instrument |
125
+ | `getOrderHistory` | Get order history |
126
+ | `getOrderState` | Get order status |
127
+ | `getUserTradesByCurrency` | Get trades by currency |
128
+ | `getUserTradesByInstrument` | Get trades by instrument |
129
+ | `getUserTradesByOrder` | Get trades by order |
130
+
131
+ ### Market Data
132
+ | Operation | Description |
133
+ |-----------|-------------|
134
+ | `getBookSummaryByCurrency` | Get order book summary |
135
+ | `getBookSummaryByInstrument` | Get book for instrument |
136
+ | `getContractSize` | Get contract size |
137
+ | `getCurrencies` | Get supported currencies |
138
+ | `getDeliveryPrices` | Get delivery prices |
139
+ | `getFundingChartData` | Get funding rate chart |
140
+ | `getFundingRateHistory` | Get funding rate history |
141
+ | `getFundingRateValue` | Get current funding rate |
142
+ | `getHistoricalVolatility` | Get historical volatility |
143
+ | `getIndexPrice` | Get index price |
144
+ | `getIndexPriceNames` | Get index names |
145
+ | `getInstrument` | Get instrument details |
146
+ | `getInstruments` | Get all instruments |
147
+ | `getLastSettlementsByCurrency` | Get settlements |
148
+ | `getLastTradesByCurrency` | Get recent trades |
149
+ | `getLastTradesByInstrument` | Get trades for instrument |
150
+ | `getMarkPriceHistory` | Get mark price history |
151
+ | `getOrderBook` | Get order book |
152
+ | `getTicker` | Get ticker for instrument |
153
+ | `getTradingviewChartData` | Get OHLCV data |
154
+ | `getVolatilityIndexData` | Get volatility index |
155
+
156
+ ### Options
157
+ | Operation | Description |
158
+ |-----------|-------------|
159
+ | `getOptionMarkPrices` | Get option mark prices |
160
+ | `getOptionSummary` | Get option summary data |
161
+
162
+ ### Portfolio
163
+ | Operation | Description |
164
+ |-----------|-------------|
165
+ | `getPortfolioMargins` | Get portfolio margin info |
166
+ | `simulatePortfolio` | Simulate portfolio changes |
167
+
168
+ ### Wallet
169
+ | Operation | Description |
170
+ |-----------|-------------|
171
+ | `getDeposits` | Get deposit history |
172
+ | `getWithdrawals` | Get withdrawal history |
173
+ | `withdraw` | Request withdrawal |
174
+ | `cancelWithdrawal` | Cancel pending withdrawal |
175
+ | `getTransfers` | Get internal transfers |
176
+ | `createTransfer` | Transfer between accounts |
177
+
178
+ ### Block Trade
179
+ | Operation | Description |
180
+ |-----------|-------------|
181
+ | `getBlockTrades` | Get block trade history |
182
+ | `executeBlockTrade` | Execute block trade |
183
+ | `verifyBlockTrade` | Verify block trade |
184
+ | `invalidateBlockTradeSignature` | Invalidate signature |
185
+
186
+ ### Combo
187
+ | Operation | Description |
188
+ |-----------|-------------|
189
+ | `getCombos` | Get combo instruments |
190
+ | `createCombo` | Create combo order |
191
+
192
+ ### Public
193
+ | Operation | Description |
194
+ |-----------|-------------|
195
+ | `getTime` | Get server time |
196
+ | `test` | Test API connectivity |
197
+ | `status` | Get exchange status |
198
+
199
+ ## Trigger Node
200
+
201
+ The **Deribit Trigger** node provides poll-based triggers for trading events:
202
+
203
+ | Trigger | Description |
204
+ |---------|-------------|
205
+ | `newOrder` | Fires when a new order is placed |
206
+ | `orderFilled` | Fires when an order is executed |
207
+ | `orderCanceled` | Fires when an order is canceled |
208
+ | `positionChanged` | Fires when a position is updated |
209
+ | `priceAlert` | Fires when price crosses a threshold |
210
+ | `settlementOccurred` | Fires on settlement events |
211
+ | `fundingRateChanged` | Fires when funding rate updates |
212
+
213
+ ## Usage Examples
214
+
215
+ ### Place a Limit Order
216
+
217
+ ```javascript
218
+ // Buy 0.1 BTC perpetual at $50,000
219
+ {
220
+ "resource": "trading",
221
+ "operation": "buy",
222
+ "instrumentName": "BTC-PERPETUAL",
223
+ "amount": 0.1,
224
+ "type": "limit",
225
+ "price": 50000,
226
+ "timeInForce": "good_til_cancelled"
227
+ }
228
+ ```
229
+
230
+ ### Get Option Chain
231
+
232
+ ```javascript
233
+ // Get all BTC options expiring in June
234
+ {
235
+ "resource": "marketData",
236
+ "operation": "getInstruments",
237
+ "currency": "BTC",
238
+ "kind": "option",
239
+ "expired": false
240
+ }
241
+ ```
242
+
243
+ ### Monitor Portfolio
244
+
245
+ ```javascript
246
+ // Get current BTC positions and margins
247
+ {
248
+ "resource": "account",
249
+ "operation": "getAccountSummary",
250
+ "currency": "BTC",
251
+ "extended": true
252
+ }
253
+ ```
254
+
255
+ ## Deribit Concepts
256
+
257
+ ### Instrument Names
258
+
259
+ | Format | Example | Description |
260
+ |--------|---------|-------------|
261
+ | Perpetual | `BTC-PERPETUAL` | Perpetual futures contract |
262
+ | Future | `BTC-28JUN24` | Futures expiring June 28, 2024 |
263
+ | Option | `BTC-28JUN24-50000-C` | Call option, $50K strike, June expiry |
264
+
265
+ ### Order Types
266
+
267
+ | Type | Description |
268
+ |------|-------------|
269
+ | `limit` | Executes at specified price or better |
270
+ | `market` | Executes immediately at market price |
271
+ | `stop_limit` | Limit order triggered at stop price |
272
+ | `stop_market` | Market order triggered at stop price |
273
+
274
+ ### Time in Force
275
+
276
+ | Option | Description |
277
+ |--------|-------------|
278
+ | `good_til_cancelled` | Remains until filled or cancelled |
279
+ | `fill_or_kill` | Fill entire order immediately or cancel |
280
+ | `immediate_or_cancel` | Fill what's possible immediately |
281
+
282
+ ## Networks
283
+
284
+ | Network | API URL | Description |
285
+ |---------|---------|-------------|
286
+ | Production | `https://www.deribit.com/api/v2` | Live trading |
287
+ | Testnet | `https://test.deribit.com/api/v2` | Paper trading |
288
+
289
+ ## Error Handling
290
+
291
+ The node handles Deribit API errors with descriptive messages:
292
+
293
+ | Code | Description |
294
+ |------|-------------|
295
+ | `10000` | Authorization required |
296
+ | `10001` | Not enough balance |
297
+ | `10009` | Rate limit exceeded |
298
+ | `10028` | Invalid order parameters |
299
+ | `11044` | Order not found |
300
+ | `11050` | Invalid instrument |
301
+
302
+ ## Security Best Practices
303
+
304
+ 1. **Use testnet first**: Test all workflows on testnet before production
305
+ 2. **Limit API permissions**: Only grant necessary permissions to API keys
306
+ 3. **Use IP whitelisting**: Restrict API access to known IPs
307
+ 4. **Store credentials securely**: Use n8n's credential encryption
308
+ 5. **Monitor activity**: Review API activity regularly in Deribit dashboard
309
+
310
+ ## Development
311
+
312
+ ```bash
313
+ # Install dependencies
314
+ npm install
315
+
316
+ # Build
317
+ npm run build
318
+
319
+ # Run tests
320
+ npm test
321
+
322
+ # Run tests with coverage
323
+ npm run test:coverage
324
+
325
+ # Lint
326
+ npm run lint
327
+
328
+ # Fix lint issues
329
+ npm run lint:fix
330
+
331
+ # Watch mode
332
+ npm run dev
333
+ ```
334
+
335
+ ## Author
336
+
337
+ **Velocity BPA**
338
+ - Website: [velobpa.com](https://velobpa.com)
339
+ - GitHub: [Velocity-BPA](https://github.com/Velocity-BPA)
340
+
341
+ ## Licensing
342
+
343
+ This n8n community node is licensed under the **Business Source License 1.1**.
344
+
345
+ ### Free Use
346
+ Permitted for personal, educational, research, and internal business use.
347
+
348
+ ### Commercial Use
349
+ Use of this node within any SaaS, PaaS, hosted platform, managed service, or paid automation offering requires a commercial license.
350
+
351
+ For licensing inquiries: **licensing@velobpa.com**
352
+
353
+ See [LICENSE](LICENSE), [COMMERCIAL_LICENSE.md](COMMERCIAL_LICENSE.md), and [LICENSING_FAQ.md](LICENSING_FAQ.md) for details.
354
+
355
+ ## Contributing
356
+
357
+ 1. Fork the repository
358
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
359
+ 3. Commit changes (`git commit -m 'Add amazing feature'`)
360
+ 4. Push to branch (`git push origin feature/amazing-feature`)
361
+ 5. Open a Pull Request
362
+
363
+ Please ensure:
364
+ - All tests pass (`npm test`)
365
+ - Code is linted (`npm run lint`)
366
+ - Documentation is updated
367
+
368
+ ## Support
369
+
370
+ - **Issues**: [GitHub Issues](https://github.com/Velocity-BPA/n8n-nodes-deribit/issues)
371
+ - **Discussions**: [GitHub Discussions](https://github.com/Velocity-BPA/n8n-nodes-deribit/discussions)
372
+ - **Deribit API Docs**: [docs.deribit.com](https://docs.deribit.com)
373
+
374
+ ## Acknowledgments
375
+
376
+ - [Deribit](https://www.deribit.com) for their comprehensive API
377
+ - [n8n](https://n8n.io) for the automation platform
378
+ - [Velocity BPA](https://velobpa.com) for development and maintenance
@@ -0,0 +1,10 @@
1
+ import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class DeribitApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ properties: INodeProperties[];
7
+ authenticate: IAuthenticateGeneric;
8
+ test: ICredentialTestRequest;
9
+ }
10
+ //# sourceMappingURL=DeribitApi.credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeribitApi.credentials.d.ts","sourceRoot":"","sources":["../../credentials/DeribitApi.credentials.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,eAAe,EAChB,MAAM,cAAc,CAAC;AAEtB,qBAAa,UAAW,YAAW,eAAe;IAChD,IAAI,SAAgB;IACpB,WAAW,SAAiB;IAC5B,gBAAgB,SAA+B;IAC/C,UAAU,EAAE,eAAe,EAAE,CAqC3B;IAEF,YAAY,EAAE,oBAAoB,CAGhC;IAEF,IAAI,EAAE,sBAAsB,CAY1B;CACH"}
@@ -0,0 +1,72 @@
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.DeribitApi = void 0;
10
+ class DeribitApi {
11
+ constructor() {
12
+ this.name = 'deribitApi';
13
+ this.displayName = 'Deribit API';
14
+ this.documentationUrl = 'https://docs.deribit.com/';
15
+ this.properties = [
16
+ {
17
+ displayName: 'Environment',
18
+ name: 'environment',
19
+ type: 'options',
20
+ options: [
21
+ {
22
+ name: 'Production',
23
+ value: 'production',
24
+ },
25
+ {
26
+ name: 'Testnet',
27
+ value: 'testnet',
28
+ },
29
+ ],
30
+ default: 'testnet',
31
+ description: 'Select the Deribit environment to connect to',
32
+ },
33
+ {
34
+ displayName: 'Client ID',
35
+ name: 'clientId',
36
+ type: 'string',
37
+ default: '',
38
+ required: true,
39
+ description: 'Your Deribit API Client ID',
40
+ },
41
+ {
42
+ displayName: 'Client Secret',
43
+ name: 'clientSecret',
44
+ type: 'string',
45
+ typeOptions: {
46
+ password: true,
47
+ },
48
+ default: '',
49
+ required: true,
50
+ description: 'Your Deribit API Client Secret',
51
+ },
52
+ ];
53
+ this.authenticate = {
54
+ type: 'generic',
55
+ properties: {},
56
+ };
57
+ this.test = {
58
+ request: {
59
+ baseURL: '={{$credentials.environment === "production" ? "https://www.deribit.com/api/v2" : "https://test.deribit.com/api/v2"}}',
60
+ url: '/public/auth',
61
+ method: 'GET',
62
+ qs: {
63
+ grant_type: 'client_credentials',
64
+ client_id: '={{$credentials.clientId}}',
65
+ client_secret: '={{$credentials.clientSecret}}',
66
+ },
67
+ },
68
+ };
69
+ }
70
+ }
71
+ exports.DeribitApi = DeribitApi;
72
+ //# sourceMappingURL=DeribitApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeribitApi.credentials.js","sourceRoot":"","sources":["../../credentials/DeribitApi.credentials.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AASH,MAAa,UAAU;IAAvB;QACE,SAAI,GAAG,YAAY,CAAC;QACpB,gBAAW,GAAG,aAAa,CAAC;QAC5B,qBAAgB,GAAG,2BAA2B,CAAC;QAC/C,eAAU,GAAsB;YAC9B;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,SAAS;wBACf,KAAK,EAAE,SAAS;qBACjB;iBACF;gBACD,OAAO,EAAE,SAAS;gBAClB,WAAW,EAAE,8CAA8C;aAC5D;YACD;gBACE,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,4BAA4B;aAC1C;YACD;gBACE,WAAW,EAAE,eAAe;gBAC5B,IAAI,EAAE,cAAc;gBACpB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACX,QAAQ,EAAE,IAAI;iBACf;gBACD,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,gCAAgC;aAC9C;SACF,CAAC;QAEF,iBAAY,GAAyB;YACnC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE,EAAE;SACf,CAAC;QAEF,SAAI,GAA2B;YAC7B,OAAO,EAAE;gBACP,OAAO,EACL,uHAAuH;gBACzH,GAAG,EAAE,cAAc;gBACnB,MAAM,EAAE,KAAK;gBACb,EAAE,EAAE;oBACF,UAAU,EAAE,oBAAoB;oBAChC,SAAS,EAAE,4BAA4B;oBACvC,aAAa,EAAE,gCAAgC;iBAChD;aACF;SACF,CAAC;IACJ,CAAC;CAAA;AA7DD,gCA6DC"}
@@ -0,0 +1,4 @@
1
+ export * from './credentials/DeribitApi.credentials';
2
+ export * from './nodes/Deribit/Deribit.node';
3
+ export * from './nodes/Deribit/DeribitTrigger.node';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAOA,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,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/DeribitApi.credentials"), exports);
24
+ __exportStar(require("./nodes/Deribit/Deribit.node"), exports);
25
+ __exportStar(require("./nodes/Deribit/DeribitTrigger.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,uEAAqD;AACrD,+DAA6C;AAC7C,sEAAoD"}
@@ -0,0 +1,6 @@
1
+ import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class Deribit implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }
6
+ //# sourceMappingURL=Deribit.node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Deribit.node.d.ts","sourceRoot":"","sources":["../../../nodes/Deribit/Deribit.node.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,oBAAoB,EACrB,MAAM,cAAc,CAAC;AAgBtB,qBAAa,OAAQ,YAAW,SAAS;IACvC,WAAW,EAAE,oBAAoB,CA8G/B;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CA+DxE"}