@dhedge/backend-flatcoin-core 0.2.58 → 0.2.60
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.
|
@@ -2,9 +2,13 @@ import { BigNumber } from 'ethers';
|
|
|
2
2
|
export declare abstract class LeverageBalanceParent {
|
|
3
3
|
id: number;
|
|
4
4
|
account: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
marginDeposited: BigNumber;
|
|
6
|
+
marginDepositedUsd: BigNumber;
|
|
7
|
+
marginTotal: BigNumber;
|
|
8
|
+
marginTotalUsd: BigNumber;
|
|
9
|
+
totalValue: BigNumber;
|
|
10
|
+
totalValueUsd: BigNumber;
|
|
11
|
+
totalValueUsdFormatted: number;
|
|
8
12
|
timestamp: number;
|
|
9
13
|
blockNumber: number;
|
|
10
14
|
}
|
|
@@ -28,19 +28,45 @@ __decorate([
|
|
|
28
28
|
], LeverageBalanceParent.prototype, "account", void 0);
|
|
29
29
|
__decorate([
|
|
30
30
|
(0, graphql_1.Field)(),
|
|
31
|
-
(0, typeorm_1.Column)({ name: '
|
|
31
|
+
(0, typeorm_1.Column)({ name: 'margin_deposited', type: 'bigint', precision: 30, transformer: utils_1.bigNumberTransformer }),
|
|
32
32
|
__metadata("design:type", ethers_1.BigNumber)
|
|
33
|
-
], LeverageBalanceParent.prototype, "
|
|
33
|
+
], LeverageBalanceParent.prototype, "marginDeposited", void 0);
|
|
34
34
|
__decorate([
|
|
35
35
|
(0, graphql_1.Field)(),
|
|
36
|
-
(0, typeorm_1.Column)({ name: '
|
|
36
|
+
(0, typeorm_1.Column)({ name: 'margin_deposited_usd', type: 'bigint', precision: 30, transformer: utils_1.bigNumberTransformer }),
|
|
37
37
|
__metadata("design:type", ethers_1.BigNumber)
|
|
38
|
-
], LeverageBalanceParent.prototype, "
|
|
38
|
+
], LeverageBalanceParent.prototype, "marginDepositedUsd", void 0);
|
|
39
39
|
__decorate([
|
|
40
40
|
(0, graphql_1.Field)(),
|
|
41
|
-
(0, typeorm_1.Column)({ name: '
|
|
41
|
+
(0, typeorm_1.Column)({ name: 'margin_total', type: 'bigint', precision: 30, transformer: utils_1.bigNumberTransformer }),
|
|
42
|
+
__metadata("design:type", ethers_1.BigNumber)
|
|
43
|
+
], LeverageBalanceParent.prototype, "marginTotal", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, graphql_1.Field)(),
|
|
46
|
+
(0, typeorm_1.Column)({ name: 'margin_total_usd', type: 'bigint', precision: 30, transformer: utils_1.bigNumberTransformer }),
|
|
47
|
+
__metadata("design:type", ethers_1.BigNumber)
|
|
48
|
+
], LeverageBalanceParent.prototype, "marginTotalUsd", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, graphql_1.Field)(),
|
|
51
|
+
(0, typeorm_1.Column)({ name: 'total_value', type: 'bigint', precision: 30, transformer: utils_1.bigNumberTransformer }),
|
|
52
|
+
__metadata("design:type", ethers_1.BigNumber)
|
|
53
|
+
], LeverageBalanceParent.prototype, "totalValue", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, graphql_1.Field)(),
|
|
56
|
+
(0, typeorm_1.Column)({ name: 'total_value_usd', type: 'bigint', precision: 30, transformer: utils_1.bigNumberTransformer }),
|
|
57
|
+
__metadata("design:type", ethers_1.BigNumber)
|
|
58
|
+
], LeverageBalanceParent.prototype, "totalValueUsd", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, graphql_1.Field)(),
|
|
61
|
+
(0, typeorm_1.Column)({
|
|
62
|
+
name: 'total_value_usd_formatted',
|
|
63
|
+
type: 'decimal',
|
|
64
|
+
precision: 10,
|
|
65
|
+
scale: 2,
|
|
66
|
+
transformer: utils_1.numericTransformer,
|
|
67
|
+
}),
|
|
42
68
|
__metadata("design:type", Number)
|
|
43
|
-
], LeverageBalanceParent.prototype, "
|
|
69
|
+
], LeverageBalanceParent.prototype, "totalValueUsdFormatted", void 0);
|
|
44
70
|
__decorate([
|
|
45
71
|
(0, graphql_1.Field)(),
|
|
46
72
|
(0, typeorm_1.Column)({ name: 'timestamp', type: 'numeric', precision: 25, transformer: utils_1.numericTransformer }),
|
|
@@ -495,6 +495,7 @@ exports.getOpenPositionsQueryPaginated = (0, graphql_request_1.gql) `
|
|
|
495
495
|
query GetOpenPositions($skip: Int, $first: Int) {
|
|
496
496
|
positions(where: { status: 0 }, skip: $skip, first: $first) {
|
|
497
497
|
tokenId
|
|
498
|
+
account
|
|
498
499
|
}
|
|
499
500
|
}
|
|
500
501
|
`;
|
|
@@ -502,6 +503,7 @@ exports.getClosedPositionsQueryPaginated = (0, graphql_request_1.gql) `
|
|
|
502
503
|
query GetClosedPositions($skip: Int, $first: Int) {
|
|
503
504
|
positions(where: { status_in: [1, 2, 3] }, skip: $skip, first: $first) {
|
|
504
505
|
tokenId
|
|
506
|
+
account
|
|
505
507
|
}
|
|
506
508
|
}
|
|
507
509
|
`;
|