@acta-markets/ts-sdk 0.0.3-beta → 0.0.4-beta
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/README.md +5 -1
- package/dist/ws/types.d.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -82,7 +82,11 @@ client.ws!.on("chainEvent", (e) => console.log("chain event", e));
|
|
|
82
82
|
|
|
83
83
|
```ts
|
|
84
84
|
client.ws!.on("markets", (markets) => console.log("markets", markets));
|
|
85
|
-
client.ws!.on("positions", (positions) =>
|
|
85
|
+
client.ws!.on("positions", (positions) => {
|
|
86
|
+
console.log("positions", positions);
|
|
87
|
+
// taker position payload includes market expiry as unix seconds
|
|
88
|
+
console.log("first expiry", positions[0]?.expiry_ts);
|
|
89
|
+
});
|
|
86
90
|
|
|
87
91
|
client.ws!.getMarkets();
|
|
88
92
|
// positions require auth:
|
package/dist/ws/types.d.ts
CHANGED
|
@@ -825,6 +825,8 @@ export type PositionInfo = {
|
|
|
825
825
|
/** Net premium amount from on-chain position state (quote token base units). */
|
|
826
826
|
total_premium: WsU64;
|
|
827
827
|
created_at: WsU64;
|
|
828
|
+
/** Market expiry timestamp (unix seconds), sourced from markets table join. */
|
|
829
|
+
expiry_ts: WsU64;
|
|
828
830
|
};
|
|
829
831
|
export type TradeInfo = {
|
|
830
832
|
id: UuidString;
|