fere-sdk 0.6.0__tar.gz → 0.7.0.dev53__tar.gz
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.
- {fere_sdk-0.6.0 → fere_sdk-0.7.0.dev53}/PKG-INFO +1 -1
- {fere_sdk-0.6.0 → fere_sdk-0.7.0.dev53}/pyproject.toml +1 -1
- {fere_sdk-0.6.0 → fere_sdk-0.7.0.dev53}/src/fere_sdk/client.py +9 -2
- {fere_sdk-0.6.0 → fere_sdk-0.7.0.dev53}/src/fere_sdk/perp_models.py +14 -5
- {fere_sdk-0.6.0 → fere_sdk-0.7.0.dev53}/.gitignore +0 -0
- {fere_sdk-0.6.0 → fere_sdk-0.7.0.dev53}/README.md +0 -0
- {fere_sdk-0.6.0 → fere_sdk-0.7.0.dev53}/src/fere_sdk/__init__.py +0 -0
- {fere_sdk-0.6.0 → fere_sdk-0.7.0.dev53}/src/fere_sdk/auth.py +0 -0
- {fere_sdk-0.6.0 → fere_sdk-0.7.0.dev53}/src/fere_sdk/low_level.py +0 -0
- {fere_sdk-0.6.0 → fere_sdk-0.7.0.dev53}/src/fere_sdk/models.py +0 -0
- {fere_sdk-0.6.0 → fere_sdk-0.7.0.dev53}/src/fere_sdk/spot_models.py +0 -0
- {fere_sdk-0.6.0 → fere_sdk-0.7.0.dev53}/src/fere_sdk/timeouts.py +0 -0
|
@@ -356,15 +356,22 @@ class FereClient:
|
|
|
356
356
|
async def perp_withdraw(
|
|
357
357
|
self,
|
|
358
358
|
amount_usd: float,
|
|
359
|
-
destination_chain_id: int,
|
|
359
|
+
destination_chain_id: int | None = None,
|
|
360
360
|
destination_token: str | None = None,
|
|
361
361
|
timeout: int = DEFAULT_TIMEOUT,
|
|
362
|
+
to_address: str | None = None,
|
|
362
363
|
) -> dict:
|
|
363
|
-
"""Withdraw perp collateral and wait for completion.
|
|
364
|
+
"""Withdraw perp collateral and wait for completion.
|
|
365
|
+
|
|
366
|
+
Pass ``to_address`` to receive USDC on Arbitrum at an outside
|
|
367
|
+
address directly, or ``destination_chain_id`` (+ token) to land it
|
|
368
|
+
in the agent's own wallet on that chain.
|
|
369
|
+
"""
|
|
364
370
|
req = PerpWithdrawRequest(
|
|
365
371
|
amount_usd=amount_usd,
|
|
366
372
|
destination_chain_id=destination_chain_id,
|
|
367
373
|
destination_token=destination_token,
|
|
374
|
+
to_address=to_address,
|
|
368
375
|
)
|
|
369
376
|
return await self._api.perp_withdraw(req, wait=True, timeout=timeout)
|
|
370
377
|
|
|
@@ -101,15 +101,24 @@ class PerpFundRequest:
|
|
|
101
101
|
|
|
102
102
|
@dataclass
|
|
103
103
|
class PerpWithdrawRequest:
|
|
104
|
+
"""Withdraw perp collateral.
|
|
105
|
+
|
|
106
|
+
Set ``destination_chain_id`` (+ token) to land it in the agent's own
|
|
107
|
+
wallet, or ``to_address`` to receive USDC on Arbitrum at an outside
|
|
108
|
+
address directly (Hyperliquid's $1 fee deducted). One is required.
|
|
109
|
+
"""
|
|
110
|
+
|
|
104
111
|
amount_usd: float
|
|
105
|
-
destination_chain_id: int
|
|
112
|
+
destination_chain_id: int | None = None
|
|
106
113
|
destination_token: str | None = None
|
|
114
|
+
to_address: str | None = None
|
|
107
115
|
|
|
108
116
|
def to_dict(self) -> dict:
|
|
109
|
-
d: dict = {
|
|
110
|
-
|
|
111
|
-
"destination_chain_id"
|
|
112
|
-
}
|
|
117
|
+
d: dict = {"amount_usd": self.amount_usd}
|
|
118
|
+
if self.destination_chain_id is not None:
|
|
119
|
+
d["destination_chain_id"] = self.destination_chain_id
|
|
113
120
|
if self.destination_token is not None:
|
|
114
121
|
d["destination_token"] = self.destination_token
|
|
122
|
+
if self.to_address is not None:
|
|
123
|
+
d["to_address"] = self.to_address
|
|
115
124
|
return d
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|