@typus/typus-perp-sdk 1.1.46 → 1.1.48
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
|
@@ -695,7 +695,8 @@ async function getLeaderboardFromSentio(startTs, endTs, type = LeaderboardType.C
|
|
|
695
695
|
LEFT JOIN OrderFilled o ON s.transaction_hash = o.transaction_hash
|
|
696
696
|
WHERE o.base_token NOT IN (
|
|
697
697
|
'XAU', 'XAG', 'USOIL', 'JPY', 'SPYX', 'QQQX',
|
|
698
|
-
'TSLAX', 'NVDAX', 'AAPLX', 'GOOGLX', 'METAX'
|
|
698
|
+
'TSLAX', 'NVDAX', 'AAPLX', 'GOOGLX', 'METAX',
|
|
699
|
+
'COINX', 'CRCLX'
|
|
699
700
|
)
|
|
700
701
|
AND s.timestamp >= ${startTs} AND s.timestamp < ${endTs}
|
|
701
702
|
),
|
|
@@ -748,7 +749,8 @@ async function getLeaderboardFromSentio(startTs, endTs, type = LeaderboardType.C
|
|
|
748
749
|
LEFT JOIN OrderFilled o ON s.transaction_hash = o.transaction_hash
|
|
749
750
|
WHERE o.base_token IN (
|
|
750
751
|
'XAU', 'XAG', 'USOIL', 'JPY', 'SPYX', 'QQQX',
|
|
751
|
-
'TSLAX', 'NVDAX', 'AAPLX', 'GOOGLX', 'METAX'
|
|
752
|
+
'TSLAX', 'NVDAX', 'AAPLX', 'GOOGLX', 'METAX',
|
|
753
|
+
'COINX', 'CRCLX'
|
|
752
754
|
)
|
|
753
755
|
AND s.timestamp >= ${startTs} AND s.timestamp < ${endTs}
|
|
754
756
|
),
|
package/dist/src/user/history.js
CHANGED
|
@@ -629,7 +629,13 @@ async function getOrderMatchFromSentio(userAddress, startTimestamp, events, data
|
|
|
629
629
|
// console.log(x, related);
|
|
630
630
|
if (related) {
|
|
631
631
|
x.order_type = related.order_type;
|
|
632
|
-
|
|
632
|
+
if (related?.position_id !== null) {
|
|
633
|
+
const origin_order_filled_event = order_match.findLast(e => e.market == x.market && e.position_id == related?.position_id);
|
|
634
|
+
if (origin_order_filled_event) {
|
|
635
|
+
const origin_order_place_event = events.findLast((e) => e.order_id == origin_order_filled_event?.order_id && e.market == origin_order_filled_event?.market);
|
|
636
|
+
x.collateral = origin_order_place_event?.collateral ?? related.collateral;
|
|
637
|
+
}
|
|
638
|
+
}
|
|
633
639
|
x.dov_index = related.dov_index;
|
|
634
640
|
// it mean filled by matching cranker
|
|
635
641
|
if (x.action === "Order Filled (Close Position)") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typus/typus-perp-sdk",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.48",
|
|
4
4
|
"repository": "https://github.com/Typus-Lab/typus-perp-sdk.git",
|
|
5
5
|
"author": "Typus",
|
|
6
6
|
"description": "typus perp sdk",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@mysten/bcs": "1.9.2",
|
|
10
10
|
"@mysten/sui": "1.44.0",
|
|
11
|
-
"@typus/typus-sdk": "1.8.
|
|
11
|
+
"@typus/typus-sdk": "1.8.41"
|
|
12
12
|
},
|
|
13
13
|
"resolutions": {
|
|
14
14
|
"@mysten/bcs": "1.9.2",
|
|
@@ -45,4 +45,4 @@
|
|
|
45
45
|
},
|
|
46
46
|
"homepage": "https://github.com/Typus-Lab/typus-perp-sdk#readme",
|
|
47
47
|
"packageManager": "yarn@4.10.3+sha512.c38cafb5c7bb273f3926d04e55e1d8c9dfa7d9c3ea1f36a4868fa028b9e5f72298f0b7f401ad5eb921749eb012eb1c3bb74bf7503df3ee43fd600d14a018266f"
|
|
48
|
-
}
|
|
48
|
+
}
|