@polymarbot/shared 0.3.4 → 0.3.5

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/markets/types.cjs CHANGED
@@ -25,10 +25,10 @@ __export(types_exports, {
25
25
  });
26
26
  module.exports = __toCommonJS(types_exports);
27
27
  var SupportedSymbol = /* @__PURE__ */ ((SupportedSymbol2) => {
28
- SupportedSymbol2["ETH"] = "eth";
29
28
  SupportedSymbol2["BTC"] = "btc";
30
- SupportedSymbol2["SOL"] = "sol";
29
+ SupportedSymbol2["ETH"] = "eth";
31
30
  SupportedSymbol2["XRP"] = "xrp";
31
+ SupportedSymbol2["SOL"] = "sol";
32
32
  return SupportedSymbol2;
33
33
  })(SupportedSymbol || {});
34
34
  var SupportedInterval = /* @__PURE__ */ ((SupportedInterval2) => {
@@ -1,8 +1,8 @@
1
1
  declare enum SupportedSymbol {
2
- ETH = "eth",
3
2
  BTC = "btc",
4
- SOL = "sol",
5
- XRP = "xrp"
3
+ ETH = "eth",
4
+ XRP = "xrp",
5
+ SOL = "sol"
6
6
  }
7
7
  declare enum SupportedInterval {
8
8
  M15 = "15m",
@@ -1,8 +1,8 @@
1
1
  declare enum SupportedSymbol {
2
- ETH = "eth",
3
2
  BTC = "btc",
4
- SOL = "sol",
5
- XRP = "xrp"
3
+ ETH = "eth",
4
+ XRP = "xrp",
5
+ SOL = "sol"
6
6
  }
7
7
  declare enum SupportedInterval {
8
8
  M15 = "15m",
package/markets/types.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SupportedInterval,
3
3
  SupportedSymbol
4
- } from "../chunk-S6EEUHHX.js";
4
+ } from "../chunk-DF467RX7.js";
5
5
  import "../chunk-JSBRDJBE.js";
6
6
  export {
7
7
  SupportedInterval,
package/markets/utils.cjs CHANGED
@@ -616,10 +616,10 @@ var dayjs_default = import_dayjs.default;
616
616
 
617
617
  // src/utils/markets/types.ts
618
618
  var SupportedSymbol = /* @__PURE__ */ ((SupportedSymbol2) => {
619
- SupportedSymbol2["ETH"] = "eth";
620
619
  SupportedSymbol2["BTC"] = "btc";
621
- SupportedSymbol2["SOL"] = "sol";
620
+ SupportedSymbol2["ETH"] = "eth";
622
621
  SupportedSymbol2["XRP"] = "xrp";
622
+ SupportedSymbol2["SOL"] = "sol";
623
623
  return SupportedSymbol2;
624
624
  })(SupportedSymbol || {});
625
625
 
package/markets/utils.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SupportedSymbol
3
- } from "../chunk-S6EEUHHX.js";
3
+ } from "../chunk-DF467RX7.js";
4
4
  import {
5
5
  __commonJS,
6
6
  __toESM
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polymarbot/shared",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "type": "module",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",
@@ -80,14 +80,22 @@ interface TokenTradeStepOrder {
80
80
  size: number;
81
81
  status: string;
82
82
  updatedAt: number;
83
+ expiresAt?: number;
83
84
  keep?: boolean;
84
85
  }
85
86
 
87
+ interface TokenTradeRecordData {
88
+
89
+ positionSize: number;
90
+
91
+ orders: TokenTradeStepOrder[];
92
+ }
93
+
86
94
  interface MarketTradeRecord {
87
95
  marketId: string;
88
96
  strategyJson: string;
89
97
  tokens: {
90
- [tokenId: string]: TokenTradeStepOrder[];
98
+ [tokenId: string]: TokenTradeRecordData;
91
99
  };
92
100
  }
93
101
 
@@ -117,4 +125,4 @@ interface MarketTokenData extends MarketToken {
117
125
 
118
126
  type MarketTokenContext = Record<string, MarketTokenData>;
119
127
 
120
- export { type MarketTokenContext, type MarketTokenData, type MarketTradeContext, type MarketTradeRecord, OrderStatus, type StrategyCallback, type StrategyCondition, type StrategyConfig, type StrategyErrorCallback, type StrategyExecQueue, type StrategyFn, type TokenTradeStepOrder, TradeSide, type TradeStep, type TradeStepBuy, type TradeStepSell };
128
+ export { type MarketTokenContext, type MarketTokenData, type MarketTradeContext, type MarketTradeRecord, OrderStatus, type StrategyCallback, type StrategyCondition, type StrategyConfig, type StrategyErrorCallback, type StrategyExecQueue, type StrategyFn, type TokenTradeRecordData, type TokenTradeStepOrder, TradeSide, type TradeStep, type TradeStepBuy, type TradeStepSell };
@@ -80,14 +80,22 @@ interface TokenTradeStepOrder {
80
80
  size: number;
81
81
  status: string;
82
82
  updatedAt: number;
83
+ expiresAt?: number;
83
84
  keep?: boolean;
84
85
  }
85
86
 
87
+ interface TokenTradeRecordData {
88
+
89
+ positionSize: number;
90
+
91
+ orders: TokenTradeStepOrder[];
92
+ }
93
+
86
94
  interface MarketTradeRecord {
87
95
  marketId: string;
88
96
  strategyJson: string;
89
97
  tokens: {
90
- [tokenId: string]: TokenTradeStepOrder[];
98
+ [tokenId: string]: TokenTradeRecordData;
91
99
  };
92
100
  }
93
101
 
@@ -117,4 +125,4 @@ interface MarketTokenData extends MarketToken {
117
125
 
118
126
  type MarketTokenContext = Record<string, MarketTokenData>;
119
127
 
120
- export { type MarketTokenContext, type MarketTokenData, type MarketTradeContext, type MarketTradeRecord, OrderStatus, type StrategyCallback, type StrategyCondition, type StrategyConfig, type StrategyErrorCallback, type StrategyExecQueue, type StrategyFn, type TokenTradeStepOrder, TradeSide, type TradeStep, type TradeStepBuy, type TradeStepSell };
128
+ export { type MarketTokenContext, type MarketTokenData, type MarketTradeContext, type MarketTradeRecord, OrderStatus, type StrategyCallback, type StrategyCondition, type StrategyConfig, type StrategyErrorCallback, type StrategyExecQueue, type StrategyFn, type TokenTradeRecordData, type TokenTradeStepOrder, TradeSide, type TradeStep, type TradeStepBuy, type TradeStepSell };
@@ -1,9 +1,9 @@
1
1
  // src/utils/markets/types.ts
2
2
  var SupportedSymbol = /* @__PURE__ */ ((SupportedSymbol2) => {
3
- SupportedSymbol2["ETH"] = "eth";
4
3
  SupportedSymbol2["BTC"] = "btc";
5
- SupportedSymbol2["SOL"] = "sol";
4
+ SupportedSymbol2["ETH"] = "eth";
6
5
  SupportedSymbol2["XRP"] = "xrp";
6
+ SupportedSymbol2["SOL"] = "sol";
7
7
  return SupportedSymbol2;
8
8
  })(SupportedSymbol || {});
9
9
  var SupportedInterval = /* @__PURE__ */ ((SupportedInterval2) => {