1818OrderSide = Literal ["buy" , "sell" ]
1919OrderType = Literal ["market" , "limit" ]
2020OutcomeType = Literal ["yes" , "no" , "up" , "down" ]
21+ SubscriptionOption = Literal ["trades" , "positions" , "balances" ]
2122
2223
2324@dataclass
@@ -501,7 +502,7 @@ class BuiltOrder:
501502 exchange : str
502503 """The exchange name this order was built for."""
503504
504- params : Dict [ str , Any ]
505+ params : "CreateOrderParams"
505506 """The original params used to build this order."""
506507
507508 raw : Any
@@ -510,10 +511,28 @@ class BuiltOrder:
510511 signed_order : Optional [Dict [str , Any ]] = None
511512 """For CLOB exchanges (Polymarket): the EIP-712 signed order."""
512513
513- tx : Optional [Dict [ str , Any ] ] = None
514+ tx : Optional ["TxPayload" ] = None
514515 """For on-chain AMM exchanges: the EVM transaction payload."""
515516
516517
518+ class CreateOrderParams (TypedDict , total = False ):
519+ """Parameters used to build or create an order."""
520+ market_id : str
521+ outcome_id : str
522+ side : OrderSide
523+ type : OrderType
524+ amount : float
525+ price : float
526+ fee : int
527+
528+
529+ class TxPayload (TypedDict ):
530+ """EVM transaction payload returned for on-chain AMM orders."""
531+ to : str
532+ data : str
533+ value : str
534+ chainId : int
535+
517536@dataclass
518537class Position :
519538 """A current position in a market.
@@ -767,6 +786,7 @@ class TradesParams(TypedDict, total=False):
767786 until : int
768787 limit : int
769788 cursor : str
789+ resolution : str
770790
771791
772792class HistoryFilterParams (TypedDict , total = False ):
@@ -934,12 +954,12 @@ class MatchedMarketCluster:
934954 confidence : float
935955 """Cluster confidence score."""
936956
957+ volume_24h : float
958+ """Total 24-hour volume across markets in the cluster."""
959+
937960 category : Optional [str ] = None
938961 """Canonical category selected by the hosted API."""
939962
940- volume_24h : Optional [float ] = None
941- """Total 24-hour volume across markets in the cluster."""
942-
943963 raw_matches : Optional [List [Dict [str , Any ]]] = None
944964 """Pairwise match edges used to build the cluster when requested."""
945965
@@ -963,12 +983,12 @@ class MatchedEventCluster:
963983 confidence : float
964984 """Cluster confidence score."""
965985
986+ volume_24h : float
987+ """Total 24-hour volume across events in the cluster."""
988+
966989 category : Optional [str ] = None
967990 """Canonical category selected by the hosted API."""
968991
969- volume_24h : Optional [float ] = None
970- """Total 24-hour volume across events in the cluster."""
971-
972992 raw_matches : Optional [List [Dict [str , Any ]]] = None
973993 """Pairwise match edges used to build the cluster when requested."""
974994
0 commit comments