polymarket-apis 0.3.1__py3-none-any.whl → 0.3.3__py3-none-any.whl
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.
Potentially problematic release.
This version of polymarket-apis might be problematic. Click here for more details.
- polymarket_apis/__init__.py +3 -2
- polymarket_apis/clients/clob_client.py +4 -4
- polymarket_apis/clients/data_client.py +105 -15
- polymarket_apis/clients/gamma_client.py +520 -50
- polymarket_apis/clients/web3_client.py +288 -86
- polymarket_apis/types/__init__.py +9 -37
- polymarket_apis/types/clob_types.py +3 -3
- polymarket_apis/types/common.py +13 -32
- polymarket_apis/types/data_types.py +11 -1
- polymarket_apis/types/gamma_types.py +517 -264
- polymarket_apis/types/websockets_types.py +1 -29
- polymarket_apis/utilities/constants.py +1 -1
- polymarket_apis/utilities/web3/abis/Safe.json +1138 -0
- polymarket_apis/utilities/web3/abis/SafeProxyFactory.json +224 -0
- polymarket_apis/utilities/web3/helpers.py +152 -0
- {polymarket_apis-0.3.1.dist-info → polymarket_apis-0.3.3.dist-info}/METADATA +30 -3
- {polymarket_apis-0.3.1.dist-info → polymarket_apis-0.3.3.dist-info}/RECORD +18 -16
- {polymarket_apis-0.3.1.dist-info → polymarket_apis-0.3.3.dist-info}/WHEEL +0 -0
|
@@ -5,6 +5,7 @@ from pydantic import AliasChoices, BaseModel, Field, field_validator
|
|
|
5
5
|
|
|
6
6
|
from ..types.clob_types import MakerOrder, OrderBookSummary, TickSize
|
|
7
7
|
from ..types.common import EthAddress, Keccak256, TimeseriesPoint
|
|
8
|
+
from ..types.gamma_types import Comment, Reaction
|
|
8
9
|
|
|
9
10
|
# wss://ws-subscriptions-clob.polymarket.com/ws/market types
|
|
10
11
|
|
|
@@ -151,35 +152,6 @@ class ActivityTrade(BaseModel):
|
|
|
151
152
|
profile_image_optimized: Optional[str] = Field(None, alias="profileImageOptimized")
|
|
152
153
|
|
|
153
154
|
|
|
154
|
-
class Comment(BaseModel):
|
|
155
|
-
id: str # Unique identifier of comment
|
|
156
|
-
body: str # Content of the comment
|
|
157
|
-
parent_entity_type: str = Field(
|
|
158
|
-
alias="parentEntityType"
|
|
159
|
-
) # Type of the parent entity (Event or Series)
|
|
160
|
-
parent_entity_id: int = Field(alias="parentEntityID") # ID of the parent entity
|
|
161
|
-
parent_comment_id: Optional[str] = Field(
|
|
162
|
-
None, alias="parentCommentID"
|
|
163
|
-
) # ID of the parent comment
|
|
164
|
-
user_address: str = Field(alias="userAddress") # Address of the user
|
|
165
|
-
reply_address: Optional[str] = Field(
|
|
166
|
-
None, alias="replyAddress"
|
|
167
|
-
) # Address of the reply user
|
|
168
|
-
created_at: datetime = Field(alias="createdAt") # Creation timestamp
|
|
169
|
-
updated_at: Optional[datetime] = Field(
|
|
170
|
-
None, alias="updatedAt"
|
|
171
|
-
) # Last update timestamp
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
class Reaction(BaseModel):
|
|
175
|
-
id: str # Unique identifier of reaction
|
|
176
|
-
comment_id: int = Field(alias="commentID") # ID of the comment
|
|
177
|
-
reaction_type: str = Field(alias="reactionType") # Type of the reaction
|
|
178
|
-
icon: Optional[str] = None # Icon representing the reaction
|
|
179
|
-
user_address: str = Field(alias="userAddress") # Address of the user
|
|
180
|
-
created_at: datetime = Field(alias="createdAt") # Creation timestamp
|
|
181
|
-
|
|
182
|
-
|
|
183
155
|
class Request(BaseModel):
|
|
184
156
|
request_id: str = Field(alias="requestId") # Unique identifier for the request
|
|
185
157
|
proxy_address: str = Field(alias="proxyAddress") # Proxy address
|
|
@@ -14,7 +14,7 @@ L1_AUTH_UNAVAILABLE = "A private key is needed to interact with this endpoint!"
|
|
|
14
14
|
|
|
15
15
|
L2_AUTH_UNAVAILABLE = "API Credentials are needed to interact with this endpoint!"
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
ADDRESS_ZERO = "0x0000000000000000000000000000000000000000"
|
|
18
18
|
HASH_ZERO = "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
19
19
|
|
|
20
20
|
AMOY = 80002
|