xync-client 0.0.127__tar.gz → 0.0.128__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.
Potentially problematic release.
This version of xync-client might be problematic. Click here for more details.
- {xync_client-0.0.127/xync_client.egg-info → xync_client-0.0.128}/PKG-INFO +1 -1
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Bybit/InAgent.py +12 -2
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Bybit/agent.py +5 -3
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Bybit/etype/order.py +1 -1
- {xync_client-0.0.127 → xync_client-0.0.128/xync_client.egg-info}/PKG-INFO +1 -1
- {xync_client-0.0.127 → xync_client-0.0.128}/.env.sample +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/.gitignore +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/.pre-commit-config.yaml +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/README.md +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/__init__.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/makefile +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/pyproject.toml +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/setup.cfg +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/tests/TestAgent.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/tests/TestAsset.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/tests/TestEx.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/tests/TestOrder.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/tests/_todo_refact/Binance/test_binance.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/tests/_todo_refact/Bybit/test_bybit.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/tests/_todo_refact/Bybit/test_bybit_p2p.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/tests/_todo_refact/Gate/test_gate.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/tests/_todo_refact/Wallet/test_agent.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/tests/_todo_refact/Wallet/test_ex.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/tests/_todo_refact/__init__.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/tests/_todo_refact/_test_ex.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Abc/Agent.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Abc/Asset.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Abc/Auth.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Abc/BaseTest.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Abc/Ex.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Abc/Exception.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Abc/InAgent.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Abc/Order.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Abc/PmAgent.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Abc/xtype.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Binance/__init__.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Binance/binance_async.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Binance/earn_api.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Binance/etype/ad.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Binance/etype/pm.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Binance/ex.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Binance/exceptions.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Binance/sapi.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Binance/web_c2c.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/BingX/__init__.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/BingX/agent.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/BingX/base.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/BingX/etype/ad.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/BingX/etype/pm.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/BingX/ex.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/BingX/req.mjs +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/BingX/sign.js +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/BitGet/__init__.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/BitGet/agent.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/BitGet/etype/ad.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/BitGet/ex.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/BitPapa/ex.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Bybit/etype/ad.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Bybit/etype/cred.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Bybit/ex.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Bybit/order.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Bybit/web_earn.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Bybit/web_p2p.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Bybit/ws.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Gate/etype/ad.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Gate/ex.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Gate/premarket.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Gmail/__init__.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Htx/agent.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Htx/earn.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Htx/etype/__init__.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Htx/etype/ad.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Htx/etype/cred.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Htx/etype/pm.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Htx/etype/test.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Htx/ex.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/KuCoin/etype/ad.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/KuCoin/etype/pm.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/KuCoin/ex.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/KuCoin/web.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Mexc/etype/ad.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Mexc/etype/pm.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Mexc/ex.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Okx/etype/ad.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Okx/etype/pm.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Okx/ex.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Pms/.gitignore +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Pms/Alfa/__init__.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Pms/Alfa/state.json +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Pms/MTS/__init__.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Pms/Ozon/__init__.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Pms/Payeer/.gitignore +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Pms/Payeer/__init__.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Pms/Payeer/api.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Pms/Payeer/login.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Pms/Sber/__init__.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Pms/Sber/utils.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Pms/Tinkoff/__init__.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Pms/Volet/__init__.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Pms/Volet/_todo_req/req.mjs +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Pms/Volet/_todo_req/req.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Pms/Volet/api.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Pms/Volet/pl.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Pms/Xync/__main__.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Pms/Xync/ed.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/Pms/Yandex/__init__.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/TgWallet/agent.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/TgWallet/asset.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/TgWallet/auth.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/TgWallet/ex.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/TgWallet/inAgent.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/TgWallet/order.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/TgWallet/pyd.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/TgWallet/pyro.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/TgWallet/web.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/__init__.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/loader.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client/pm_unifier.py +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client.egg-info/SOURCES.txt +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client.egg-info/dependency_links.txt +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client.egg-info/requires.txt +0 -0
- {xync_client-0.0.127 → xync_client-0.0.128}/xync_client.egg-info/top_level.txt +0 -0
|
@@ -9,6 +9,7 @@ from asyncio import run
|
|
|
9
9
|
from decimal import Decimal
|
|
10
10
|
|
|
11
11
|
from playwright.async_api import async_playwright
|
|
12
|
+
from pydantic import ValidationError
|
|
12
13
|
from pyro_client.client.file import FileClient
|
|
13
14
|
from tortoise.transactions import in_transaction
|
|
14
15
|
|
|
@@ -78,7 +79,10 @@ class InAgentClient(BaseInAgentClient):
|
|
|
78
79
|
case "OTC_ORDER_STATUS":
|
|
79
80
|
match data["type"]:
|
|
80
81
|
case "STATUS_CHANGE":
|
|
81
|
-
|
|
82
|
+
try:
|
|
83
|
+
upd = StatusChange.model_validate(data["data"])
|
|
84
|
+
except ValidationError as e:
|
|
85
|
+
logging.error(e)
|
|
82
86
|
order = self.agent_client.api.get_order_details(orderId=upd.id)
|
|
83
87
|
order = OrderFull.model_validate(order["result"])
|
|
84
88
|
order_db = await models.Order.get_or_none(
|
|
@@ -119,7 +123,13 @@ class InAgentClient(BaseInAgentClient):
|
|
|
119
123
|
# pm_id=order_db.cred.pmcur.pm_id,
|
|
120
124
|
pmid=tid,
|
|
121
125
|
)
|
|
122
|
-
|
|
126
|
+
|
|
127
|
+
if not is_new: # если по этому платежу уже отпущен другая продажа
|
|
128
|
+
continue
|
|
129
|
+
|
|
130
|
+
# если висят незавершенные продажи с такой же суммой
|
|
131
|
+
pos = await self.agent_client.get_orders_active(1)
|
|
132
|
+
if [o for o in pos["result"]["items"] if o["amount"] == order.amount]:
|
|
123
133
|
continue
|
|
124
134
|
|
|
125
135
|
# !!! ОТПРАВЛЯЕМ ДЕНЬГИ !!!
|
|
@@ -393,8 +393,10 @@ class AgentClient(BaseAgentClient): # Bybit client
|
|
|
393
393
|
},
|
|
394
394
|
)
|
|
395
395
|
|
|
396
|
-
def get_orders_active(
|
|
397
|
-
|
|
396
|
+
async def get_orders_active(
|
|
397
|
+
self, side: int = None, status: int = None, begin_time: int = None, end_time: int = None, token_id: str = None
|
|
398
|
+
):
|
|
399
|
+
return await self._post(
|
|
398
400
|
"/fiat/otc/order/pending/simplifyList",
|
|
399
401
|
{
|
|
400
402
|
"status": status,
|
|
@@ -758,7 +760,7 @@ class AgentClient(BaseAgentClient): # Bybit client
|
|
|
758
760
|
req.quantity = str(
|
|
759
761
|
round(
|
|
760
762
|
asset.free * 10**-coinex.scale,
|
|
761
|
-
coinex.
|
|
763
|
+
coinex.scale or coinex.coin.scale,
|
|
762
764
|
)
|
|
763
765
|
)
|
|
764
766
|
_res = self.ad_upd(req)
|
|
@@ -297,11 +297,11 @@ class _BaseChange(BaseModel):
|
|
|
297
297
|
userId: int
|
|
298
298
|
makerUserId: int
|
|
299
299
|
id: str
|
|
300
|
-
status: StatusApi
|
|
301
300
|
createDate: int
|
|
302
301
|
side: int
|
|
303
302
|
appealedTimes: int
|
|
304
303
|
totalAppealedTimes: int
|
|
304
|
+
status: StatusApi = None
|
|
305
305
|
|
|
306
306
|
|
|
307
307
|
class StatusChange(_BaseChange):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|