@typus/typus-perp-sdk 1.0.53-upgrade → 1.0.54
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/dist/src/api/sentio.js
CHANGED
|
@@ -165,7 +165,7 @@ function getVolumeFromSentio() {
|
|
|
165
165
|
aggregation: {
|
|
166
166
|
total: {},
|
|
167
167
|
},
|
|
168
|
-
groupBy: ["
|
|
168
|
+
groupBy: ["base_token"],
|
|
169
169
|
limit: 0,
|
|
170
170
|
functions: [],
|
|
171
171
|
color: "",
|
|
@@ -188,7 +188,7 @@ function getVolumeFromSentio() {
|
|
|
188
188
|
return [4 /*yield*/, response.json()];
|
|
189
189
|
case 2:
|
|
190
190
|
data = _a.sent();
|
|
191
|
-
symbols = data.results[0].matrix.samples.map(function (s) { return s.metric.labels.
|
|
191
|
+
symbols = data.results[0].matrix.samples.map(function (s) { return s.metric.labels.base_token; });
|
|
192
192
|
console.log(symbols);
|
|
193
193
|
volume = data.results[0].matrix.samples.map(function (s) { return s.values; });
|
|
194
194
|
console.log(volume);
|
package/dist/src/user/history.js
CHANGED
|
@@ -338,8 +338,9 @@ function getLiquidateFromSentio(userAddress, startTimestamp, events) {
|
|
|
338
338
|
case 1:
|
|
339
339
|
datas = _a.sent();
|
|
340
340
|
liquidate = datas.map(function (x) {
|
|
341
|
+
console.log(x);
|
|
341
342
|
var collateral = Number(x.liquidator_fee) + Number(x.value_for_lp_pool);
|
|
342
|
-
var base_token = toToken(x.
|
|
343
|
+
var base_token = toToken(x.base_token);
|
|
343
344
|
var txHistory = {
|
|
344
345
|
action: "Liquidation",
|
|
345
346
|
typeName: "LiquidateEvent",
|
|
@@ -389,7 +390,7 @@ function getOrderMatchFromSentio(userAddress, startTimestamp, events) {
|
|
|
389
390
|
case 1:
|
|
390
391
|
datas = _a.sent();
|
|
391
392
|
order_match = datas.map(function (x) {
|
|
392
|
-
var base_token = toToken(x.
|
|
393
|
+
var base_token = toToken(x.base_token);
|
|
393
394
|
var txHistory = {
|
|
394
395
|
action: x.order_type == "Open" ? "Order Filled (Open Position)" : "Order Filled (Close Position)",
|
|
395
396
|
typeName: "OrderFilledEvent",
|
|
@@ -499,7 +500,8 @@ function getRealizeOptionFromSentio(userAddress, startTimestamp, events) {
|
|
|
499
500
|
});
|
|
500
501
|
});
|
|
501
502
|
}
|
|
502
|
-
//
|
|
503
|
+
// getLiquidateFromSentio("0x95f26ce574fc9ace2608807648d99a4dce17f1be8964613d5b972edc82849e9e", 0, []);
|
|
504
|
+
// getOrderMatchFromSentio("0x95f26ce574fc9ace2608807648d99a4dce17f1be8964613d5b972edc82849e9e", 0, []);
|
|
503
505
|
// getRealizeOptionFromSentio("0x95f26ce574fc9ace2608807648d99a4dce17f1be8964613d5b972edc82849e9e", 0);
|
|
504
506
|
function toToken(name) {
|
|
505
507
|
switch (name) {
|