xync-client 0.0.135__tar.gz → 0.0.137__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.135/xync_client.egg-info → xync_client-0.0.137}/PKG-INFO +1 -1
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Bybit/InAgent.py +18 -15
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Bybit/agent.py +6 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/details.py +21 -4
- {xync_client-0.0.135 → xync_client-0.0.137/xync_client.egg-info}/PKG-INFO +1 -1
- {xync_client-0.0.135 → xync_client-0.0.137}/.env.sample +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/.gitignore +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/.pre-commit-config.yaml +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/README.md +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/__init__.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/makefile +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/pyproject.toml +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/setup.cfg +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/tests/TestAgent.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/tests/TestAsset.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/tests/TestEx.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/tests/TestOrder.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/tests/_todo_refact/Binance/test_binance.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/tests/_todo_refact/Bybit/test_bybit.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/tests/_todo_refact/Bybit/test_bybit_p2p.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/tests/_todo_refact/Gate/test_gate.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/tests/_todo_refact/Wallet/test_agent.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/tests/_todo_refact/Wallet/test_ex.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/tests/_todo_refact/__init__.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/tests/_todo_refact/_test_ex.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Abc/Agent.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Abc/Asset.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Abc/Auth.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Abc/BaseTest.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Abc/Ex.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Abc/Exception.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Abc/InAgent.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Abc/Order.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Abc/PmAgent.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Abc/xtype.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Binance/__init__.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Binance/binance_async.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Binance/earn_api.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Binance/etype/ad.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Binance/etype/pm.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Binance/ex.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Binance/exceptions.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Binance/sapi.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Binance/web_c2c.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/BingX/__init__.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/BingX/agent.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/BingX/base.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/BingX/etype/ad.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/BingX/etype/pm.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/BingX/ex.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/BingX/req.mjs +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/BingX/sign.js +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/BitGet/__init__.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/BitGet/agent.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/BitGet/etype/ad.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/BitGet/ex.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/BitPapa/ex.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Bybit/etype/ad.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Bybit/etype/cred.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Bybit/etype/order.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Bybit/ex.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Bybit/order.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Bybit/web_earn.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Bybit/web_p2p.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Bybit/ws.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Gate/etype/ad.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Gate/ex.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Gate/premarket.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Gmail/__init__.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Htx/agent.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Htx/earn.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Htx/etype/__init__.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Htx/etype/ad.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Htx/etype/cred.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Htx/etype/pm.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Htx/etype/test.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Htx/ex.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/KuCoin/etype/ad.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/KuCoin/etype/pm.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/KuCoin/ex.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/KuCoin/web.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Mexc/etype/ad.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Mexc/etype/pm.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Mexc/ex.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Okx/etype/ad.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Okx/etype/pm.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Okx/ex.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Pms/.gitignore +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Pms/Alfa/__init__.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Pms/Alfa/state.json +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Pms/MTS/__init__.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Pms/Ozon/__init__.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Pms/Payeer/.gitignore +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Pms/Payeer/__init__.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Pms/Payeer/api.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Pms/Payeer/login.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Pms/Sber/__init__.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Pms/Sber/utils.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Pms/Tinkoff/__init__.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Pms/Volet/__init__.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Pms/Volet/_todo_req/req.mjs +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Pms/Volet/_todo_req/req.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Pms/Volet/api.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Pms/Volet/pl.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Pms/Xync/__main__.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Pms/Xync/ed.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/Pms/Yandex/__init__.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/TgWallet/agent.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/TgWallet/asset.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/TgWallet/auth.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/TgWallet/ex.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/TgWallet/inAgent.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/TgWallet/order.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/TgWallet/pyd.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/TgWallet/pyro.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/TgWallet/web.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/__init__.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/loader.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client/pm_unifier.py +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client.egg-info/SOURCES.txt +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client.egg-info/dependency_links.txt +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client.egg-info/requires.txt +0 -0
- {xync_client-0.0.135 → xync_client-0.0.137}/xync_client.egg-info/top_level.txt +0 -0
|
@@ -11,6 +11,7 @@ from decimal import Decimal
|
|
|
11
11
|
from playwright.async_api import async_playwright
|
|
12
12
|
from pydantic import ValidationError
|
|
13
13
|
from pyro_client.client.file import FileClient
|
|
14
|
+
from tortoise.exceptions import IntegrityError
|
|
14
15
|
from tortoise.timezone import now
|
|
15
16
|
from tortoise.transactions import in_transaction
|
|
16
17
|
|
|
@@ -116,15 +117,18 @@ class InAgentClient(BaseInAgentClient):
|
|
|
116
117
|
f"Order {order.id} created at {order.createDate}, not paid yet"
|
|
117
118
|
)
|
|
118
119
|
continue
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
120
|
+
try:
|
|
121
|
+
t, is_new = await models.Transfer.update_or_create(
|
|
122
|
+
dict(
|
|
123
|
+
amount=int(float(order.amount) * 100),
|
|
124
|
+
order=order_db,
|
|
125
|
+
),
|
|
126
|
+
pmid=tid,
|
|
127
|
+
)
|
|
128
|
+
except IntegrityError as e:
|
|
129
|
+
logging.error(tid)
|
|
130
|
+
logging.error(order)
|
|
131
|
+
logging.exception(e)
|
|
128
132
|
|
|
129
133
|
if not is_new: # если по этому платежу уже отпущен другая продажа
|
|
130
134
|
continue
|
|
@@ -137,6 +141,8 @@ class InAgentClient(BaseInAgentClient):
|
|
|
137
141
|
if (
|
|
138
142
|
o["amount"] == order.amount
|
|
139
143
|
and o["id"] != upd.id
|
|
144
|
+
and o.paymentTermList[0].accountNo
|
|
145
|
+
== order.paymentTermList[0].accountNo
|
|
140
146
|
and int(order.createDate) < int(o["createDate"]) + 3600 * 000
|
|
141
147
|
)
|
|
142
148
|
]
|
|
@@ -145,6 +151,7 @@ class InAgentClient(BaseInAgentClient):
|
|
|
145
151
|
)
|
|
146
152
|
pos_db = await models.Order.filter(
|
|
147
153
|
exid__not=order.id,
|
|
154
|
+
cred_id=order_db.cred_id,
|
|
148
155
|
amount=int(float(order.amount) * 10**curex.scale),
|
|
149
156
|
status__not_in=[OrderStatus.completed, OrderStatus.canceled],
|
|
150
157
|
created_at__gt=now() - timedelta(hours=1),
|
|
@@ -278,7 +285,7 @@ class InAgentClient(BaseInAgentClient):
|
|
|
278
285
|
|
|
279
286
|
async def money_upd(self, order_db: models.Order):
|
|
280
287
|
# обновляем остаток монеты
|
|
281
|
-
await order_db.fetch_related("ad__pair_side__pair", "cred")
|
|
288
|
+
await order_db.fetch_related("ad__pair_side__pair", "cred", "transfer")
|
|
282
289
|
ass = await models.Asset.get(
|
|
283
290
|
addr__coin_id=order_db.ad.pair_side.pair.coin_id, addr__actor=self.agent_client.actor
|
|
284
291
|
)
|
|
@@ -341,11 +348,7 @@ class InAgentClient(BaseInAgentClient):
|
|
|
341
348
|
# отправляем деньги
|
|
342
349
|
tid, img, rest_amount = await pma.send(dest=dest, amount=fmt_am, cur=cur)
|
|
343
350
|
# создаем перевод в бд
|
|
344
|
-
t, _ = await models.Transfer.update_or_create(
|
|
345
|
-
{"amount": order_db.amount},
|
|
346
|
-
order=order_db,
|
|
347
|
-
pmid=tid,
|
|
348
|
-
)
|
|
351
|
+
t, _ = await models.Transfer.update_or_create({"order": order_db, "amount": order_db.amount}, pmid=tid)
|
|
349
352
|
await self.send_receipt(str(order_db.exid), tid) # отправляем продавцу чек
|
|
350
353
|
logging.info(f"Order {order_db.exid} PAID at {datetime.now()}: {fmt_am}!")
|
|
351
354
|
|
|
@@ -393,6 +393,12 @@ class AgentClient(BaseAgentClient): # Bybit client
|
|
|
393
393
|
},
|
|
394
394
|
)
|
|
395
395
|
|
|
396
|
+
def my_reviews(self):
|
|
397
|
+
return self._post(
|
|
398
|
+
"/x-api/fiat/otc/order/appraiseList",
|
|
399
|
+
{"makerUserId": self.actor.exid, "page": "1", "size": "10", "appraiseType": "1"}, # "0" - bad
|
|
400
|
+
)
|
|
401
|
+
|
|
396
402
|
async def get_orders_active(
|
|
397
403
|
self, side: int = None, status: int = None, begin_time: int = None, end_time: int = None, token_id: str = None
|
|
398
404
|
):
|
|
@@ -5,10 +5,26 @@ from xync_schema import models
|
|
|
5
5
|
import re
|
|
6
6
|
from typing import List, Dict
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
details = ["дай(те)?", "номер", "рек(и|визиты)", "карту", "банк(и|а)?", "куда", "(на )?как(ой|ую)", "актуал"]
|
|
9
9
|
|
|
10
|
+
begging = ["вз (лайк|отзыв)", "взаим(о|ный)?", "отзыву?", "like", "лайкни"]
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
greetings = [
|
|
13
|
+
"привет(ствую|ик)?",
|
|
14
|
+
"здаровa?",
|
|
15
|
+
"здоров(а|енько)",
|
|
16
|
+
"здравствуй(те)?",
|
|
17
|
+
"Добрый ?(день|вечер)?",
|
|
18
|
+
"h(i|ello)",
|
|
19
|
+
"сал(ют|лам)",
|
|
20
|
+
"ку",
|
|
21
|
+
"йо",
|
|
22
|
+
"хай",
|
|
23
|
+
"добро пожаловать",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
async def search_messages(phrases_to_find) -> List[Dict[str, str]]:
|
|
12
28
|
_ = await init_db(TORM, True)
|
|
13
29
|
msgs = await models.Msg.all().values("txt")
|
|
14
30
|
patterns = [re.compile(rf"\b{phrase}\b", re.IGNORECASE) for phrase in phrases_to_find]
|
|
@@ -19,9 +35,10 @@ async def request_for_details(phrases_to_find) -> List[Dict[str, str]]:
|
|
|
19
35
|
for pattern in patterns:
|
|
20
36
|
if pattern.search(msg["txt"]):
|
|
21
37
|
results.append({pattern.pattern: msg["txt"]})
|
|
22
|
-
|
|
38
|
+
for i in results:
|
|
39
|
+
print(i)
|
|
23
40
|
return results
|
|
24
41
|
|
|
25
42
|
|
|
26
43
|
if __name__ == "__main__":
|
|
27
|
-
asyncio.run(
|
|
44
|
+
asyncio.run(search_messages(greetings))
|
|
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
|
|
File without changes
|