xync-client 0.0.11.dev20__tar.gz → 0.0.11.dev23__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.
- {xync_client-0.0.11.dev20/xync_client.egg-info → xync_client-0.0.11.dev23}/PKG-INFO +1 -1
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/tests/TestEx.py +20 -2
- xync_client-0.0.11.dev23/tests/_todo_refact/Wallet/test_agent.py +162 -0
- xync_client-0.0.11.dev23/tests/_todo_refact/Wallet/test_ex.py +36 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/Gate/ex.py +3 -3
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23/xync_client.egg-info}/PKG-INFO +1 -1
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client.egg-info/SOURCES.txt +12 -10
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/.env.sample +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/.gitignore +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/.pre-commit-config.yaml +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/README.md +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/makefile +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/pyproject.toml +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/setup.cfg +0 -0
- {xync_client-0.0.11.dev20/tests/Abc → xync_client-0.0.11.dev23/tests}/AgentTest.py +0 -0
- {xync_client-0.0.11.dev20/tests/Abc → xync_client-0.0.11.dev23/tests}/BaseTest.py +0 -0
- {xync_client-0.0.11.dev20/tests/Abc → xync_client-0.0.11.dev23/tests}/OrderTest.py +0 -0
- {xync_client-0.0.11.dev20/tests → xync_client-0.0.11.dev23/tests/_todo_refact}/Binance/test_binance.py +0 -0
- {xync_client-0.0.11.dev20/tests → xync_client-0.0.11.dev23/tests/_todo_refact}/Bybit/test_bybit.py +0 -0
- {xync_client-0.0.11.dev20/tests → xync_client-0.0.11.dev23/tests/_todo_refact}/Bybit/test_bybit_p2p.py +0 -0
- {xync_client-0.0.11.dev20/tests → xync_client-0.0.11.dev23/tests/_todo_refact}/Gate/test_gate.py +0 -0
- {xync_client-0.0.11.dev20/tests → xync_client-0.0.11.dev23/tests/_todo_refact}/Htx/test_htx_p2p.py +0 -0
- {xync_client-0.0.11.dev20/tests → xync_client-0.0.11.dev23/tests/_todo_refact}/__init__.py +0 -0
- {xync_client-0.0.11.dev20/tests → xync_client-0.0.11.dev23/tests/_todo_refact}/_test_ex.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/Abc/Agent.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/Abc/Auth.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/Abc/Base.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/Abc/Ex.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/Abc/Order.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/Binance/__init__.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/Binance/binance_async.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/Binance/earn_api.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/Binance/ex.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/Binance/exceptions.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/Binance/sapi.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/Binance/web_c2c.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/BingX/__init__.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/BingX/base.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/BingX/ex.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/BingX/req.mjs +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/BingX/sign.js +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/BingX/test/main.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/BitGet/__init__.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/BitGet/agent.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/BitGet/ex.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/BitGet/req.mjs +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/Bybit/agent.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/Bybit/ex.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/Bybit/web_earn.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/Bybit/web_p2p.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/Gate/premarket.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/Htx/agent.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/Htx/earn.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/Htx/ex.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/KuCoin/pub.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/KuCoin/web.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/Okx/ex.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/TgWallet/agent.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/TgWallet/auth.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/TgWallet/ex.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/TgWallet/order.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/TgWallet/pyro.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/TgWallet/web.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/__init__.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client/loader.py +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client.egg-info/dependency_links.txt +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client.egg-info/requires.txt +0 -0
- {xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client.egg-info/top_level.txt +0 -0
|
@@ -34,7 +34,7 @@ class TestEx(BaseTest):
|
|
|
34
34
|
ok = self.is_flat_dict(curs)
|
|
35
35
|
t, _ = await ExTest.update_or_create({"ok": ok}, ex=client.ex, action=ExAction.curs)
|
|
36
36
|
assert t.ok, "No curs"
|
|
37
|
-
logging.info(f"{client.ex.name}:{ExAction.
|
|
37
|
+
logging.info(f"{client.ex.name}:{ExAction.curs.name} - ok")
|
|
38
38
|
|
|
39
39
|
# 22
|
|
40
40
|
async def test_cur_pms_map(self, clients: list[BaseExClient]):
|
|
@@ -43,4 +43,22 @@ class TestEx(BaseTest):
|
|
|
43
43
|
ok = self.is_map_of_ids(cur_pms)
|
|
44
44
|
t, _ = await ExTest.update_or_create({"ok": ok}, ex=client.ex, action=ExAction.cur_pms_map)
|
|
45
45
|
assert t.ok, "No pms for cur"
|
|
46
|
-
logging.info(f"{client.ex.name}:{ExAction.
|
|
46
|
+
logging.info(f"{client.ex.name}:{ExAction.cur_pms_map.name} - ok")
|
|
47
|
+
|
|
48
|
+
# 23
|
|
49
|
+
async def test_coins(self, clients: list[BaseExClient]):
|
|
50
|
+
for client in clients:
|
|
51
|
+
coins: FlatDict = await client.coins()
|
|
52
|
+
ok = self.is_flat_dict(coins)
|
|
53
|
+
t, _ = await ExTest.update_or_create({"ok": ok}, ex=client.ex, action=ExAction.coins)
|
|
54
|
+
assert t.ok, "No coins"
|
|
55
|
+
logging.info(f"{client.ex.name}:{ExAction.coins.name} - ok")
|
|
56
|
+
|
|
57
|
+
# 24
|
|
58
|
+
async def test_ads(self, clients: list[BaseExClient]):
|
|
59
|
+
for client in clients:
|
|
60
|
+
ads: FlatDict = await client.ads("USDT", "RUB", False)
|
|
61
|
+
ok = self.is_list_of_dicts(ads)
|
|
62
|
+
t, _ = await ExTest.update_or_create({"ok": ok}, ex=client.ex, action=ExAction.ads)
|
|
63
|
+
assert t.ok, "No ads"
|
|
64
|
+
logging.info(f"{client.ex.name}:{ExAction.ads.name} - ok")
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
from asyncio import AbstractEventLoop, get_running_loop
|
|
2
|
+
|
|
3
|
+
import pytest
|
|
4
|
+
import uvloop
|
|
5
|
+
from tortoise.backends.asyncpg import AsyncpgDBClient
|
|
6
|
+
from x_model import init_db
|
|
7
|
+
from xync_schema import models
|
|
8
|
+
from xync_schema.models import Agent, ExAction, TestEx
|
|
9
|
+
from xync_schema.pydantic import FiatNew
|
|
10
|
+
|
|
11
|
+
from xync_client.TgWallet.agent import AgentClient
|
|
12
|
+
from xync_client.loader import PG_DSN
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@pytest.mark.asyncio(loop_scope="class")
|
|
16
|
+
class TestWallet:
|
|
17
|
+
loop: AbstractEventLoop
|
|
18
|
+
|
|
19
|
+
@pytest.fixture(scope="class")
|
|
20
|
+
def event_loop_policy(self):
|
|
21
|
+
return uvloop.EventLoopPolicy()
|
|
22
|
+
|
|
23
|
+
@pytest.fixture(scope="class")
|
|
24
|
+
async def cn(self, event_loop_policy) -> AsyncpgDBClient:
|
|
25
|
+
TestWallet.loop = get_running_loop()
|
|
26
|
+
cn: AsyncpgDBClient = await init_db(PG_DSN, models, True)
|
|
27
|
+
yield cn
|
|
28
|
+
await cn.close()
|
|
29
|
+
|
|
30
|
+
@pytest.fixture(scope="class")
|
|
31
|
+
async def ac(self, cn) -> AgentClient:
|
|
32
|
+
agent = await Agent.get(user_id=1038938370).prefetch_related("ex")
|
|
33
|
+
tg = await agent.client()
|
|
34
|
+
yield tg
|
|
35
|
+
await tg.close()
|
|
36
|
+
|
|
37
|
+
# 25 - fiats
|
|
38
|
+
async def test_fiats(self, ac):
|
|
39
|
+
fiats = await ac.my_fiats()
|
|
40
|
+
await TestEx.update_or_create(
|
|
41
|
+
{"ok": (ok := isinstance(fiats, dict))}, ex__name=ac.agent.ex.name, action=ExAction.my_fiats
|
|
42
|
+
)
|
|
43
|
+
assert ok, "Failed to get fiats"
|
|
44
|
+
|
|
45
|
+
# 26 - fiat_new
|
|
46
|
+
async def test_fiat_new(self, ac):
|
|
47
|
+
await ac.all_pms()
|
|
48
|
+
fiat = FiatNew(cur_id=1, pm_id=1, detail="123456789098765", name="Satoshi")
|
|
49
|
+
add_pm = await ac.fiat_new(fiat)
|
|
50
|
+
await TestEx.update_or_create(
|
|
51
|
+
{"ok": add_pm["status"] == "SUCCESS"}, ex__name="TgWallet", action=ExAction.fiat_new
|
|
52
|
+
)
|
|
53
|
+
assert add_pm["status"] == "SUCCESS", "Failed to create"
|
|
54
|
+
|
|
55
|
+
# # 27 - fiat_edit
|
|
56
|
+
# async def test_fiat_edit(self, ac):
|
|
57
|
+
# editid = await ac.my_fiats()
|
|
58
|
+
# pms = await ac.all_pms()
|
|
59
|
+
# add_pm = await ac.fiat_upd(editid["data"][0]["id"], pms[0]["code"], "RUB", pms[0]["name"], "9876543214442")
|
|
60
|
+
# await TestEx.update_or_create(
|
|
61
|
+
# {"ok": add_pm["status"] == "SUCCESS"}, ex__name="TgWallet", action=ExAction.fiat_upd
|
|
62
|
+
# )
|
|
63
|
+
# assert add_pm["status"] == "SUCCESS", "Failed to edit"
|
|
64
|
+
#
|
|
65
|
+
# # 28 - fiat_del
|
|
66
|
+
# async def test_fiat_del(self, ac):
|
|
67
|
+
# delid = await ac.my_fiats()
|
|
68
|
+
# dl = await ac.fiat_del(delid["data"][0]["id"])
|
|
69
|
+
# await TestEx.update_or_create({"ok": dl["status"] == "SUCCESS"}, ex__name="TgWallet", action=ExAction.fiat_del)
|
|
70
|
+
# assert dl["status"] == "SUCCESS", "Fiat doesn't delete"
|
|
71
|
+
#
|
|
72
|
+
# # 29 - my_ads
|
|
73
|
+
# async def test_my_ads(self, ac):
|
|
74
|
+
# ads = await ac.my_ads()
|
|
75
|
+
# await TestEx.update_or_create({"ok": ads["status"] == "SUCCESS"}, ex__name="TgWallet", action=ExAction.my_ads)
|
|
76
|
+
# assert ads["status"] == "SUCCESS", "No data"
|
|
77
|
+
|
|
78
|
+
# # 10 - ad_new
|
|
79
|
+
# async def test_ad_new(self, ac):
|
|
80
|
+
# fiats = [(await ac.fiats())['data'][0]['id']]
|
|
81
|
+
# ad = await ac.ad_new(fiats=fiats, amount=1000, coin="NOT", cur="EGP", tt="SALE")
|
|
82
|
+
# await TestEx.update_or_create({"ok": ad['status'] == 'SUCCESS'}, ex__name="TgWallet", action=ExAction.ad_new)
|
|
83
|
+
# assert ad['status'] == "SUCCESS", "No data"
|
|
84
|
+
#
|
|
85
|
+
# # 11 - ad_upd
|
|
86
|
+
# async def test_ad_upd(self, ac):
|
|
87
|
+
# fiats = [(await ac.fiats())['data'][0]['id']]
|
|
88
|
+
# ad = (await ac.my_ads())['data'][0]
|
|
89
|
+
# upd = await ac.ad_upd(ad['type'], ad['id'], fiats, 1000)
|
|
90
|
+
# await TestEx.update_or_create({"ok": upd['status'] == 'SUCCESS'}, ex__name="TgWallet", action=ExAction.ad_upd)
|
|
91
|
+
# assert upd['status'] == "SUCCESS", "No data"
|
|
92
|
+
#
|
|
93
|
+
# # 13, 14 - ad_on/ad_off
|
|
94
|
+
# async def test_ad_off_on(self, ac):
|
|
95
|
+
# ad = (await ac.my_ads())["data"][0]
|
|
96
|
+
# if ad['status'] == "ACTIVE":
|
|
97
|
+
# resulst_off = await ac.ad_off(ad['type'], ad['id'])
|
|
98
|
+
# assert resulst_off['status'] == "SUCCESS", "Inactivate failed"
|
|
99
|
+
# resulst_on = await ac.ad_on(ad['type'], ad['id'])
|
|
100
|
+
# assert resulst_on['status'] == "SUCCESS", "Activate failed"
|
|
101
|
+
# await TestEx.update_or_create({"ok": resulst_on['status'] == 'SUCCESS'}, ex__name="TgWallet",
|
|
102
|
+
# action=ExAction.ad_on)
|
|
103
|
+
# resulst_off = await ac.ad_off(ad['type'], ad['id'])
|
|
104
|
+
# await TestEx.update_or_create({"ok": resulst_off['status'] == 'SUCCESS'}, ex__name="TgWallet",
|
|
105
|
+
# action=ExAction.ad_off)
|
|
106
|
+
# assert resulst_off['status'] == "SUCCESS", "Inactivate failed"
|
|
107
|
+
#
|
|
108
|
+
# # 12 - ad_del
|
|
109
|
+
# async def test_ad_del(self, ac):
|
|
110
|
+
# ad = (await ac.my_ads())['data'][0]
|
|
111
|
+
# ad_del = await ac.ad_del(ad['type'], ad['id'])
|
|
112
|
+
# await TestEx.update_or_create({"ok": ad_del['status'] == 'SUCCESS'}, ex__name="TgWallet",
|
|
113
|
+
# action=ExAction.ad_del)
|
|
114
|
+
# assert ad_del['status'] == "SUCCESS", "No data"
|
|
115
|
+
#
|
|
116
|
+
# # 15 - order_approve
|
|
117
|
+
# async def test_order_approve(self, ac):
|
|
118
|
+
# orders = await ac.my_orders()
|
|
119
|
+
# agent = await Agent.get(user_id=2093307892)
|
|
120
|
+
# tgw = Private(agent)
|
|
121
|
+
# kyc = await tgw.get_kyc()
|
|
122
|
+
# if orders['data'][0]['seller']['userId'] == kyc:
|
|
123
|
+
# typ = 'SALE'
|
|
124
|
+
# elif orders['data'][0]['buyer']['userId'] == kyc:
|
|
125
|
+
# typ = 'BUY'
|
|
126
|
+
# else:
|
|
127
|
+
# typ = None
|
|
128
|
+
# approved = await ac.order_approve(orders['data'][0]['id'], typ)
|
|
129
|
+
# assert approved['status'] == "SUCCESS", "No approved"
|
|
130
|
+
#
|
|
131
|
+
# # 16 - order_reject
|
|
132
|
+
# async def test_order_reject(self, ac):
|
|
133
|
+
# orders = await ac.my_orders()
|
|
134
|
+
# assert len(orders['data']), "No orders. You need create at least one order at first!"
|
|
135
|
+
# order_reject = await ac.order_reject(orders['data'][0]['id'])
|
|
136
|
+
# await TestEx.update_or_create({"ok": order_reject['status'] == 'SUCCESS'}, ex__name="TgWallet",
|
|
137
|
+
# action=ExAction.order_reject)
|
|
138
|
+
# assert order_reject['status'] == "SUCCESS", "No data"
|
|
139
|
+
#
|
|
140
|
+
# # 19 - order_paid
|
|
141
|
+
# async def test_upload_file_order_paid(self, ac):
|
|
142
|
+
# orders = await ac.my_orders()
|
|
143
|
+
# agent = await Agent.get(user_id=1038938370)
|
|
144
|
+
# tgw = Private(agent)
|
|
145
|
+
# kyc = await tgw.get_kyc()
|
|
146
|
+
# if orders['data'][0]['seller']['userId'] == kyc:
|
|
147
|
+
# typ = 'SALE'
|
|
148
|
+
# elif orders['data'][0]['buyer']['userId'] == kyc:
|
|
149
|
+
# typ = 'BUY'
|
|
150
|
+
# else:
|
|
151
|
+
# typ = None
|
|
152
|
+
# order_id = await ac.order_approve(orders['data'][0]['id'], typ)
|
|
153
|
+
# upload = await ac.upload_file(order_id, 'Screenshot_788.png')
|
|
154
|
+
# assert upload['status'] == "SUCCESS", "No upload"
|
|
155
|
+
# paid = await ac.order_paid(orders['data'][0]['id'], upload['data']['file'])
|
|
156
|
+
# assert paid['status'] == "SUCCESS", "No data"
|
|
157
|
+
#
|
|
158
|
+
# # 20 - order_payment_confirm
|
|
159
|
+
# async def test_order_payment_confirm(self, ac):
|
|
160
|
+
# orders = await ac.my_orders()
|
|
161
|
+
# confirm = await ac.order_payment_confirm(orders['data'][0]['id'])
|
|
162
|
+
# assert confirm['status'] == "SUCCESS", "No confirm"
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
from xync_schema.models import ExAction, TestEx
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
@pytest.mark.asyncio(loop_scope="class")
|
|
6
|
+
class TestWallet(TestEx):
|
|
7
|
+
# 20 - all_pms
|
|
8
|
+
# async def test_pms(self, cl: ExClient):
|
|
9
|
+
# await self.pms(cl)
|
|
10
|
+
|
|
11
|
+
# 21 - all_curs
|
|
12
|
+
async def test_all_curs(self, cl):
|
|
13
|
+
curs = await cl.curs()
|
|
14
|
+
test, _ = await TestEx.update_or_create({"ok": bool(curs)}, ex__name="TgWallet", action=ExAction.curs)
|
|
15
|
+
assert test.ok, "No curs"
|
|
16
|
+
|
|
17
|
+
# 22 - all_pms
|
|
18
|
+
async def test_cur_pms_map(self, cl):
|
|
19
|
+
pms = await cl.cur_pms_map()
|
|
20
|
+
test, _ = await TestEx.update_or_create({"ok": bool(pms)}, ex__name="TgWallet", action=ExAction.pms)
|
|
21
|
+
assert test.ok, "No pms"
|
|
22
|
+
|
|
23
|
+
# 23 - all_coins
|
|
24
|
+
async def test_all_coins(self, cl):
|
|
25
|
+
coins = await cl.coins()
|
|
26
|
+
test, _ = await TestEx.update_or_create({"ok": bool(coins)}, ex__name="TgWallet", action=ExAction.coins)
|
|
27
|
+
assert test.ok, "No coins"
|
|
28
|
+
|
|
29
|
+
# 24 - all_ads
|
|
30
|
+
async def test_cur_filter(self, cl):
|
|
31
|
+
for cur in "RUB", "AZN", "GEL":
|
|
32
|
+
for coin in "TON", "USDT", "BTC":
|
|
33
|
+
for tt in True, False:
|
|
34
|
+
ads = await cl.ads(coin, cur, tt)
|
|
35
|
+
assert len(ads), "No data"
|
|
36
|
+
await TestEx.update_or_create({"ok": bool(ads)}, ex__name="TgWallet", action=ExAction.ads)
|
|
@@ -5,9 +5,9 @@ from json import JSONDecoder
|
|
|
5
5
|
from bs4 import BeautifulSoup, Script
|
|
6
6
|
from x_model import init_db
|
|
7
7
|
from xync_schema import models
|
|
8
|
-
from xync_schema.models import Coin, Cur, Pm,
|
|
8
|
+
from xync_schema.models import Coin, Cur, Pm, Ex
|
|
9
9
|
|
|
10
|
-
from xync_client.Abc.Base import MapOfIdsList, DictOfDicts, FlatDict
|
|
10
|
+
from xync_client.Abc.Base import MapOfIdsList, DictOfDicts, FlatDict, ListOfDicts
|
|
11
11
|
from xync_client.Abc.Ex import BaseExClient
|
|
12
12
|
from xync_client.loader import PG_DSN
|
|
13
13
|
|
|
@@ -54,7 +54,7 @@ class ExClient(BaseExClient):
|
|
|
54
54
|
return curs
|
|
55
55
|
|
|
56
56
|
# 24: ads
|
|
57
|
-
async def ads(self, coin: Coin, cur: Cur, is_sell: bool, pms: list[Pm] = None) ->
|
|
57
|
+
async def ads(self, coin: Coin, cur: Cur, is_sell: bool, pms: list[Pm] = None) -> ListOfDicts:
|
|
58
58
|
pass
|
|
59
59
|
|
|
60
60
|
|
|
@@ -4,17 +4,19 @@
|
|
|
4
4
|
README.md
|
|
5
5
|
makefile
|
|
6
6
|
pyproject.toml
|
|
7
|
+
tests/AgentTest.py
|
|
8
|
+
tests/BaseTest.py
|
|
9
|
+
tests/OrderTest.py
|
|
7
10
|
tests/TestEx.py
|
|
8
|
-
tests/__init__.py
|
|
9
|
-
tests/_test_ex.py
|
|
10
|
-
tests/
|
|
11
|
-
tests/
|
|
12
|
-
tests/
|
|
13
|
-
tests/
|
|
14
|
-
tests/
|
|
15
|
-
tests/
|
|
16
|
-
tests/
|
|
17
|
-
tests/Htx/test_htx_p2p.py
|
|
11
|
+
tests/_todo_refact/__init__.py
|
|
12
|
+
tests/_todo_refact/_test_ex.py
|
|
13
|
+
tests/_todo_refact/Binance/test_binance.py
|
|
14
|
+
tests/_todo_refact/Bybit/test_bybit.py
|
|
15
|
+
tests/_todo_refact/Bybit/test_bybit_p2p.py
|
|
16
|
+
tests/_todo_refact/Gate/test_gate.py
|
|
17
|
+
tests/_todo_refact/Htx/test_htx_p2p.py
|
|
18
|
+
tests/_todo_refact/Wallet/test_agent.py
|
|
19
|
+
tests/_todo_refact/Wallet/test_ex.py
|
|
18
20
|
xync_client/__init__.py
|
|
19
21
|
xync_client/loader.py
|
|
20
22
|
xync_client.egg-info/PKG-INFO
|
|
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
|
{xync_client-0.0.11.dev20/tests → xync_client-0.0.11.dev23/tests/_todo_refact}/Bybit/test_bybit.py
RENAMED
|
File without changes
|
|
File without changes
|
{xync_client-0.0.11.dev20/tests → xync_client-0.0.11.dev23/tests/_todo_refact}/Gate/test_gate.py
RENAMED
|
File without changes
|
{xync_client-0.0.11.dev20/tests → xync_client-0.0.11.dev23/tests/_todo_refact}/Htx/test_htx_p2p.py
RENAMED
|
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
|
{xync_client-0.0.11.dev20 → xync_client-0.0.11.dev23}/xync_client.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|