@infosel-sdk/securities-prices 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +5 -0
- package/README.md +542 -0
- package/common/constants/constants.d.ts +28 -0
- package/common/constants/constants.js +31 -0
- package/common/constants/constants.js.map +1 -0
- package/common/enum/exchange.enum.d.ts +5 -0
- package/common/enum/exchange.enum.js +10 -0
- package/common/enum/exchange.enum.js.map +1 -0
- package/common/enum/source.enum.d.ts +9 -0
- package/common/enum/source.enum.js +14 -0
- package/common/enum/source.enum.js.map +1 -0
- package/common/helper/utils.d.ts +4 -0
- package/common/helper/utils.js +36 -0
- package/common/helper/utils.js.map +1 -0
- package/historical/dto/historical-chart-last-traded-price.request.dto.d.ts +6 -0
- package/historical/dto/historical-chart-last-traded-price.request.dto.js +57 -0
- package/historical/dto/historical-chart-last-traded-price.request.dto.js.map +1 -0
- package/historical/dto/historical-chart.request.dto.d.ts +4 -0
- package/historical/dto/historical-chart.request.dto.js +34 -0
- package/historical/dto/historical-chart.request.dto.js.map +1 -0
- package/historical/dto/historical-report.request.dto.d.ts +5 -0
- package/historical/dto/historical-report.request.dto.js +28 -0
- package/historical/dto/historical-report.request.dto.js.map +1 -0
- package/historical/dto/historical.request.dto.d.ts +10 -0
- package/historical/dto/historical.request.dto.js +82 -0
- package/historical/dto/historical.request.dto.js.map +1 -0
- package/historical/dto/historical.response.dto.d.ts +12 -0
- package/historical/dto/historical.response.dto.js +13 -0
- package/historical/dto/historical.response.dto.js.map +1 -0
- package/historical/dto/index.d.ts +4 -0
- package/historical/dto/index.js +21 -0
- package/historical/dto/index.js.map +1 -0
- package/historical/historical.module.d.ts +2 -0
- package/historical/historical.module.js +19 -0
- package/historical/historical.module.js.map +1 -0
- package/historical/historical.service.d.ts +8 -0
- package/historical/historical.service.js +40 -0
- package/historical/historical.service.js.map +1 -0
- package/index.d.ts +2 -0
- package/index.js +19 -0
- package/index.js.map +1 -0
- package/intraday/dto/index.d.ts +7 -0
- package/intraday/dto/index.js +24 -0
- package/intraday/dto/index.js.map +1 -0
- package/intraday/dto/intraday-report.dto.d.ts +13 -0
- package/intraday/dto/intraday-report.dto.js +7 -0
- package/intraday/dto/intraday-report.dto.js.map +1 -0
- package/intraday/dto/intraday-report.request.dto.d.ts +15 -0
- package/intraday/dto/intraday-report.request.dto.js +103 -0
- package/intraday/dto/intraday-report.request.dto.js.map +1 -0
- package/intraday/dto/intraday-report.response.dto.d.ts +9 -0
- package/intraday/dto/intraday-report.response.dto.js +14 -0
- package/intraday/dto/intraday-report.response.dto.js.map +1 -0
- package/intraday/dto/intraday-totals.dto.d.ts +6 -0
- package/intraday/dto/intraday-totals.dto.js +7 -0
- package/intraday/dto/intraday-totals.dto.js.map +1 -0
- package/intraday/dto/intraday.dto.d.ts +8 -0
- package/intraday/dto/intraday.dto.js +7 -0
- package/intraday/dto/intraday.dto.js.map +1 -0
- package/intraday/dto/intraday.request.dto.d.ts +7 -0
- package/intraday/dto/intraday.request.dto.js +54 -0
- package/intraday/dto/intraday.request.dto.js.map +1 -0
- package/intraday/dto/intraday.response.dto.d.ts +5 -0
- package/intraday/dto/intraday.response.dto.js +10 -0
- package/intraday/dto/intraday.response.dto.js.map +1 -0
- package/intraday/intraday.module.d.ts +2 -0
- package/intraday/intraday.module.js +19 -0
- package/intraday/intraday.module.js.map +1 -0
- package/intraday/intraday.service.d.ts +8 -0
- package/intraday/intraday.service.js +60 -0
- package/intraday/intraday.service.js.map +1 -0
- package/package.json +27 -0
- package/securities-prices-sdk.module.d.ts +2 -0
- package/securities-prices-sdk.module.js +21 -0
- package/securities-prices-sdk.module.js.map +1 -0
- package/securities-prices-sdk.service.d.ts +36 -0
- package/securities-prices-sdk.service.js +90 -0
- package/securities-prices-sdk.service.js.map +1 -0
- package/snapshot/dto/best-bid-offer.dto.d.ts +13 -0
- package/snapshot/dto/best-bid-offer.dto.js +19 -0
- package/snapshot/dto/best-bid-offer.dto.js.map +1 -0
- package/snapshot/dto/best-bid-offer.request.dto.d.ts +6 -0
- package/snapshot/dto/best-bid-offer.request.dto.js +63 -0
- package/snapshot/dto/best-bid-offer.request.dto.js.map +1 -0
- package/snapshot/dto/depth-of-book.dto.d.ts +13 -0
- package/snapshot/dto/depth-of-book.dto.js +19 -0
- package/snapshot/dto/depth-of-book.dto.js.map +1 -0
- package/snapshot/dto/depth-of-book.request.dto.d.ts +5 -0
- package/snapshot/dto/depth-of-book.request.dto.js +36 -0
- package/snapshot/dto/depth-of-book.request.dto.js.map +1 -0
- package/snapshot/dto/index.d.ts +4 -0
- package/snapshot/dto/index.js +21 -0
- package/snapshot/dto/index.js.map +1 -0
- package/snapshot/dto/last-traded-price.dto.d.ts +31 -0
- package/snapshot/dto/last-traded-price.dto.js +38 -0
- package/snapshot/dto/last-traded-price.dto.js.map +1 -0
- package/snapshot/dto/last-traded-price.request.dto.d.ts +5 -0
- package/snapshot/dto/last-traded-price.request.dto.js +37 -0
- package/snapshot/dto/last-traded-price.request.dto.js.map +1 -0
- package/snapshot/dto/returns.dto.d.ts +8 -0
- package/snapshot/dto/returns.dto.js +16 -0
- package/snapshot/dto/returns.dto.js.map +1 -0
- package/snapshot/dto/returns.request.dto.d.ts +5 -0
- package/snapshot/dto/returns.request.dto.js +41 -0
- package/snapshot/dto/returns.request.dto.js.map +1 -0
- package/snapshot/snapshot.module.d.ts +2 -0
- package/snapshot/snapshot.module.js +19 -0
- package/snapshot/snapshot.module.js.map +1 -0
- package/snapshot/snapshot.service.d.ts +16 -0
- package/snapshot/snapshot.service.js +81 -0
- package/snapshot/snapshot.service.js.map +1 -0
- package/tsconfig.lib.tsbuildinfo +1 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.BestBidOfferRequestDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
const exchange_enum_1 = require("../../common/enum/exchange.enum");
|
|
16
|
+
const source_enum_1 = require("../../common/enum/source.enum");
|
|
17
|
+
class BestBidOfferRequestDto {
|
|
18
|
+
constructor() {
|
|
19
|
+
this.exchange = '';
|
|
20
|
+
this.source = '';
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.BestBidOfferRequestDto = BestBidOfferRequestDto;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsString)(),
|
|
26
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], BestBidOfferRequestDto.prototype, "symbol", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsOptional)(),
|
|
31
|
+
(0, class_validator_1.IsString)(),
|
|
32
|
+
(0, class_validator_1.ValidateIf)((data) => {
|
|
33
|
+
if (typeof data.source !== 'string') {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
return (((data.symbol && data.exchange === '') || (data.symbol && typeof data.exchange !== 'string')) &&
|
|
37
|
+
!(data.symbol && data.source));
|
|
38
|
+
}),
|
|
39
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
40
|
+
(0, class_validator_1.IsEnum)(exchange_enum_1.Exchanges),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], BestBidOfferRequestDto.prototype, "exchange", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_validator_1.IsOptional)(),
|
|
45
|
+
(0, class_validator_1.IsString)(),
|
|
46
|
+
(0, class_validator_1.ValidateIf)((data) => {
|
|
47
|
+
if (typeof data.exchange !== 'string') {
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
return (((data.symbol && data.source === '') || (data.symbol && typeof data.source !== 'string')) &&
|
|
51
|
+
!(data.symbol && data.exchange));
|
|
52
|
+
}),
|
|
53
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
54
|
+
(0, class_validator_1.IsEnum)(source_enum_1.Sources),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], BestBidOfferRequestDto.prototype, "source", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, class_validator_1.IsBoolean)(),
|
|
59
|
+
(0, class_validator_1.IsOptional)(),
|
|
60
|
+
(0, class_transformer_1.Transform)(({ value }) => value === 'true'),
|
|
61
|
+
__metadata("design:type", Boolean)
|
|
62
|
+
], BestBidOfferRequestDto.prototype, "mock", void 0);
|
|
63
|
+
//# sourceMappingURL=best-bid-offer.request.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"best-bid-offer.request.dto.js","sourceRoot":"","sources":["../../../../../libs/securities-prices-sdk/src/snapshot/dto/best-bid-offer.request.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAkG;AAClG,yDAAiE;AACjE,mEAA4D;AAC5D,+DAAwD;AAExD,MAAa,sBAAsB;IAAnC;QAmBE,aAAQ,GAAY,EAAE,CAAC;QAgBvB,WAAM,GAAY,EAAE,CAAC;IAMvB,CAAC;CAAA;AAzCD,wDAyCC;AAtCC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4B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AAC;;oDAC/C"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare class DepthOfBookLevel {
|
|
2
|
+
price: number;
|
|
3
|
+
numberOrders: number;
|
|
4
|
+
volume: number;
|
|
5
|
+
constructor(depthOfBookRecord: Partial<DepthOfBookLevel>);
|
|
6
|
+
}
|
|
7
|
+
export declare class DepthOfBookDto {
|
|
8
|
+
timestamp: Date;
|
|
9
|
+
bidLevels: DepthOfBookLevel[];
|
|
10
|
+
offerLevels: DepthOfBookLevel[];
|
|
11
|
+
constructor(depthOfBookDto: Partial<DepthOfBookDto>);
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DepthOfBookDto = void 0;
|
|
4
|
+
class DepthOfBookLevel {
|
|
5
|
+
constructor(depthOfBookRecord) {
|
|
6
|
+
this.numberOrders = depthOfBookRecord.numberOrders || null;
|
|
7
|
+
this.price = depthOfBookRecord.price || null;
|
|
8
|
+
this.volume = depthOfBookRecord.volume || null;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
class DepthOfBookDto {
|
|
12
|
+
constructor(depthOfBookDto) {
|
|
13
|
+
this.timestamp = depthOfBookDto.timestamp || null;
|
|
14
|
+
this.bidLevels = depthOfBookDto.bidLevels || [];
|
|
15
|
+
this.offerLevels = depthOfBookDto.offerLevels || [];
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.DepthOfBookDto = DepthOfBookDto;
|
|
19
|
+
//# sourceMappingURL=depth-of-book.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"depth-of-book.dto.js","sourceRoot":"","sources":["../../../../../libs/securities-prices-sdk/src/snapshot/dto/depth-of-book.dto.ts"],"names":[],"mappings":";;;AAAA,MAAM,gBAAgB;IAKpB,YAAY,iBAA4C;QACtD,IAAI,CAAC,YAAY,GAAG,iBAAiB,CAAC,YAAY,IAAI,IAAI,CAAC;QAC3D,IAAI,CAAC,KAAK,GAAG,iBAAiB,CAAC,KAAK,IAAI,IAAI,CAAC;QAC7C,IAAI,CAAC,MAAM,GAAG,iBAAiB,CAAC,MAAM,IAAI,IAAI,CAAC;IACjD,CAAC;CACF;AAED,MAAa,cAAc;IAOzB,YAAY,cAAuC;QACjD,IAAI,CAAC,SAAS,GAAG,cAAc,CAAC,SAAS,IAAI,IAAI,CAAC;QAClD,IAAI,CAAC,SAAS,GAAG,cAAc,CAAC,SAAS,IAAI,EAAE,CAAC;QAChD,IAAI,CAAC,WAAW,GAAG,cAAc,CAAC,WAAW,IAAI,EAAE,CAAC;IACtD,CAAC;CACF;AAZD,wCAYC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.DepthOfBookRequestDto = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const exchange_enum_1 = require("../../common/enum/exchange.enum");
|
|
16
|
+
class DepthOfBookRequestDto {
|
|
17
|
+
}
|
|
18
|
+
exports.DepthOfBookRequestDto = DepthOfBookRequestDto;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsString)(),
|
|
21
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], DepthOfBookRequestDto.prototype, "symbol", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsString)(),
|
|
26
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
27
|
+
(0, class_validator_1.IsEnum)(exchange_enum_1.Exchanges),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], DepthOfBookRequestDto.prototype, "exchange", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsBoolean)(),
|
|
32
|
+
(0, class_validator_1.IsOptional)(),
|
|
33
|
+
(0, class_transformer_1.Transform)(({ value }) => value === 'true'),
|
|
34
|
+
__metadata("design:type", Boolean)
|
|
35
|
+
], DepthOfBookRequestDto.prototype, "mock", void 0);
|
|
36
|
+
//# sourceMappingURL=depth-of-book.request.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"depth-of-book.request.dto.js","sourceRoot":"","sources":["../../../../../libs/securities-prices-sdk/src/snapshot/dto/depth-of-book.request.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAiE;AACjE,qDAAsF;AACtF,mEAA4D;AAC5D,MAAa,qBAAqB;CAcjC;AAdD,sDAcC;AAXC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACE;AAKf;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,yBAAS,CAAC;;uDACD;AAKjB;IAHC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAqB,EAAE,EAAE,CAAC,KAAK,KAAK,MAAM,CAAC;;mDAC/C"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./last-traded-price.dto"), exports);
|
|
18
|
+
__exportStar(require("./last-traded-price.request.dto"), exports);
|
|
19
|
+
__exportStar(require("./returns.dto"), exports);
|
|
20
|
+
__exportStar(require("./returns.request.dto"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/securities-prices-sdk/src/snapshot/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,kEAAgD;AAChD,gDAA8B;AAC9B,wDAAsC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare class LastTradedPriceDto {
|
|
2
|
+
symbol: string;
|
|
3
|
+
exchange: string;
|
|
4
|
+
tradeTime: string;
|
|
5
|
+
openingPrice: number;
|
|
6
|
+
closingPrice: number;
|
|
7
|
+
referenceClosingPrice: number;
|
|
8
|
+
executedPrice: number;
|
|
9
|
+
executedQuantity: number;
|
|
10
|
+
amount: number;
|
|
11
|
+
totalExecutedQuantity: number;
|
|
12
|
+
totalAmount: number;
|
|
13
|
+
unitVariation: number;
|
|
14
|
+
percentageVariation: number;
|
|
15
|
+
maximumPrice: number;
|
|
16
|
+
minimumPrice: number;
|
|
17
|
+
maximumPrice12Months: number;
|
|
18
|
+
minimumPrice12Months: number;
|
|
19
|
+
actualValueWAP: number;
|
|
20
|
+
weightedAveragePrice: number;
|
|
21
|
+
buyParticipant: string;
|
|
22
|
+
sellParticipant: string;
|
|
23
|
+
matchNumber: number;
|
|
24
|
+
isin: string;
|
|
25
|
+
referenceClosingDate: string;
|
|
26
|
+
totalOperations: number;
|
|
27
|
+
issuer: string;
|
|
28
|
+
instrumentDescription: string;
|
|
29
|
+
series: string;
|
|
30
|
+
constructor(lastTradePrice?: any);
|
|
31
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LastTradedPriceDto = void 0;
|
|
4
|
+
const utils_1 = require("../../common/helper/utils");
|
|
5
|
+
class LastTradedPriceDto {
|
|
6
|
+
constructor(lastTradePrice) {
|
|
7
|
+
this.symbol = lastTradePrice.symbol || null;
|
|
8
|
+
this.exchange = lastTradePrice.exchange || null;
|
|
9
|
+
this.tradeTime = lastTradePrice.tradeTime || null;
|
|
10
|
+
this.openingPrice = (0, utils_1.parseNumber)(lastTradePrice.openingPrice);
|
|
11
|
+
this.closingPrice = (0, utils_1.parseNumber)(lastTradePrice.closingPrice);
|
|
12
|
+
this.referenceClosingPrice = (0, utils_1.parseNumber)(lastTradePrice.referenceClosingPrice);
|
|
13
|
+
this.executedPrice = (0, utils_1.parseNumber)(lastTradePrice.executedPrice);
|
|
14
|
+
this.executedQuantity = (0, utils_1.parseNumber)(lastTradePrice.executedQuantity);
|
|
15
|
+
this.amount = (0, utils_1.parseNumber)(lastTradePrice.amount);
|
|
16
|
+
this.totalExecutedQuantity = (0, utils_1.parseNumber)(lastTradePrice.totalExecutedQuantity);
|
|
17
|
+
this.totalAmount = (0, utils_1.parseNumber)(lastTradePrice.totalAmount);
|
|
18
|
+
this.unitVariation = (0, utils_1.parseNumber)(lastTradePrice.unitVariation);
|
|
19
|
+
this.percentageVariation = (0, utils_1.parseNumber)(lastTradePrice.percentageVariation);
|
|
20
|
+
this.maximumPrice = (0, utils_1.parseNumber)(lastTradePrice.maximumPrice);
|
|
21
|
+
this.minimumPrice = (0, utils_1.parseNumber)(lastTradePrice.minimumPrice);
|
|
22
|
+
this.maximumPrice12Months = (0, utils_1.parseNumber)(lastTradePrice.maximumPrice12Months);
|
|
23
|
+
this.minimumPrice12Months = (0, utils_1.parseNumber)(lastTradePrice.minimumPrice12Months);
|
|
24
|
+
this.actualValueWAP = (0, utils_1.parseNumber)(lastTradePrice.actualValueWAP);
|
|
25
|
+
this.weightedAveragePrice = (0, utils_1.parseNumber)(lastTradePrice.weightedAveragePrice);
|
|
26
|
+
this.buyParticipant = lastTradePrice.buyParticipant || null;
|
|
27
|
+
this.sellParticipant = lastTradePrice.sellParticipant || null;
|
|
28
|
+
this.matchNumber = (0, utils_1.parseNumber)(lastTradePrice.matchNumber) || null;
|
|
29
|
+
this.isin = lastTradePrice.isin || null;
|
|
30
|
+
this.referenceClosingDate = lastTradePrice.referenceClosingDate || null;
|
|
31
|
+
this.totalOperations = (0, utils_1.parseNumber)(lastTradePrice.totalOperations) || null;
|
|
32
|
+
this.issuer = lastTradePrice.issuer || null;
|
|
33
|
+
this.instrumentDescription = lastTradePrice.instrumentDescription || null;
|
|
34
|
+
this.series = lastTradePrice.series || null;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.LastTradedPriceDto = LastTradedPriceDto;
|
|
38
|
+
//# sourceMappingURL=last-traded-price.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"last-tra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{
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LastTradedPriceRequestDto = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const exchange_enum_1 = require("../../common/enum/exchange.enum");
|
|
16
|
+
class LastTradedPriceRequestDto {
|
|
17
|
+
}
|
|
18
|
+
exports.LastTradedPriceRequestDto = LastTradedPriceRequestDto;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsString)(),
|
|
21
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], LastTradedPriceRequestDto.prototype, "symbol", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsOptional)(),
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
28
|
+
(0, class_validator_1.IsEnum)(exchange_enum_1.Exchanges),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], LastTradedPriceRequestDto.prototype, "exchange", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsBoolean)(),
|
|
33
|
+
(0, class_validator_1.IsOptional)(),
|
|
34
|
+
(0, class_transformer_1.Transform)(({ value }) => value === 'true'),
|
|
35
|
+
__metadata("design:type", Boolean)
|
|
36
|
+
], LastTradedPriceRequestDto.prototype, "mock", void 0);
|
|
37
|
+
//# sourceMappingURL=last-traded-price.request.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"last-traded-price.request.dto.js","sourceRoot":"","sources":["../../../../../libs/securities-prices-sdk/src/snapshot/dto/last-traded-price.request.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAiE;AACjE,qDAAsF;AACtF,mEAA4D;AAE5D,MAAa,yBAAyB;CAerC;AAfD,8DAeC;AAZC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yDACE;AAMf;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,yBAAS,CAAC;;2DACA;AAKlB;IAHC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAqB,EAAE,EAAE,CAAC,KAAK,KAAK,MAAM,CAAC;;uDAC/C"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReturnsDto = void 0;
|
|
4
|
+
const utils_1 = require("../../common/helper/utils");
|
|
5
|
+
class ReturnsDto {
|
|
6
|
+
constructor(returns) {
|
|
7
|
+
const { symbol, yearToDateReturn, annualReturn, monthReturn, weekReturn } = returns;
|
|
8
|
+
this.symbol = symbol || null;
|
|
9
|
+
this.yearToDateReturn = (0, utils_1.parseNumber)(yearToDateReturn);
|
|
10
|
+
this.annualReturn = (0, utils_1.parseNumber)(annualReturn);
|
|
11
|
+
this.monthReturn = (0, utils_1.parseNumber)(monthReturn);
|
|
12
|
+
this.weekReturn = (0, utils_1.parseNumber)(weekReturn);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.ReturnsDto = ReturnsDto;
|
|
16
|
+
//# sourceMappingURL=returns.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"returns.dto.js","sourceRoot":"","sources":["../../../../../libs/securities-prices-sdk/src/snapshot/dto/returns.dto.ts"],"names":[],"mappings":";;;AAAA,qDAAwD;AACxD,MAAa,UAAU;IAMrB,YAAY,OAAY;QACtB,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;QACpF,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI,IAAI,CAAC;QAC7B,IAAI,CAAC,gBAAgB,GAAG,IAAA,mBAAW,EAAC,gBAAgB,CAAC,CAAC;QACtD,IAAI,CAAC,YAAY,GAAG,IAAA,mBAAW,EAAC,YAAY,CAAC,CAAC;QAC9C,IAAI,CAAC,WAAW,GAAG,IAAA,mBAAW,EAAC,WAAW,CAAC,CAAC;QAC5C,IAAI,CAAC,UAAU,GAAG,IAAA,mBAAW,EAAC,UAAU,CAAC,CAAC;IAC5C,CAAC;CACF;AAdD,gCAcC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ReturnsRequestDto = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const exchange_enum_1 = require("../../common/enum/exchange.enum");
|
|
16
|
+
class ReturnsRequestDto {
|
|
17
|
+
constructor() {
|
|
18
|
+
this.exchange = exchange_enum_1.Exchanges.BMV;
|
|
19
|
+
this.mock = false;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.ReturnsRequestDto = ReturnsRequestDto;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsString)(),
|
|
25
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], ReturnsRequestDto.prototype, "symbol", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsOptional)(),
|
|
30
|
+
(0, class_validator_1.IsString)(),
|
|
31
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
32
|
+
(0, class_validator_1.IsEnum)(exchange_enum_1.Exchanges),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], ReturnsRequestDto.prototype, "exchange", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_validator_1.IsBoolean)(),
|
|
37
|
+
(0, class_validator_1.IsOptional)(),
|
|
38
|
+
(0, class_transformer_1.Transform)(({ value }) => value === 'true'),
|
|
39
|
+
__metadata("design:type", Boolean)
|
|
40
|
+
], ReturnsRequestDto.prototype, "mock", void 0);
|
|
41
|
+
//# sourceMappingURL=returns.request.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"returns.request.dto.js","sourceRoot":"","sources":["../../../../../libs/securities-prices-sdk/src/snapshot/dto/returns.request.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAiE;AACjE,qDAAsF;AACtF,mEAA4D;AAC5D,MAAa,iBAAiB;IAA9B;QASE,aAAQ,GAAY,yBAAS,CAAC,GAAG,CAAC;QAKlC,SAAI,GAAa,KAAK,CAAC;IACzB,CAAC;CAAA;AAfD,8CAeC;AAZC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;iDACE;AAMf;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,yBAAS,CAAC;;mDACgB;AAKlC;IAHC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAqB,EAAE,EAAE,CAAC,KAAK,KAAK,MAAM,CAAC;;+CACvC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.SnapshotModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const snapshot_service_1 = require("./snapshot.service");
|
|
12
|
+
let SnapshotModule = exports.SnapshotModule = class SnapshotModule {
|
|
13
|
+
};
|
|
14
|
+
exports.SnapshotModule = SnapshotModule = __decorate([
|
|
15
|
+
(0, common_1.Module)({
|
|
16
|
+
providers: [snapshot_service_1.SnapshotService],
|
|
17
|
+
})
|
|
18
|
+
], SnapshotModule);
|
|
19
|
+
//# sourceMappingURL=snapshot.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshot.module.js","sourceRoot":"","sources":["../../../../libs/securities-prices-sdk/src/snapshot/snapshot.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,yDAAqD;AAK9C,IAAM,cAAc,4BAApB,MAAM,cAAc;CAAG,CAAA;yBAAjB,cAAc;IAH1B,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,kCAAe,CAAC;KAC7B,CAAC;GACW,cAAc,CAAG"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { InfoselHttpClient } from '@infosel-sdk/core';
|
|
2
|
+
import { LastTradedPriceDto, LastTradedPriceRequestDto } from './dto';
|
|
3
|
+
import { BestBidOfferRequestDto } from './dto/best-bid-offer.request.dto';
|
|
4
|
+
import { BestBidOfferDto } from './dto/best-bid-offer.dto';
|
|
5
|
+
import { DepthOfBookRequestDto } from './dto/depth-of-book.request.dto';
|
|
6
|
+
import { DepthOfBookDto } from './dto/depth-of-book.dto';
|
|
7
|
+
import { ReturnsRequestDto } from './dto/returns.request.dto';
|
|
8
|
+
import { ReturnsDto } from './dto/returns.dto';
|
|
9
|
+
export declare class SnapshotService {
|
|
10
|
+
private infoselHttpClient;
|
|
11
|
+
constructor(infoselHttpClient: InfoselHttpClient);
|
|
12
|
+
lastTradedPrice(request: LastTradedPriceRequestDto): Promise<LastTradedPriceDto>;
|
|
13
|
+
bestBidOffer(request: BestBidOfferRequestDto): Promise<BestBidOfferDto>;
|
|
14
|
+
depthOfBook(request: DepthOfBookRequestDto): Promise<DepthOfBookDto>;
|
|
15
|
+
returns(request: ReturnsRequestDto): Promise<ReturnsDto>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SnapshotService = void 0;
|
|
13
|
+
const core_1 = require("@infosel-sdk/core");
|
|
14
|
+
const common_1 = require("@nestjs/common");
|
|
15
|
+
const dto_1 = require("./dto");
|
|
16
|
+
const returns_dto_1 = require("./dto/returns.dto");
|
|
17
|
+
let SnapshotService = exports.SnapshotService = class SnapshotService {
|
|
18
|
+
constructor(infoselHttpClient) {
|
|
19
|
+
this.infoselHttpClient = infoselHttpClient;
|
|
20
|
+
}
|
|
21
|
+
async lastTradedPrice(request) {
|
|
22
|
+
const { symbol, exchange, mock } = request;
|
|
23
|
+
const response = await this.infoselHttpClient.get('/snapshot/last-traded-price', {
|
|
24
|
+
params: {
|
|
25
|
+
symbol,
|
|
26
|
+
exchange,
|
|
27
|
+
mock,
|
|
28
|
+
},
|
|
29
|
+
headers: {
|
|
30
|
+
'Content-Type': 'application/json',
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
return new dto_1.LastTradedPriceDto(response);
|
|
34
|
+
}
|
|
35
|
+
bestBidOffer(request) {
|
|
36
|
+
const { symbol, exchange, source, mock } = request;
|
|
37
|
+
return this.infoselHttpClient.get('/snapshot/best-bid-offer', {
|
|
38
|
+
params: {
|
|
39
|
+
symbol,
|
|
40
|
+
exchange,
|
|
41
|
+
source,
|
|
42
|
+
mock,
|
|
43
|
+
},
|
|
44
|
+
headers: {
|
|
45
|
+
'Content-Type': 'application/json',
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
depthOfBook(request) {
|
|
50
|
+
const { symbol, exchange, mock } = request;
|
|
51
|
+
return this.infoselHttpClient.get('/snapshot/depth-of-book', {
|
|
52
|
+
params: {
|
|
53
|
+
symbol,
|
|
54
|
+
exchange,
|
|
55
|
+
mock,
|
|
56
|
+
},
|
|
57
|
+
headers: {
|
|
58
|
+
'Content-Type': 'application/json',
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
async returns(request) {
|
|
63
|
+
const { symbol, exchange, mock } = request;
|
|
64
|
+
const response = await this.infoselHttpClient.get('/snapshot/last-traded-price/returns', {
|
|
65
|
+
params: {
|
|
66
|
+
symbol,
|
|
67
|
+
exchange,
|
|
68
|
+
mock,
|
|
69
|
+
},
|
|
70
|
+
headers: {
|
|
71
|
+
'Content-Type': 'application/json',
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
return new returns_dto_1.ReturnsDto(response);
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
exports.SnapshotService = SnapshotService = __decorate([
|
|
78
|
+
(0, common_1.Injectable)(),
|
|
79
|
+
__metadata("design:paramtypes", [core_1.InfoselHttpClient])
|
|
80
|
+
], SnapshotService);
|
|
81
|
+
//# sourceMappingURL=snapshot.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshot.service.js","sourceRoot":"","sources":["../../../../libs/securities-prices-sdk/src/snapshot/snapshot.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAsD;AACtD,2CAA4C;AAC5C,+BAAsE;AAMtE,mDAA+C;AAGxC,IAAM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