snaptrade-typescript-sdk 8.6.0 → 8.7.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/.konfig/generate-id.txt +1 -1
- package/README.md +9 -11
- package/configuration.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/models/session-event.d.ts +6 -0
- package/dist/models/symbol.d.ts +7 -0
- package/docs/AccountInformationApi.md +120 -120
- package/docs/ApiDisclaimerApi.md +10 -11
- package/docs/ApiStatusApi.md +8 -9
- package/docs/AuthenticationApi.md +66 -66
- package/docs/ConnectionsApi.md +58 -57
- package/docs/ErrorLogsApi.md +10 -11
- package/docs/OptionsApi.md +80 -82
- package/docs/PortfolioManagementApi.md +433 -434
- package/docs/ReferenceDataApi.md +117 -119
- package/docs/TradingApi.md +152 -156
- package/docs/TransactionsAndReportingApi.md +40 -37
- package/models/session-event.ts +6 -0
- package/models/symbol.ts +9 -0
- package/package.json +1 -1
|
@@ -48,25 +48,25 @@ Method | HTTP request | Description
|
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
```typescript
|
|
51
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
51
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
52
52
|
|
|
53
53
|
const snaptrade = new Snaptrade({
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
})
|
|
59
|
-
|
|
60
|
-
const addPortfolioExcludedAssetResponse =
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
54
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
55
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
56
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
57
|
+
clientId: "YOUR_CLIENT_ID",
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
const addPortfolioExcludedAssetResponse =
|
|
61
|
+
await snaptrade.portfolioManagement.addPortfolioExcludedAsset({
|
|
62
|
+
portfolioGroupId: "portfolioGroupId_example",
|
|
63
|
+
id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
|
|
64
|
+
symbol: "VAB.TO",
|
|
65
|
+
raw_symbol: "VAB",
|
|
66
|
+
description: "VANGUARD CDN AGGREGATE BOND INDEX ETF",
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
console.log(addPortfolioExcludedAssetResponse);
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
|
|
@@ -104,24 +104,23 @@ Name | Type | Description | Notes
|
|
|
104
104
|
|
|
105
105
|
|
|
106
106
|
```typescript
|
|
107
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
107
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
108
108
|
|
|
109
109
|
const snaptrade = new Snaptrade({
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
})
|
|
110
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
111
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
112
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
113
|
+
clientId: "YOUR_CLIENT_ID",
|
|
114
|
+
});
|
|
115
115
|
|
|
116
116
|
const createResponse = await snaptrade.portfolioManagement.create({
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
console.log(createResponse)
|
|
117
|
+
userId: "John.doe@snaptrade.com",
|
|
118
|
+
userSecret: "USERSECRET123",
|
|
119
|
+
id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
|
|
120
|
+
name: "Combined Retirement Portfolio",
|
|
121
|
+
});
|
|
124
122
|
|
|
123
|
+
console.log(createResponse);
|
|
125
124
|
```
|
|
126
125
|
|
|
127
126
|
|
|
@@ -162,19 +161,19 @@ Name | Type | Description | Notes
|
|
|
162
161
|
|
|
163
162
|
|
|
164
163
|
```typescript
|
|
165
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
164
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
166
165
|
|
|
167
166
|
const snaptrade = new Snaptrade({
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
})
|
|
173
|
-
|
|
174
|
-
const createAssetClassResponse = await snaptrade.portfolioManagement.createAssetClass()
|
|
167
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
168
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
169
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
170
|
+
clientId: "YOUR_CLIENT_ID",
|
|
171
|
+
});
|
|
175
172
|
|
|
176
|
-
|
|
173
|
+
const createAssetClassResponse =
|
|
174
|
+
await snaptrade.portfolioManagement.createAssetClass();
|
|
177
175
|
|
|
176
|
+
console.log(createAssetClassResponse);
|
|
178
177
|
```
|
|
179
178
|
|
|
180
179
|
|
|
@@ -208,19 +207,19 @@ This endpoint does not need any parameter.
|
|
|
208
207
|
|
|
209
208
|
|
|
210
209
|
```typescript
|
|
211
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
210
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
212
211
|
|
|
213
212
|
const snaptrade = new Snaptrade({
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
})
|
|
213
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
214
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
215
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
216
|
+
clientId: "YOUR_CLIENT_ID",
|
|
217
|
+
});
|
|
219
218
|
|
|
220
|
-
const createModelPortfolioResponse =
|
|
221
|
-
|
|
222
|
-
console.log(createModelPortfolioResponse)
|
|
219
|
+
const createModelPortfolioResponse =
|
|
220
|
+
await snaptrade.portfolioManagement.createModelPortfolio();
|
|
223
221
|
|
|
222
|
+
console.log(createModelPortfolioResponse);
|
|
224
223
|
```
|
|
225
224
|
|
|
226
225
|
|
|
@@ -254,21 +253,21 @@ This endpoint does not need any parameter.
|
|
|
254
253
|
|
|
255
254
|
|
|
256
255
|
```typescript
|
|
257
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
256
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
258
257
|
|
|
259
258
|
const snaptrade = new Snaptrade({
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
})
|
|
265
|
-
|
|
266
|
-
const deleteAssetClassResponse =
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
259
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
260
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
261
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
262
|
+
clientId: "YOUR_CLIENT_ID",
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
const deleteAssetClassResponse =
|
|
266
|
+
await snaptrade.portfolioManagement.deleteAssetClass({
|
|
267
|
+
modelAssetClassId: "2bcd7cc3-e922-4976-bce1-9858296801c3",
|
|
268
|
+
});
|
|
269
|
+
|
|
270
|
+
console.log(deleteAssetClassResponse);
|
|
272
271
|
```
|
|
273
272
|
|
|
274
273
|
|
|
@@ -305,22 +304,22 @@ void (empty response body)
|
|
|
305
304
|
|
|
306
305
|
|
|
307
306
|
```typescript
|
|
308
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
307
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
309
308
|
|
|
310
309
|
const snaptrade = new Snaptrade({
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
})
|
|
316
|
-
|
|
317
|
-
const deleteExcludedAssetResponse =
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
310
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
311
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
312
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
313
|
+
clientId: "YOUR_CLIENT_ID",
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
const deleteExcludedAssetResponse =
|
|
317
|
+
await snaptrade.portfolioManagement.deleteExcludedAsset({
|
|
318
|
+
portfolioGroupId: "portfolioGroupId_example",
|
|
319
|
+
symbolId: "symbolId_example",
|
|
320
|
+
});
|
|
321
|
+
|
|
322
|
+
console.log(deleteExcludedAssetResponse);
|
|
324
323
|
```
|
|
325
324
|
|
|
326
325
|
|
|
@@ -358,21 +357,21 @@ void (empty response body)
|
|
|
358
357
|
|
|
359
358
|
|
|
360
359
|
```typescript
|
|
361
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
360
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
362
361
|
|
|
363
362
|
const snaptrade = new Snaptrade({
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
})
|
|
369
|
-
|
|
370
|
-
const deleteModelPortfolioByIdResponse =
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
363
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
364
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
365
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
366
|
+
clientId: "YOUR_CLIENT_ID",
|
|
367
|
+
});
|
|
368
|
+
|
|
369
|
+
const deleteModelPortfolioByIdResponse =
|
|
370
|
+
await snaptrade.portfolioManagement.deleteModelPortfolioById({
|
|
371
|
+
modelPortfolioId: "2bcd7cc3-e922-4976-bce1-9858296801c3",
|
|
372
|
+
});
|
|
373
|
+
|
|
374
|
+
console.log(deleteModelPortfolioByIdResponse);
|
|
376
375
|
```
|
|
377
376
|
|
|
378
377
|
|
|
@@ -409,21 +408,21 @@ void (empty response body)
|
|
|
409
408
|
|
|
410
409
|
|
|
411
410
|
```typescript
|
|
412
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
411
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
413
412
|
|
|
414
413
|
const snaptrade = new Snaptrade({
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
})
|
|
420
|
-
|
|
421
|
-
const deletePortfoliResponse =
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
414
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
415
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
416
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
417
|
+
clientId: "YOUR_CLIENT_ID",
|
|
418
|
+
});
|
|
419
|
+
|
|
420
|
+
const deletePortfoliResponse =
|
|
421
|
+
await snaptrade.portfolioManagement.deletePortfoli({
|
|
422
|
+
portfolioGroupId: "portfolioGroupId_example",
|
|
423
|
+
});
|
|
424
|
+
|
|
425
|
+
console.log(deletePortfoliResponse);
|
|
427
426
|
```
|
|
428
427
|
|
|
429
428
|
|
|
@@ -463,22 +462,22 @@ Name | Type | Description | Notes
|
|
|
463
462
|
|
|
464
463
|
|
|
465
464
|
```typescript
|
|
466
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
465
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
467
466
|
|
|
468
467
|
const snaptrade = new Snaptrade({
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
})
|
|
474
|
-
|
|
475
|
-
const deletePortfolioTargetByIdResponse =
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
468
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
469
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
470
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
471
|
+
clientId: "YOUR_CLIENT_ID",
|
|
472
|
+
});
|
|
473
|
+
|
|
474
|
+
const deletePortfolioTargetByIdResponse =
|
|
475
|
+
await snaptrade.portfolioManagement.deletePortfolioTargetById({
|
|
476
|
+
portfolioGroupId: "portfolioGroupId_example",
|
|
477
|
+
targetAssetId: "targetAssetId_example",
|
|
478
|
+
});
|
|
479
|
+
|
|
480
|
+
console.log(deletePortfolioTargetByIdResponse);
|
|
482
481
|
```
|
|
483
482
|
|
|
484
483
|
|
|
@@ -519,21 +518,21 @@ Name | Type | Description | Notes
|
|
|
519
518
|
|
|
520
519
|
|
|
521
520
|
```typescript
|
|
522
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
521
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
523
522
|
|
|
524
523
|
const snaptrade = new Snaptrade({
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
})
|
|
530
|
-
|
|
531
|
-
const detailAssetClassResponse =
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
524
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
525
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
526
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
527
|
+
clientId: "YOUR_CLIENT_ID",
|
|
528
|
+
});
|
|
529
|
+
|
|
530
|
+
const detailAssetClassResponse =
|
|
531
|
+
await snaptrade.portfolioManagement.detailAssetClass({
|
|
532
|
+
modelAssetClassId: "2bcd7cc3-e922-4976-bce1-9858296801c3",
|
|
533
|
+
});
|
|
534
|
+
|
|
535
|
+
console.log(detailAssetClassResponse);
|
|
537
536
|
```
|
|
538
537
|
|
|
539
538
|
|
|
@@ -570,23 +569,23 @@ Name | Type | Description | Notes
|
|
|
570
569
|
|
|
571
570
|
|
|
572
571
|
```typescript
|
|
573
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
572
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
574
573
|
|
|
575
574
|
const snaptrade = new Snaptrade({
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
})
|
|
581
|
-
|
|
582
|
-
const getCalculatedTradeByIdResponse =
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
575
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
576
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
577
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
578
|
+
clientId: "YOUR_CLIENT_ID",
|
|
579
|
+
});
|
|
580
|
+
|
|
581
|
+
const getCalculatedTradeByIdResponse =
|
|
582
|
+
await snaptrade.portfolioManagement.getCalculatedTradeById({
|
|
583
|
+
portfolioGroupId: "portfolioGroupId_example",
|
|
584
|
+
calculatedTradeId: "calculatedTradeId_example",
|
|
585
|
+
tradeId: "tradeId_example",
|
|
586
|
+
});
|
|
587
|
+
|
|
588
|
+
console.log(getCalculatedTradeByIdResponse);
|
|
590
589
|
```
|
|
591
590
|
|
|
592
591
|
|
|
@@ -625,21 +624,21 @@ Name | Type | Description | Notes
|
|
|
625
624
|
|
|
626
625
|
|
|
627
626
|
```typescript
|
|
628
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
627
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
629
628
|
|
|
630
629
|
const snaptrade = new Snaptrade({
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
})
|
|
636
|
-
|
|
637
|
-
const getModelDetailsByIdResponse =
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
630
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
631
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
632
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
633
|
+
clientId: "YOUR_CLIENT_ID",
|
|
634
|
+
});
|
|
635
|
+
|
|
636
|
+
const getModelDetailsByIdResponse =
|
|
637
|
+
await snaptrade.portfolioManagement.getModelDetailsById({
|
|
638
|
+
modelPortfolioId: "2bcd7cc3-e922-4976-bce1-9858296801c3",
|
|
639
|
+
});
|
|
640
|
+
|
|
641
|
+
console.log(getModelDetailsByIdResponse);
|
|
643
642
|
```
|
|
644
643
|
|
|
645
644
|
|
|
@@ -676,21 +675,21 @@ Name | Type | Description | Notes
|
|
|
676
675
|
|
|
677
676
|
|
|
678
677
|
```typescript
|
|
679
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
678
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
680
679
|
|
|
681
680
|
const snaptrade = new Snaptrade({
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
})
|
|
687
|
-
|
|
688
|
-
const getPortfolioBalancesResponse =
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
681
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
682
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
683
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
684
|
+
clientId: "YOUR_CLIENT_ID",
|
|
685
|
+
});
|
|
686
|
+
|
|
687
|
+
const getPortfolioBalancesResponse =
|
|
688
|
+
await snaptrade.portfolioManagement.getPortfolioBalances({
|
|
689
|
+
portfolioGroupId: "portfolioGroupId_example",
|
|
690
|
+
});
|
|
691
|
+
|
|
692
|
+
console.log(getPortfolioBalancesResponse);
|
|
694
693
|
```
|
|
695
694
|
|
|
696
695
|
|
|
@@ -730,21 +729,21 @@ Name | Type | Description | Notes
|
|
|
730
729
|
|
|
731
730
|
|
|
732
731
|
```typescript
|
|
733
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
732
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
734
733
|
|
|
735
734
|
const snaptrade = new Snaptrade({
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
})
|
|
741
|
-
|
|
742
|
-
const getPortfolioDetailsByIdResponse =
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
735
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
736
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
737
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
738
|
+
clientId: "YOUR_CLIENT_ID",
|
|
739
|
+
});
|
|
740
|
+
|
|
741
|
+
const getPortfolioDetailsByIdResponse =
|
|
742
|
+
await snaptrade.portfolioManagement.getPortfolioDetailsById({
|
|
743
|
+
portfolioGroupId: "portfolioGroupId_example",
|
|
744
|
+
});
|
|
745
|
+
|
|
746
|
+
console.log(getPortfolioDetailsByIdResponse);
|
|
748
747
|
```
|
|
749
748
|
|
|
750
749
|
|
|
@@ -782,21 +781,21 @@ Name | Type | Description | Notes
|
|
|
782
781
|
|
|
783
782
|
|
|
784
783
|
```typescript
|
|
785
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
784
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
786
785
|
|
|
787
786
|
const snaptrade = new Snaptrade({
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
})
|
|
793
|
-
|
|
794
|
-
const getPortfolioInfoResponse =
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
787
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
788
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
789
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
790
|
+
clientId: "YOUR_CLIENT_ID",
|
|
791
|
+
});
|
|
792
|
+
|
|
793
|
+
const getPortfolioInfoResponse =
|
|
794
|
+
await snaptrade.portfolioManagement.getPortfolioInfo({
|
|
795
|
+
portfolioGroupId: "portfolioGroupId_example",
|
|
796
|
+
});
|
|
797
|
+
|
|
798
|
+
console.log(getPortfolioInfoResponse);
|
|
800
799
|
```
|
|
801
800
|
|
|
802
801
|
|
|
@@ -834,21 +833,21 @@ Name | Type | Description | Notes
|
|
|
834
833
|
|
|
835
834
|
|
|
836
835
|
```typescript
|
|
837
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
836
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
838
837
|
|
|
839
838
|
const snaptrade = new Snaptrade({
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
})
|
|
845
|
-
|
|
846
|
-
const getPortfolioPositionsResponse =
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
839
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
840
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
841
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
842
|
+
clientId: "YOUR_CLIENT_ID",
|
|
843
|
+
});
|
|
844
|
+
|
|
845
|
+
const getPortfolioPositionsResponse =
|
|
846
|
+
await snaptrade.portfolioManagement.getPortfolioPositions({
|
|
847
|
+
portfolioGroupId: "portfolioGroupId_example",
|
|
848
|
+
});
|
|
849
|
+
|
|
850
|
+
console.log(getPortfolioPositionsResponse);
|
|
852
851
|
```
|
|
853
852
|
|
|
854
853
|
|
|
@@ -888,21 +887,21 @@ Name | Type | Description | Notes
|
|
|
888
887
|
|
|
889
888
|
|
|
890
889
|
```typescript
|
|
891
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
890
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
892
891
|
|
|
893
892
|
const snaptrade = new Snaptrade({
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
})
|
|
899
|
-
|
|
900
|
-
const getPortfolioSettingsResponse =
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
893
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
894
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
895
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
896
|
+
clientId: "YOUR_CLIENT_ID",
|
|
897
|
+
});
|
|
898
|
+
|
|
899
|
+
const getPortfolioSettingsResponse =
|
|
900
|
+
await snaptrade.portfolioManagement.getPortfolioSettings({
|
|
901
|
+
portfolioGroupId: "portfolioGroupId_example",
|
|
902
|
+
});
|
|
903
|
+
|
|
904
|
+
console.log(getPortfolioSettingsResponse);
|
|
906
905
|
```
|
|
907
906
|
|
|
908
907
|
|
|
@@ -940,22 +939,22 @@ Name | Type | Description | Notes
|
|
|
940
939
|
|
|
941
940
|
|
|
942
941
|
```typescript
|
|
943
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
942
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
944
943
|
|
|
945
944
|
const snaptrade = new Snaptrade({
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
})
|
|
951
|
-
|
|
952
|
-
const getPortfolioTargetByIdResponse =
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
945
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
946
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
947
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
948
|
+
clientId: "YOUR_CLIENT_ID",
|
|
949
|
+
});
|
|
950
|
+
|
|
951
|
+
const getPortfolioTargetByIdResponse =
|
|
952
|
+
await snaptrade.portfolioManagement.getPortfolioTargetById({
|
|
953
|
+
portfolioGroupId: "portfolioGroupId_example",
|
|
954
|
+
targetAssetId: "targetAssetId_example",
|
|
955
|
+
});
|
|
956
|
+
|
|
957
|
+
console.log(getPortfolioTargetByIdResponse);
|
|
959
958
|
```
|
|
960
959
|
|
|
961
960
|
|
|
@@ -994,21 +993,21 @@ Name | Type | Description | Notes
|
|
|
994
993
|
|
|
995
994
|
|
|
996
995
|
```typescript
|
|
997
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
996
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
998
997
|
|
|
999
998
|
const snaptrade = new Snaptrade({
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
})
|
|
1005
|
-
|
|
1006
|
-
const getPortfolioTargetsResponse =
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
999
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
1000
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
1001
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
1002
|
+
clientId: "YOUR_CLIENT_ID",
|
|
1003
|
+
});
|
|
1004
|
+
|
|
1005
|
+
const getPortfolioTargetsResponse =
|
|
1006
|
+
await snaptrade.portfolioManagement.getPortfolioTargets({
|
|
1007
|
+
portfolioGroupId: "portfolioGroupId_example",
|
|
1008
|
+
});
|
|
1009
|
+
|
|
1010
|
+
console.log(getPortfolioTargetsResponse);
|
|
1012
1011
|
```
|
|
1013
1012
|
|
|
1014
1013
|
|
|
@@ -1048,21 +1047,21 @@ Name | Type | Description | Notes
|
|
|
1048
1047
|
|
|
1049
1048
|
|
|
1050
1049
|
```typescript
|
|
1051
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
1050
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
1052
1051
|
|
|
1053
1052
|
const snaptrade = new Snaptrade({
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
})
|
|
1059
|
-
|
|
1060
|
-
const getPortoflioExcludedAssetsResponse =
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1053
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
1054
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
1055
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
1056
|
+
clientId: "YOUR_CLIENT_ID",
|
|
1057
|
+
});
|
|
1058
|
+
|
|
1059
|
+
const getPortoflioExcludedAssetsResponse =
|
|
1060
|
+
await snaptrade.portfolioManagement.getPortoflioExcludedAssets({
|
|
1061
|
+
portfolioGroupId: "portfolioGroupId_example",
|
|
1062
|
+
});
|
|
1063
|
+
|
|
1064
|
+
console.log(getPortoflioExcludedAssetsResponse);
|
|
1066
1065
|
```
|
|
1067
1066
|
|
|
1068
1067
|
|
|
@@ -1100,21 +1099,21 @@ Name | Type | Description | Notes
|
|
|
1100
1099
|
|
|
1101
1100
|
|
|
1102
1101
|
```typescript
|
|
1103
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
1102
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
1104
1103
|
|
|
1105
1104
|
const snaptrade = new Snaptrade({
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
})
|
|
1111
|
-
|
|
1112
|
-
const importModelPortfolioResponse =
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1105
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
1106
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
1107
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
1108
|
+
clientId: "YOUR_CLIENT_ID",
|
|
1109
|
+
});
|
|
1110
|
+
|
|
1111
|
+
const importModelPortfolioResponse =
|
|
1112
|
+
await snaptrade.portfolioManagement.importModelPortfolio({
|
|
1113
|
+
portfolioGroupId: "portfolioGroupId_example",
|
|
1114
|
+
});
|
|
1115
|
+
|
|
1116
|
+
console.log(importModelPortfolioResponse);
|
|
1118
1117
|
```
|
|
1119
1118
|
|
|
1120
1119
|
|
|
@@ -1152,22 +1151,21 @@ Name | Type | Description | Notes
|
|
|
1152
1151
|
|
|
1153
1152
|
|
|
1154
1153
|
```typescript
|
|
1155
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
1154
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
1156
1155
|
|
|
1157
1156
|
const snaptrade = new Snaptrade({
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
})
|
|
1157
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
1158
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
1159
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
1160
|
+
clientId: "YOUR_CLIENT_ID",
|
|
1161
|
+
});
|
|
1163
1162
|
|
|
1164
1163
|
const listResponse = await snaptrade.portfolioManagement.list({
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
console.log(listResponse)
|
|
1164
|
+
userId: "John.doe@snaptrade.com",
|
|
1165
|
+
userSecret: "USERSECRET123",
|
|
1166
|
+
});
|
|
1170
1167
|
|
|
1168
|
+
console.log(listResponse);
|
|
1171
1169
|
```
|
|
1172
1170
|
|
|
1173
1171
|
|
|
@@ -1206,19 +1204,19 @@ Name | Type | Description | Notes
|
|
|
1206
1204
|
|
|
1207
1205
|
|
|
1208
1206
|
```typescript
|
|
1209
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
1207
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
1210
1208
|
|
|
1211
1209
|
const snaptrade = new Snaptrade({
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
})
|
|
1210
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
1211
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
1212
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
1213
|
+
clientId: "YOUR_CLIENT_ID",
|
|
1214
|
+
});
|
|
1217
1215
|
|
|
1218
|
-
const listAssetClassesResponse =
|
|
1219
|
-
|
|
1220
|
-
console.log(listAssetClassesResponse)
|
|
1216
|
+
const listAssetClassesResponse =
|
|
1217
|
+
await snaptrade.portfolioManagement.listAssetClasses();
|
|
1221
1218
|
|
|
1219
|
+
console.log(listAssetClassesResponse);
|
|
1222
1220
|
```
|
|
1223
1221
|
|
|
1224
1222
|
|
|
@@ -1252,21 +1250,21 @@ This endpoint does not need any parameter.
|
|
|
1252
1250
|
|
|
1253
1251
|
|
|
1254
1252
|
```typescript
|
|
1255
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
1253
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
1256
1254
|
|
|
1257
1255
|
const snaptrade = new Snaptrade({
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
})
|
|
1263
|
-
|
|
1264
|
-
const listCalculatedTradesResponse =
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1256
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
1257
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
1258
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
1259
|
+
clientId: "YOUR_CLIENT_ID",
|
|
1260
|
+
});
|
|
1261
|
+
|
|
1262
|
+
const listCalculatedTradesResponse =
|
|
1263
|
+
await snaptrade.portfolioManagement.listCalculatedTrades({
|
|
1264
|
+
portfolioGroupId: "portfolioGroupId_example",
|
|
1265
|
+
});
|
|
1266
|
+
|
|
1267
|
+
console.log(listCalculatedTradesResponse);
|
|
1270
1268
|
```
|
|
1271
1269
|
|
|
1272
1270
|
|
|
@@ -1303,19 +1301,19 @@ Name | Type | Description | Notes
|
|
|
1303
1301
|
|
|
1304
1302
|
|
|
1305
1303
|
```typescript
|
|
1306
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
1304
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
1307
1305
|
|
|
1308
1306
|
const snaptrade = new Snaptrade({
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
})
|
|
1314
|
-
|
|
1315
|
-
const listModelPortfolioResponse = await snaptrade.portfolioManagement.listModelPortfolio()
|
|
1307
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
1308
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
1309
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
1310
|
+
clientId: "YOUR_CLIENT_ID",
|
|
1311
|
+
});
|
|
1316
1312
|
|
|
1317
|
-
|
|
1313
|
+
const listModelPortfolioResponse =
|
|
1314
|
+
await snaptrade.portfolioManagement.listModelPortfolio();
|
|
1318
1315
|
|
|
1316
|
+
console.log(listModelPortfolioResponse);
|
|
1319
1317
|
```
|
|
1320
1318
|
|
|
1321
1319
|
|
|
@@ -1349,21 +1347,21 @@ This endpoint does not need any parameter.
|
|
|
1349
1347
|
|
|
1350
1348
|
|
|
1351
1349
|
```typescript
|
|
1352
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
1350
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
1353
1351
|
|
|
1354
1352
|
const snaptrade = new Snaptrade({
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
})
|
|
1360
|
-
|
|
1361
|
-
const listPortfolioAccountsResponse =
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1353
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
1354
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
1355
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
1356
|
+
clientId: "YOUR_CLIENT_ID",
|
|
1357
|
+
});
|
|
1358
|
+
|
|
1359
|
+
const listPortfolioAccountsResponse =
|
|
1360
|
+
await snaptrade.portfolioManagement.listPortfolioAccounts({
|
|
1361
|
+
portfolioGroupId: "portfolioGroupId_example",
|
|
1362
|
+
});
|
|
1363
|
+
|
|
1364
|
+
console.log(listPortfolioAccountsResponse);
|
|
1367
1365
|
```
|
|
1368
1366
|
|
|
1369
1367
|
|
|
@@ -1401,21 +1399,21 @@ Name | Type | Description | Notes
|
|
|
1401
1399
|
|
|
1402
1400
|
|
|
1403
1401
|
```typescript
|
|
1404
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
1402
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
1405
1403
|
|
|
1406
1404
|
const snaptrade = new Snaptrade({
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
})
|
|
1412
|
-
|
|
1413
|
-
const modifyModelPortfolioByIdResponse =
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1405
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
1406
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
1407
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
1408
|
+
clientId: "YOUR_CLIENT_ID",
|
|
1409
|
+
});
|
|
1410
|
+
|
|
1411
|
+
const modifyModelPortfolioByIdResponse =
|
|
1412
|
+
await snaptrade.portfolioManagement.modifyModelPortfolioById({
|
|
1413
|
+
modelPortfolioId: "2bcd7cc3-e922-4976-bce1-9858296801c3",
|
|
1414
|
+
});
|
|
1415
|
+
|
|
1416
|
+
console.log(modifyModelPortfolioByIdResponse);
|
|
1419
1417
|
```
|
|
1420
1418
|
|
|
1421
1419
|
|
|
@@ -1453,23 +1451,24 @@ void (empty response body)
|
|
|
1453
1451
|
|
|
1454
1452
|
|
|
1455
1453
|
```typescript
|
|
1456
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
1454
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
1457
1455
|
|
|
1458
1456
|
const snaptrade = new Snaptrade({
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
})
|
|
1464
|
-
|
|
1465
|
-
const savePortfolioResponse = await snaptrade.portfolioManagement.savePortfolio(
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1457
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
1458
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
1459
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
1460
|
+
clientId: "YOUR_CLIENT_ID",
|
|
1461
|
+
});
|
|
1462
|
+
|
|
1463
|
+
const savePortfolioResponse = await snaptrade.portfolioManagement.savePortfolio(
|
|
1464
|
+
{
|
|
1465
|
+
portfolioGroupId: "portfolioGroupId_example",
|
|
1466
|
+
id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
|
|
1467
|
+
name: "Combined Retirement Portfolio",
|
|
1468
|
+
}
|
|
1469
|
+
);
|
|
1470
|
+
|
|
1471
|
+
console.log(savePortfolioResponse);
|
|
1473
1472
|
```
|
|
1474
1473
|
|
|
1475
1474
|
|
|
@@ -1510,22 +1509,22 @@ Name | Type | Description | Notes
|
|
|
1510
1509
|
|
|
1511
1510
|
|
|
1512
1511
|
```typescript
|
|
1513
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
1512
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
1514
1513
|
|
|
1515
1514
|
const snaptrade = new Snaptrade({
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
})
|
|
1521
|
-
|
|
1522
|
-
const searchPortfolioSymbolsResponse =
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1515
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
1516
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
1517
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
1518
|
+
clientId: "YOUR_CLIENT_ID",
|
|
1519
|
+
});
|
|
1520
|
+
|
|
1521
|
+
const searchPortfolioSymbolsResponse =
|
|
1522
|
+
await snaptrade.portfolioManagement.searchPortfolioSymbols({
|
|
1523
|
+
portfolioGroupId: "portfolioGroupId_example",
|
|
1524
|
+
substring: "apple",
|
|
1525
|
+
});
|
|
1526
|
+
|
|
1527
|
+
console.log(searchPortfolioSymbolsResponse);
|
|
1529
1528
|
```
|
|
1530
1529
|
|
|
1531
1530
|
|
|
@@ -1564,29 +1563,29 @@ Name | Type | Description | Notes
|
|
|
1564
1563
|
|
|
1565
1564
|
|
|
1566
1565
|
```typescript
|
|
1567
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
1566
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
1568
1567
|
|
|
1569
1568
|
const snaptrade = new Snaptrade({
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
})
|
|
1575
|
-
|
|
1576
|
-
const setPortfolioTargetsResponse =
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1569
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
1570
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
1571
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
1572
|
+
clientId: "YOUR_CLIENT_ID",
|
|
1573
|
+
});
|
|
1574
|
+
|
|
1575
|
+
const setPortfolioTargetsResponse =
|
|
1576
|
+
await snaptrade.portfolioManagement.setPortfolioTargets({
|
|
1577
|
+
portfolioGroupId: "portfolioGroupId_example",
|
|
1578
|
+
requestBody: [
|
|
1579
|
+
{
|
|
1580
|
+
id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
|
|
1581
|
+
percent: 90,
|
|
1582
|
+
is_supported: true,
|
|
1583
|
+
is_excluded: true,
|
|
1584
|
+
},
|
|
1585
1585
|
],
|
|
1586
|
-
})
|
|
1587
|
-
|
|
1588
|
-
console.log(setPortfolioTargetsResponse)
|
|
1586
|
+
});
|
|
1589
1587
|
|
|
1588
|
+
console.log(setPortfolioTargetsResponse);
|
|
1590
1589
|
```
|
|
1591
1590
|
|
|
1592
1591
|
|
|
@@ -1627,21 +1626,21 @@ Name | Type | Description | Notes
|
|
|
1627
1626
|
|
|
1628
1627
|
|
|
1629
1628
|
```typescript
|
|
1630
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
1629
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
1631
1630
|
|
|
1632
1631
|
const snaptrade = new Snaptrade({
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
})
|
|
1638
|
-
|
|
1639
|
-
const updateAssetClassResponse =
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1632
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
1633
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
1634
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
1635
|
+
clientId: "YOUR_CLIENT_ID",
|
|
1636
|
+
});
|
|
1637
|
+
|
|
1638
|
+
const updateAssetClassResponse =
|
|
1639
|
+
await snaptrade.portfolioManagement.updateAssetClass({
|
|
1640
|
+
modelAssetClassId: "2bcd7cc3-e922-4976-bce1-9858296801c3",
|
|
1641
|
+
});
|
|
1642
|
+
|
|
1643
|
+
console.log(updateAssetClassResponse);
|
|
1645
1644
|
```
|
|
1646
1645
|
|
|
1647
1646
|
|
|
@@ -1679,21 +1678,21 @@ void (empty response body)
|
|
|
1679
1678
|
|
|
1680
1679
|
|
|
1681
1680
|
```typescript
|
|
1682
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
1681
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
1683
1682
|
|
|
1684
1683
|
const snaptrade = new Snaptrade({
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
})
|
|
1690
|
-
|
|
1691
|
-
const updatePortfolioSettingsResponse =
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1684
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
1685
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
1686
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
1687
|
+
clientId: "YOUR_CLIENT_ID",
|
|
1688
|
+
});
|
|
1689
|
+
|
|
1690
|
+
const updatePortfolioSettingsResponse =
|
|
1691
|
+
await snaptrade.portfolioManagement.updatePortfolioSettings({
|
|
1692
|
+
portfolioGroupId: "portfolioGroupId_example",
|
|
1693
|
+
});
|
|
1694
|
+
|
|
1695
|
+
console.log(updatePortfolioSettingsResponse);
|
|
1697
1696
|
```
|
|
1698
1697
|
|
|
1699
1698
|
|
|
@@ -1731,26 +1730,26 @@ Name | Type | Description | Notes
|
|
|
1731
1730
|
|
|
1732
1731
|
|
|
1733
1732
|
```typescript
|
|
1734
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
1733
|
+
import { Snaptrade } from "snaptrade-typescript-sdk";
|
|
1735
1734
|
|
|
1736
1735
|
const snaptrade = new Snaptrade({
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
})
|
|
1742
|
-
|
|
1743
|
-
const updatePortfolioTargetByIdResponse =
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1736
|
+
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
1737
|
+
// basePath: "https://api.snaptrade.com/api/v1",
|
|
1738
|
+
consumerKey: "YOUR_CONSUMER_KEY",
|
|
1739
|
+
clientId: "YOUR_CLIENT_ID",
|
|
1740
|
+
});
|
|
1741
|
+
|
|
1742
|
+
const updatePortfolioTargetByIdResponse =
|
|
1743
|
+
await snaptrade.portfolioManagement.updatePortfolioTargetById({
|
|
1744
|
+
portfolioGroupId: "portfolioGroupId_example",
|
|
1745
|
+
targetAssetId: "targetAssetId_example",
|
|
1746
|
+
id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
|
|
1747
|
+
percent: 90,
|
|
1748
|
+
is_supported: true,
|
|
1749
|
+
is_excluded: true,
|
|
1750
|
+
});
|
|
1751
|
+
|
|
1752
|
+
console.log(updatePortfolioTargetByIdResponse);
|
|
1754
1753
|
```
|
|
1755
1754
|
|
|
1756
1755
|
|