xync-client 0.0.99.dev9__py3-none-any.whl → 0.0.100__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.
- xync_client/Bybit/InAgent.py +4 -3
- xync_client/Bybit/agent.py +75 -48
- xync_client/Pms/Payeer/__init__.py +11 -5
- xync_client/Pms/Payeer/login.py +3 -0
- {xync_client-0.0.99.dev9.dist-info → xync_client-0.0.100.dist-info}/METADATA +1 -1
- {xync_client-0.0.99.dev9.dist-info → xync_client-0.0.100.dist-info}/RECORD +8 -8
- {xync_client-0.0.99.dev9.dist-info → xync_client-0.0.100.dist-info}/WHEEL +0 -0
- {xync_client-0.0.99.dev9.dist-info → xync_client-0.0.100.dist-info}/top_level.txt +0 -0
xync_client/Bybit/InAgent.py
CHANGED
|
@@ -247,7 +247,7 @@ class InAgentClient(BaseInAgentClient):
|
|
|
247
247
|
async def send_payment(self, order_db: models.Order, dest):
|
|
248
248
|
if order_db.status not in (OrderStatus.created, OrderStatus.requested):
|
|
249
249
|
return
|
|
250
|
-
int_am =
|
|
250
|
+
int_am = round(order_db.amount * 10**-2, 2)
|
|
251
251
|
pma, cur = await self.get_pma_by_pmex(order_db)
|
|
252
252
|
async with in_transaction():
|
|
253
253
|
# отмечаем ордер на бирже "оплачен"
|
|
@@ -298,7 +298,8 @@ class InAgentClient(BaseInAgentClient):
|
|
|
298
298
|
).prefetch_related("cred__pmcur__cur")
|
|
299
299
|
pmas = [pma for cdx in cdxs if (pma := self.pmacs.get(cdx.cred.pmcur.pm_id))]
|
|
300
300
|
if not len(pmas):
|
|
301
|
-
raise
|
|
301
|
+
# raise ValueError(order.paymentTermList, f"No pm_agents for {order.paymentTermList[0].paymentType}")
|
|
302
|
+
return None
|
|
302
303
|
elif len(pmas) > 1:
|
|
303
304
|
logging.error(order.paymentTermList, f">1 pm_agents for {cdxs[0].cred.pmcur.pm_id}")
|
|
304
305
|
else:
|
|
@@ -325,7 +326,7 @@ async def main():
|
|
|
325
326
|
|
|
326
327
|
actor = (
|
|
327
328
|
await models.Actor.filter(
|
|
328
|
-
ex_id=
|
|
329
|
+
ex_id=4,
|
|
329
330
|
agent__auth__isnull=False,
|
|
330
331
|
person__user__status=UserStatus.ACTIVE,
|
|
331
332
|
person__user__pm_agents__isnull=False,
|
xync_client/Bybit/agent.py
CHANGED
|
@@ -4,7 +4,6 @@ import re
|
|
|
4
4
|
from asyncio import sleep, gather
|
|
5
5
|
from collections import defaultdict
|
|
6
6
|
from datetime import datetime, timedelta, timezone
|
|
7
|
-
from decimal import Decimal
|
|
8
7
|
from difflib import SequenceMatcher
|
|
9
8
|
from enum import IntEnum
|
|
10
9
|
from http.client import HTTPException
|
|
@@ -441,6 +440,8 @@ class AgentClient(BaseAgentClient): # Bybit client
|
|
|
441
440
|
if not ad_db:
|
|
442
441
|
...
|
|
443
442
|
ecredex: CredEpyd = order.confirmedPayTerm
|
|
443
|
+
if ecredex.paymentType == 0 and im_maker and order.side:
|
|
444
|
+
ecredex = order.paymentTermList[0]
|
|
444
445
|
if ecredex.paymentType:
|
|
445
446
|
if not (credex := await models.CredEx.get_or_none(exid=ecredex.id, ex=self.ex_client.ex)):
|
|
446
447
|
# cur_id = await Cur.get(ticker=ad.currencyId).values_list('id', flat=True)
|
|
@@ -540,7 +541,7 @@ class AgentClient(BaseAgentClient): # Bybit client
|
|
|
540
541
|
dmsgs = self.api.get_chat_messages(orderId=oid, size=200)["result"]["result"][::-1]
|
|
541
542
|
msgs = [Message.model_validate(m) for m in dmsgs if m["msgType"] in (1, 2, 7, 8)]
|
|
542
543
|
if order_db.ad.auto_msg:
|
|
543
|
-
msgs.pop(0)
|
|
544
|
+
msgs and msgs.pop(0)
|
|
544
545
|
msgs_db = [
|
|
545
546
|
models.Msg(
|
|
546
547
|
order=order_db,
|
|
@@ -579,14 +580,14 @@ class AgentClient(BaseAgentClient): # Bybit client
|
|
|
579
580
|
print("-" if mad.side else "+", end=req.price, flush=True)
|
|
580
581
|
await sleep(60)
|
|
581
582
|
|
|
582
|
-
def overprice_filter(self, ads: list[Ad], ceil:
|
|
583
|
+
def overprice_filter(self, ads: list[Ad], ceil: float, k: Literal[-1, 1]):
|
|
583
584
|
# вырезаем ads с ценами выше потолка
|
|
584
|
-
if ads and (ceil -
|
|
585
|
+
if ads and (ceil - float(ads[0].price)) * k > 0:
|
|
585
586
|
if int(ads[0].userId) != self.actor.exid:
|
|
586
587
|
ads.pop(0)
|
|
587
588
|
self.overprice_filter(ads, ceil, k)
|
|
588
589
|
|
|
589
|
-
def get_cad(self, ads: list[Ad], ceil:
|
|
590
|
+
def get_cad(self, ads: list[Ad], ceil: float, k: Literal[-1, 1], target_place: int, cur_plc: int) -> Ad:
|
|
590
591
|
if not ads:
|
|
591
592
|
return None
|
|
592
593
|
# чью цену будем обгонять, предыдущей или слещующей объявы?
|
|
@@ -596,7 +597,7 @@ class AgentClient(BaseAgentClient): # Bybit client
|
|
|
596
597
|
logging.error(f"target place {target_place} not found in ads list {ads}")
|
|
597
598
|
cad: Ad = ads[target_place]
|
|
598
599
|
# а цена обгоняемой объявы не выше нашего потолка?
|
|
599
|
-
if (
|
|
600
|
+
if (float(cad.price) - ceil) * k <= 0:
|
|
600
601
|
# тогда берем следующую
|
|
601
602
|
ads.pop(target_place)
|
|
602
603
|
cad = self.get_cad(ads, ceil, k, target_place, cur_plc)
|
|
@@ -628,7 +629,7 @@ class AgentClient(BaseAgentClient): # Bybit client
|
|
|
628
629
|
k = (-1) ** int(taker_side) # on_buy=1, on_sell=-1
|
|
629
630
|
sleep_sec = 3 # 1 if set(pms) & {"volet"} and coinex.coin_id == 1 else 5
|
|
630
631
|
creds: list[models.CredEx] = await self.get_credexs_by_pms(race.road.ad.pms, curex.cur_id)
|
|
631
|
-
|
|
632
|
+
_lstat, volume = None, 0
|
|
632
633
|
|
|
633
634
|
while self.actor.person.user.status > 0:
|
|
634
635
|
# обновляем все обновления по текущей гонке из бд
|
|
@@ -640,7 +641,7 @@ class AgentClient(BaseAgentClient): # Bybit client
|
|
|
640
641
|
expiration = datetime.now(timezone.utc) - timedelta(minutes=15)
|
|
641
642
|
if race.updated_at < expiration:
|
|
642
643
|
ceils, hp, vmf, zplace = await self.get_ceils(coinex, curex, pmexs, 0.001, True)
|
|
643
|
-
race.ceil = ceils[int(taker_side)]
|
|
644
|
+
race.ceil = ceils[int(taker_side)] * 10**curex.scale
|
|
644
645
|
await race.save()
|
|
645
646
|
# upd pair race
|
|
646
647
|
if prace := await models.Race.annotate(pms_count=Count("road__ad__pms")).get_or_none(
|
|
@@ -651,7 +652,7 @@ class AgentClient(BaseAgentClient): # Bybit client
|
|
|
651
652
|
road__ad__pms__id__in=pm_ids,
|
|
652
653
|
pms_count=len(pm_ids),
|
|
653
654
|
):
|
|
654
|
-
prace.ceil = ceils[int(not taker_side)]
|
|
655
|
+
prace.ceil = ceils[int(not taker_side)] * 10**curex.scale
|
|
655
656
|
await prace.save()
|
|
656
657
|
|
|
657
658
|
last_vol = volume
|
|
@@ -660,13 +661,13 @@ class AgentClient(BaseAgentClient): # Bybit client
|
|
|
660
661
|
volume = fiat.amount / race.road.ad.price
|
|
661
662
|
else: # гонка в стакане покупки - мы продаем МОНЕТУ за фиат
|
|
662
663
|
asset = await models.Asset.get(addr__actor=self.actor, addr__coin_id=coinex.coin_id)
|
|
663
|
-
volume = asset.free - (asset.freeze or 0) - (asset.lock or 0)
|
|
664
|
+
volume = (asset.free - (asset.freeze or 0) - (asset.lock or 0)) * 10**-coinex.scale
|
|
664
665
|
volume = str(round(volume, coinex.scale))
|
|
665
666
|
|
|
666
667
|
ads: list[Ad] = await self.ads(coinex, curex, taker_side, pmexs)
|
|
667
668
|
if race.vm_filter:
|
|
668
669
|
ads = [ad for ad in ads if "VA" in ad.authTag]
|
|
669
|
-
self.overprice_filter(ads, race.ceil, k) # обрезаем сверху все ads дороже нашего потолка
|
|
670
|
+
self.overprice_filter(ads, race.ceil * 10**-curex.scale, k) # обрезаем сверху все ads дороже нашего потолка
|
|
670
671
|
|
|
671
672
|
if 571 in pm_ids and coinex.coin.ticker == "USDT" and not taker_side:
|
|
672
673
|
...
|
|
@@ -681,53 +682,61 @@ class AgentClient(BaseAgentClient): # Bybit client
|
|
|
681
682
|
await sleep(15)
|
|
682
683
|
continue
|
|
683
684
|
(cur_plc,) = cur_plc # может упасть если в списке > 1 наш ad
|
|
684
|
-
|
|
685
|
-
rivals = [
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
]
|
|
685
|
+
[(await self.cond_upsert(ad, ps=race.road.ad.pair_side, force=True))[0] for ad in ads[:cur_plc]]
|
|
686
|
+
# rivals = [
|
|
687
|
+
# (await models.RaceStat.update_or_create({"place": plc, "price": ad.price, "premium": ad.premium}, ad=ad))[
|
|
688
|
+
# 0
|
|
689
|
+
# ]
|
|
690
|
+
# for plc, ad in enumerate(rads)
|
|
691
|
+
# ]
|
|
691
692
|
mad: Ad = ads.pop(cur_plc)
|
|
692
|
-
if (
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
):
|
|
698
|
-
|
|
699
|
-
|
|
693
|
+
# if (
|
|
694
|
+
# not (lstat := lstat or await race.stats.order_by("-created_at").first())
|
|
695
|
+
# or lstat.place != cur_plc
|
|
696
|
+
# or lstat.price != float(mad.price)
|
|
697
|
+
# or set(rivals) != set(await lstat.rivals)
|
|
698
|
+
# ):
|
|
699
|
+
# lstat = await models.RaceStat.create(race=race, place=cur_plc, price=mad.price, premium=mad.premium)
|
|
700
|
+
# await lstat.rivals.add(*rivals)
|
|
700
701
|
if not ads:
|
|
701
702
|
await sleep(60)
|
|
702
703
|
continue
|
|
703
|
-
if not (cad := self.get_cad(ads, race.ceil, k, race.target_place, cur_plc)):
|
|
704
|
+
if not (cad := self.get_cad(ads, race.ceil * 10**-curex.scale, k, race.target_place, cur_plc)):
|
|
704
705
|
continue
|
|
705
|
-
new_price =
|
|
706
|
+
new_price = round(float(cad.price) - k * step(mad, cad, curex.cur.scale), curex.cur.scale)
|
|
706
707
|
if (
|
|
707
|
-
|
|
708
|
+
float(mad.price) == new_price and volume == last_vol
|
|
708
709
|
): # Если место уже нужное или нужная цена и так уже стоит
|
|
709
|
-
print(
|
|
710
|
+
print(
|
|
711
|
+
f"{'v' if taker_side else '^'}{mad.price}",
|
|
712
|
+
end=f"[{race.ceil * 10**-curex.scale}+{cur_plc}] ",
|
|
713
|
+
flush=True,
|
|
714
|
+
)
|
|
710
715
|
await sleep(sleep_sec)
|
|
711
716
|
continue
|
|
712
717
|
if cad.priceType: # Если цена конкурента плавающая, то повышаем себе не цену, а %
|
|
713
|
-
new_premium =
|
|
714
|
-
if
|
|
718
|
+
new_premium = float(cad.premium) - k * step(mad, cad, 2)
|
|
719
|
+
if float(mad.premium) == new_premium: # Если нужный % и так уже стоит
|
|
715
720
|
if mad.priceType and cur_plc != race.target_place:
|
|
716
721
|
new_premium -= k * step(mad, cad, 2)
|
|
717
722
|
elif volume == last_vol:
|
|
718
723
|
print(end="v" if taker_side else "^", flush=True)
|
|
719
724
|
await sleep(sleep_sec)
|
|
720
725
|
continue
|
|
721
|
-
mad.premium = new_premium
|
|
726
|
+
mad.premium = str(round(new_premium, 2))
|
|
722
727
|
mad.priceType = cad.priceType
|
|
723
728
|
mad.quantity = volume
|
|
724
729
|
mad.maxAmount = str(2_000_000)
|
|
725
730
|
req = AdUpdateRequest.model_validate(
|
|
726
|
-
{
|
|
731
|
+
{
|
|
732
|
+
**mad.model_dump(),
|
|
733
|
+
"price": str(round(new_price, curex.scale)),
|
|
734
|
+
"paymentIds": [str(p.exid) for p in creds],
|
|
735
|
+
}
|
|
727
736
|
)
|
|
728
737
|
try:
|
|
729
738
|
print(
|
|
730
|
-
f"c{race.ceil}+{cur_plc} {coinex.coin.ticker}{'-' if taker_side else '+'}{req.price}{curex.cur.ticker}"
|
|
739
|
+
f"c{race.ceil * 10**-curex.scale}+{cur_plc} {coinex.coin.ticker}{'-' if taker_side else '+'}{req.price}{curex.cur.ticker}"
|
|
731
740
|
f"{[pm.norm for pm in race.road.ad.pms]}{f'({req.premium}%)' if req.premium != '0' else ''} "
|
|
732
741
|
f"t{race.target_place} ;",
|
|
733
742
|
flush=True,
|
|
@@ -747,7 +756,10 @@ class AgentClient(BaseAgentClient): # Bybit client
|
|
|
747
756
|
elif ExcCode(e.status_code) == ExcCode.InsufficientBalance:
|
|
748
757
|
asset = await models.Asset.get(addr__actor=self.actor, addr__coin_id=coinex.coin_id)
|
|
749
758
|
req.quantity = str(
|
|
750
|
-
round(
|
|
759
|
+
round(
|
|
760
|
+
(asset.free - (asset.freeze or 0) - (asset.lock or 0)) * 10**-coinex.scale,
|
|
761
|
+
coinex.coin.scale or coinex.scale,
|
|
762
|
+
)
|
|
751
763
|
)
|
|
752
764
|
_res = self.ad_upd(req)
|
|
753
765
|
elif ExcCode(e.status_code) == ExcCode.RareLimit:
|
|
@@ -782,9 +794,11 @@ class AgentClient(BaseAgentClient): # Bybit client
|
|
|
782
794
|
return buy, sell
|
|
783
795
|
|
|
784
796
|
async def get_spread(
|
|
785
|
-
self, bb: list[Ad], sb: list[Ad], perc:
|
|
786
|
-
) -> tuple[tuple[
|
|
787
|
-
|
|
797
|
+
self, bb: list[Ad], sb: list[Ad], perc: float, vmf: bool = None, place: int = 0, exact: bool = False
|
|
798
|
+
) -> tuple[tuple[float, float], float, bool, int]:
|
|
799
|
+
if len(bb) <= place or len(sb) <= place:
|
|
800
|
+
...
|
|
801
|
+
buy_price, sell_price = float(bb[place].price), float(sb[place].price)
|
|
788
802
|
half_spread = (buy_price - sell_price) / (buy_price + sell_price)
|
|
789
803
|
if half_spread * 2 < perc:
|
|
790
804
|
if not exact:
|
|
@@ -800,16 +814,15 @@ class AgentClient(BaseAgentClient): # Bybit client
|
|
|
800
814
|
coinex: models.CoinEx,
|
|
801
815
|
curex: models.CurEx,
|
|
802
816
|
pmexs: list[models.PmEx],
|
|
803
|
-
min_prof=0.
|
|
817
|
+
min_prof=0.02,
|
|
804
818
|
vmf: bool = False,
|
|
805
819
|
place: int = 0,
|
|
806
|
-
) -> tuple[tuple[
|
|
807
|
-
min_prof = Decimal(min_prof)
|
|
820
|
+
) -> tuple[tuple[float, float], float, bool, int]: # todo: refact to Pairex
|
|
808
821
|
bb, sb = await self.get_books(coinex, curex, pmexs)
|
|
809
822
|
if vmf:
|
|
810
823
|
bb = [b for b in bb if "VA" in b.authTag]
|
|
811
824
|
sb = [s for s in sb if "VA" in s.authTag]
|
|
812
|
-
perc = pmexs[0].pm.fee + min_prof
|
|
825
|
+
perc = pmexs[0].pm.fee * 0.0001 + min_prof
|
|
813
826
|
(bf, sf), hp, vmf, zplace = await self.get_spread(bb, sb, perc, vmf, place)
|
|
814
827
|
mdl = (bf + sf) / 2
|
|
815
828
|
bc, sc = mdl + mdl * (perc / 2), mdl - mdl * (perc / 2)
|
|
@@ -995,6 +1008,7 @@ class AgentClient(BaseAgentClient): # Bybit client
|
|
|
995
1008
|
if rname:
|
|
996
1009
|
act_df |= {"person": await self.person_upsert(rname, int(ad.userId))}
|
|
997
1010
|
if not actor:
|
|
1011
|
+
act_df |= {"person": await self.person_upsert(ad.nickName, int(ad.userId))}
|
|
998
1012
|
actor, _ = await Actor.update_or_create(act_df, exid=ad.userId, ex=self.ex_client.ex)
|
|
999
1013
|
ps = ps or await PairSide.get_or_none(
|
|
1000
1014
|
is_sell=ad.side,
|
|
@@ -1005,11 +1019,12 @@ class AgentClient(BaseAgentClient): # Bybit client
|
|
|
1005
1019
|
... # THB/USDC
|
|
1006
1020
|
ad_upd = models.Ad.validate(ad.model_dump(by_alias=True))
|
|
1007
1021
|
cur_scale = 10**ps.pair.cur.scale
|
|
1022
|
+
coinex = await models.CoinEx.get(coin_id=ps.pair.coin_id, ex=self.ex_client.ex)
|
|
1008
1023
|
df_unq = ad_upd.df_unq(
|
|
1009
1024
|
maker_id=actor.id,
|
|
1010
1025
|
pair_side_id=ps.id,
|
|
1011
1026
|
amount=int(float(ad.quantity) * float(ad.price) * cur_scale),
|
|
1012
|
-
quantity=int(float(ad.quantity) * 10**
|
|
1027
|
+
quantity=int(float(ad.quantity) * 10**coinex.scale),
|
|
1013
1028
|
min_fiat=int(float(ad.minAmount) * cur_scale),
|
|
1014
1029
|
max_fiat=ad.maxAmount and int(float(ad.maxAmount) * cur_scale),
|
|
1015
1030
|
price=int(float(ad.price) * cur_scale),
|
|
@@ -1137,8 +1152,8 @@ def step_is_need(mad, cad) -> bool:
|
|
|
1137
1152
|
)
|
|
1138
1153
|
|
|
1139
1154
|
|
|
1140
|
-
def step(mad, cad, scale: int = 2) ->
|
|
1141
|
-
return
|
|
1155
|
+
def step(mad, cad, scale: int = 2) -> float:
|
|
1156
|
+
return float(int(step_is_need(mad, cad)) * 10**-scale).__round__(scale)
|
|
1142
1157
|
|
|
1143
1158
|
|
|
1144
1159
|
class ExcCode(IntEnum):
|
|
@@ -1148,6 +1163,7 @@ class ExcCode(IntEnum):
|
|
|
1148
1163
|
Timestamp = 10002
|
|
1149
1164
|
IP = 10010
|
|
1150
1165
|
Quantity = 912300019
|
|
1166
|
+
Unknown = 912300014
|
|
1151
1167
|
|
|
1152
1168
|
|
|
1153
1169
|
async def main():
|
|
@@ -1178,6 +1194,14 @@ async def main():
|
|
|
1178
1194
|
# await cl.set_creds()
|
|
1179
1195
|
# await cl.export_my_ads()
|
|
1180
1196
|
|
|
1197
|
+
# создание гонок по мои активным объявам:
|
|
1198
|
+
# for ma in cl.my_ads():
|
|
1199
|
+
# my_ad = await models.MyAd.get(ad__exid=ma.id).prefetch_related('ad__pms', 'ad__pair_side__pair')
|
|
1200
|
+
# race, _ = await models.Race.update_or_create(
|
|
1201
|
+
# {"started": True, "vm_filter": True, "target_place": 5},
|
|
1202
|
+
# road=my_ad
|
|
1203
|
+
# )
|
|
1204
|
+
|
|
1181
1205
|
# for name in names:
|
|
1182
1206
|
# s, _ = await models.Synonym.update_or_create(typ=SynonymType.name, txt=name)
|
|
1183
1207
|
# await s.curs.add(rub.cur)
|
|
@@ -1204,9 +1228,12 @@ async def main():
|
|
|
1204
1228
|
if ct := set(cl.tree.keys()) & a:
|
|
1205
1229
|
logging.exception(f"cycle cids: {ct}")
|
|
1206
1230
|
|
|
1207
|
-
await cl.get_api_orders(
|
|
1231
|
+
# await cl.get_api_orders(43, 1741294800000, 1749157199999)
|
|
1208
1232
|
|
|
1209
|
-
races = await models.Race.filter(started=True).prefetch_related(
|
|
1233
|
+
races = await models.Race.filter(started=True).prefetch_related(
|
|
1234
|
+
"road__ad__pair_side__pair__cur",
|
|
1235
|
+
"road__ad__pms",
|
|
1236
|
+
)
|
|
1210
1237
|
tasks = [asyncio.create_task(cl.racing(race), name=f"Rc{race.id}") for race in races]
|
|
1211
1238
|
# await cl.actual_cond()
|
|
1212
1239
|
await gather(
|
|
@@ -72,7 +72,7 @@ class Client(PmAgentClient):
|
|
|
72
72
|
await self.bot.send("Payeer хз", self.uid, photo=await self.page.screenshot())
|
|
73
73
|
raise Exception(dest, amount, cur)
|
|
74
74
|
else:
|
|
75
|
-
have_amount =
|
|
75
|
+
have_amount = float(fiat_accounts[0].strip())
|
|
76
76
|
await self.bot.send(
|
|
77
77
|
f"Payeer no have {amount}, only {have_amount}{cur} to {dest}",
|
|
78
78
|
self.uid,
|
|
@@ -107,7 +107,7 @@ class Client(PmAgentClient):
|
|
|
107
107
|
async def fill_amount(loc: Locator, amount: str):
|
|
108
108
|
await loc.wait_for(state="visible")
|
|
109
109
|
await loc.fill(amount)
|
|
110
|
-
sleep(
|
|
110
|
+
sleep(1)
|
|
111
111
|
if await loc.input_value() != amount or await loc.input_value() != amount:
|
|
112
112
|
logging.warning("Fill amount repeated!")
|
|
113
113
|
await fill_amount(loc, amount)
|
|
@@ -117,9 +117,10 @@ async def fill_amount(loc: Locator, amount: str):
|
|
|
117
117
|
|
|
118
118
|
async def click_send(loc: Locator, count: int = 1):
|
|
119
119
|
if await loc.is_visible():
|
|
120
|
-
|
|
120
|
+
sleep(1)
|
|
121
|
+
await loc.click(delay=90)
|
|
121
122
|
try:
|
|
122
|
-
await loc.wait_for(state="hidden", timeout=
|
|
123
|
+
await loc.wait_for(state="hidden", timeout=2000 * count)
|
|
123
124
|
except TimeoutError:
|
|
124
125
|
if count < 4:
|
|
125
126
|
logging.warning("Click repeated!")
|
|
@@ -139,8 +140,13 @@ async def main(uid: int):
|
|
|
139
140
|
|
|
140
141
|
dest, amount, cur = "P79619335", 2, "RUB"
|
|
141
142
|
|
|
142
|
-
res = pyr.check_in(3731, cur, datetime.now())
|
|
143
143
|
res = await pyr.send(dest, amount, cur)
|
|
144
|
+
res = await pyr.send(dest, 3, cur)
|
|
145
|
+
res = await pyr.send(dest, amount, cur)
|
|
146
|
+
res = await pyr.send(dest, 3, cur)
|
|
147
|
+
res = await pyr.send(dest, amount, cur)
|
|
148
|
+
|
|
149
|
+
res = pyr.check_in(2, cur, datetime.now())
|
|
144
150
|
|
|
145
151
|
if len(res) > 1 and isinstance(res[1], bytes):
|
|
146
152
|
await pyr.bot.send(f"Transaction #{res[0]}", uid, photo=res[1])
|
xync_client/Pms/Payeer/login.py
CHANGED
|
@@ -33,8 +33,8 @@ xync_client/BitGet/agent.py,sha256=YVs3bDY0OcEJGU7m2A8chzO6PFhWDnQQrA-E6MVkBBg,3
|
|
|
33
33
|
xync_client/BitGet/ex.py,sha256=nAexKRkguIhq4fYP1tkIaou6oBFjjV2xwlajlJ-9DAE,3757
|
|
34
34
|
xync_client/BitGet/etype/ad.py,sha256=fysSW47wGYjSOPUqY864z857AJz4gjN-nOkI1Jxd27U,1838
|
|
35
35
|
xync_client/BitPapa/ex.py,sha256=U-RRB_RSOtErfRgxOZYWegZ_td_uZO37YKo3Jxchf_w,912
|
|
36
|
-
xync_client/Bybit/InAgent.py,sha256=
|
|
37
|
-
xync_client/Bybit/agent.py,sha256=
|
|
36
|
+
xync_client/Bybit/InAgent.py,sha256=WeBnc5etElWbAThdw7o8Oc9bmsj9nq7vrvgAGw2ASG8,20841
|
|
37
|
+
xync_client/Bybit/agent.py,sha256=bB7Uk0d2bUy86uFKYVOA2mT-h0HC3rkco7EXjxOLYas,58789
|
|
38
38
|
xync_client/Bybit/ex.py,sha256=DgPOmnjphcSCSsO4ZQjnIlWICNzdtKhNIpVsU93s99k,4707
|
|
39
39
|
xync_client/Bybit/order.py,sha256=H4UIb8hxFGnw1hZuSbr0yZ4qeaCOIZOMc6jEst0ycBs,1713
|
|
40
40
|
xync_client/Bybit/web_earn.py,sha256=qjqS10xlFc8r40IhDdPZ0LxA2dFEGbvBGXdsrUUJCMo,3019
|
|
@@ -71,9 +71,9 @@ xync_client/Pms/Alfa/state.json,sha256=MKE6vl-JsJO9PNCVqoQgBgYZTgYkHCas7USwl8QFt
|
|
|
71
71
|
xync_client/Pms/MTS/__init__.py,sha256=P_E7W46IZEk8RsEgl7H1xV3JplMT5l9vYQYTYyNbyQ8,2101
|
|
72
72
|
xync_client/Pms/Ozon/__init__.py,sha256=EvQZDSPv0fOT2hNCTP44nXHOIEQvP5bQf_7HVLiZc2I,4123
|
|
73
73
|
xync_client/Pms/Payeer/.gitignore,sha256=sWORdRp8ROppV2CsMEDJ3M_SokrNWCf8b1hlaNs64hg,12
|
|
74
|
-
xync_client/Pms/Payeer/__init__.py,sha256=
|
|
74
|
+
xync_client/Pms/Payeer/__init__.py,sha256=yjNgBolR6rQ2ZShnXt8rsWBa6joKQ70Xiw3HSI9fsd8,6499
|
|
75
75
|
xync_client/Pms/Payeer/api.py,sha256=bb8qrlPYyWafel1VR-2nate6xBeRZAVciFJblHygfAs,549
|
|
76
|
-
xync_client/Pms/Payeer/login.py,sha256=
|
|
76
|
+
xync_client/Pms/Payeer/login.py,sha256=CzJsqyO2S9drIqIsOwbIc7joKsDfJBHy6oR40sHi76I,2297
|
|
77
77
|
xync_client/Pms/Sber/__init__.py,sha256=dxQfd9ZPhFTc_C4xrwaxrV6p0SijDCLNzBeUv3oQG38,4926
|
|
78
78
|
xync_client/Pms/Sber/utils.py,sha256=gIeJspwvoBbOBt-fjxwW4WDHPoL2Evs8LVufsjrFOfo,1870
|
|
79
79
|
xync_client/Pms/Tinkoff/__init__.py,sha256=ZyLvBEUn-vh-85oPUUDS586AHgvx3c-mkQE3yBQtbw8,5580
|
|
@@ -94,7 +94,7 @@ xync_client/TgWallet/order.py,sha256=BOmBx5WWfJv0-_-A8DcR-Xd8utqO_VTmSqSegm0cteQ
|
|
|
94
94
|
xync_client/TgWallet/pyd.py,sha256=Ys3E8b3RLuyQ26frWT0F0BorkNxVpxnd18tY4Gp9dik,5636
|
|
95
95
|
xync_client/TgWallet/pyro.py,sha256=2K7QWdo48k4MbbgQt90gdz_HiPck69Njm4xaMjIVgoo,1440
|
|
96
96
|
xync_client/TgWallet/web.py,sha256=kDcv9SKKQPe91mw1qJBpbuyKYCAmZdfdHJylHumLBVU,1608
|
|
97
|
-
xync_client-0.0.
|
|
98
|
-
xync_client-0.0.
|
|
99
|
-
xync_client-0.0.
|
|
100
|
-
xync_client-0.0.
|
|
97
|
+
xync_client-0.0.100.dist-info/METADATA,sha256=5dACdju59CB1XHT11iBYHIBxZN90Y-xgr4qvZF3_JiY,964
|
|
98
|
+
xync_client-0.0.100.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
99
|
+
xync_client-0.0.100.dist-info/top_level.txt,sha256=bmYEVIIrD3v7yFwH-X15pEfRvzhuAdfsAZ2igvNI4O8,12
|
|
100
|
+
xync_client-0.0.100.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|