xync-client 0.0.134__py3-none-any.whl → 0.0.135__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 xync-client might be problematic. Click here for more details.

@@ -1,7 +1,7 @@
1
1
  import json
2
2
  import logging
3
3
  import re
4
- from datetime import datetime, timezone
4
+ from datetime import datetime, timezone, timedelta
5
5
  from uuid import uuid4
6
6
 
7
7
  import websockets
@@ -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.timezone import now
14
15
  from tortoise.transactions import in_transaction
15
16
 
16
17
  from xync_client.Abc.PmAgent import PmAgentClient
@@ -130,7 +131,7 @@ class InAgentClient(BaseInAgentClient):
130
131
 
131
132
  # если висят незавершенные продажи с такой же суммой
132
133
  pos = (await self.agent_client.get_orders_active(1))["result"]
133
- if [
134
+ pos = [
134
135
  o
135
136
  for o in pos.get("items", [])
136
137
  if (
@@ -138,7 +139,17 @@ class InAgentClient(BaseInAgentClient):
138
139
  and o["id"] != upd.id
139
140
  and int(order.createDate) < int(o["createDate"]) + 3600 * 000
140
141
  )
141
- ]:
142
+ ]
143
+ curex = await models.CurEx.get(
144
+ cur__ticker=order.currencyId, ex=self.agent_client.ex_client.ex
145
+ )
146
+ pos_db = await models.Order.filter(
147
+ exid__not=order.id,
148
+ amount=int(float(order.amount) * 10**curex.scale),
149
+ status__not_in=[OrderStatus.completed, OrderStatus.canceled],
150
+ created_at__gt=now() - timedelta(hours=1),
151
+ )
152
+ if pos or pos_db:
142
153
  await self.agent_client.ex_client.bot.send(
143
154
  f"[Duplicate amount!]"
144
155
  f"(https://www.bybit.com/ru-RU/p2p/orderList/{order.id})",
@@ -335,7 +335,7 @@ class Receive(_BaseMsg):
335
335
 
336
336
  class Read(_BaseMsg):
337
337
  readAmount: int
338
- read: Literal["101", "110", "111"]
338
+ read: Literal["101", "110", "11", "111"]
339
339
  orderStatus: StatusApi
340
340
 
341
341
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xync-client
3
- Version: 0.0.134
3
+ Version: 0.0.135
4
4
  Author-email: Mike Artemiev <mixartemev@gmail.com>
5
5
  Project-URL: Homepage, https://gitlab.com/XyncNet/client
6
6
  Project-URL: Repository, https://gitlab.com/XyncNet/client
@@ -34,7 +34,7 @@ xync_client/BitGet/agent.py,sha256=YVs3bDY0OcEJGU7m2A8chzO6PFhWDnQQrA-E6MVkBBg,3
34
34
  xync_client/BitGet/ex.py,sha256=nAexKRkguIhq4fYP1tkIaou6oBFjjV2xwlajlJ-9DAE,3757
35
35
  xync_client/BitGet/etype/ad.py,sha256=fysSW47wGYjSOPUqY864z857AJz4gjN-nOkI1Jxd27U,1838
36
36
  xync_client/BitPapa/ex.py,sha256=U-RRB_RSOtErfRgxOZYWegZ_td_uZO37YKo3Jxchf_w,912
37
- xync_client/Bybit/InAgent.py,sha256=v1HbpbZv2U2DQCRwXEyxAAxA0nePVtljnAF_0_O2mWE,23960
37
+ xync_client/Bybit/InAgent.py,sha256=sbJSgqtVTuATUsEx_4vK4Du62LvodDNS8kGrLJUZBBs,24837
38
38
  xync_client/Bybit/agent.py,sha256=5nAKd3yiIq1NJ6gI8CDacrk0CIeaWCxu0oWu5Lbx4nM,57384
39
39
  xync_client/Bybit/ex.py,sha256=DgPOmnjphcSCSsO4ZQjnIlWICNzdtKhNIpVsU93s99k,4707
40
40
  xync_client/Bybit/order.py,sha256=H4UIb8hxFGnw1hZuSbr0yZ4qeaCOIZOMc6jEst0ycBs,1713
@@ -43,7 +43,7 @@ xync_client/Bybit/web_p2p.py,sha256=sAXzK03t6jwDnz4rrvP2IzI0KxfKa7C_5GuzH1HwLuA,
43
43
  xync_client/Bybit/ws.py,sha256=OQjZHo_MiAH1dlOs3c-aUZBKyqToNTmH560udh6RYDE,1431
44
44
  xync_client/Bybit/etype/ad.py,sha256=HJOHi9KrbLQMpwEyd4oA8436QTNRqrd2HWFF-JNZGDo,8066
45
45
  xync_client/Bybit/etype/cred.py,sha256=dgFExLB4e5Wf6SqfU9SOdeooHQa84DRbTGm_OJhNw_o,1354
46
- xync_client/Bybit/etype/order.py,sha256=c71gfdZDJ0gSoDYLLWv2pEYwap5aV4rjjFnnA0F9lcA,8267
46
+ xync_client/Bybit/etype/order.py,sha256=rPXw9eHJW3afVPQDRiooUkHfQhmqJ5fTdZ4vKdO6uHQ,8273
47
47
  xync_client/Gate/ex.py,sha256=1vSXctCOyZfYDojkHU6u4YSXwYTLg-e7BfAdGKvZ_UM,3727
48
48
  xync_client/Gate/premarket.py,sha256=IW-CgkmNJePJR2j_NRfULNKTePMX35XlhldqdiO76zY,2138
49
49
  xync_client/Gate/etype/ad.py,sha256=-EwtFcOWWvtE6UjaOdsuXWDTCVjAIRK0kSEsqPP4Yls,1296
@@ -95,7 +95,7 @@ xync_client/TgWallet/order.py,sha256=BOmBx5WWfJv0-_-A8DcR-Xd8utqO_VTmSqSegm0cteQ
95
95
  xync_client/TgWallet/pyd.py,sha256=Ys3E8b3RLuyQ26frWT0F0BorkNxVpxnd18tY4Gp9dik,5636
96
96
  xync_client/TgWallet/pyro.py,sha256=2K7QWdo48k4MbbgQt90gdz_HiPck69Njm4xaMjIVgoo,1440
97
97
  xync_client/TgWallet/web.py,sha256=kDcv9SKKQPe91mw1qJBpbuyKYCAmZdfdHJylHumLBVU,1608
98
- xync_client-0.0.134.dist-info/METADATA,sha256=Sm8MPNOELx828d8yU1KeGQ8bm4kPqPMh6tXRffEIARQ,1037
99
- xync_client-0.0.134.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
100
- xync_client-0.0.134.dist-info/top_level.txt,sha256=bmYEVIIrD3v7yFwH-X15pEfRvzhuAdfsAZ2igvNI4O8,12
101
- xync_client-0.0.134.dist-info/RECORD,,
98
+ xync_client-0.0.135.dist-info/METADATA,sha256=JXBmzFXZmopOYvy9hpXKuIfFTo-jOXrx-_ZquCH36nU,1037
99
+ xync_client-0.0.135.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
100
+ xync_client-0.0.135.dist-info/top_level.txt,sha256=bmYEVIIrD3v7yFwH-X15pEfRvzhuAdfsAZ2igvNI4O8,12
101
+ xync_client-0.0.135.dist-info/RECORD,,