@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 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) => console.log("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:
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acta-markets/ts-sdk",
3
- "version": "0.0.3-beta",
3
+ "version": "0.0.4-beta",
4
4
  "description": "TypeScript SDK for Acta Protocol",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",