xync-client 0.0.11.dev18__tar.gz → 0.0.11.dev20__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.dev18/xync_client.egg-info → xync_client-0.0.11.dev20}/PKG-INFO +1 -1
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/tests/Abc/BaseTest.py +1 -1
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/tests/TestEx.py +3 -3
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/BingX/ex.py +3 -3
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/Gate/ex.py +15 -18
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/Htx/ex.py +1 -1
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20/xync_client.egg-info}/PKG-INFO +1 -1
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/.env.sample +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/.gitignore +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/.pre-commit-config.yaml +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/README.md +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/makefile +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/pyproject.toml +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/setup.cfg +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/tests/Abc/AgentTest.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/tests/Abc/OrderTest.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/tests/Binance/test_binance.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/tests/Bybit/test_bybit.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/tests/Bybit/test_bybit_p2p.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/tests/Gate/test_gate.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/tests/Htx/test_htx_p2p.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/tests/__init__.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/tests/_test_ex.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/Abc/Agent.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/Abc/Auth.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/Abc/Base.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/Abc/Ex.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/Abc/Order.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/Binance/__init__.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/Binance/binance_async.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/Binance/earn_api.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/Binance/ex.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/Binance/exceptions.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/Binance/sapi.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/Binance/web_c2c.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/BingX/__init__.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/BingX/base.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/BingX/req.mjs +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/BingX/sign.js +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/BingX/test/main.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/BitGet/__init__.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/BitGet/agent.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/BitGet/ex.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/BitGet/req.mjs +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/Bybit/agent.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/Bybit/ex.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/Bybit/web_earn.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/Bybit/web_p2p.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/Gate/premarket.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/Htx/agent.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/Htx/earn.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/KuCoin/pub.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/KuCoin/web.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/Okx/ex.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/TgWallet/agent.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/TgWallet/auth.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/TgWallet/ex.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/TgWallet/order.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/TgWallet/pyro.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/TgWallet/web.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/__init__.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client/loader.py +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client.egg-info/SOURCES.txt +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client.egg-info/dependency_links.txt +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client.egg-info/requires.txt +0 -0
- {xync_client-0.0.11.dev18 → xync_client-0.0.11.dev20}/xync_client.egg-info/top_level.txt +0 -0
|
@@ -53,4 +53,4 @@ class BaseTest:
|
|
|
53
53
|
def is_map_of_ids(dct: MapOfIdsList, not_empty: bool = True) -> TypeGuard[MapOfIdsList]:
|
|
54
54
|
if not_empty and not len(dct):
|
|
55
55
|
return False
|
|
56
|
-
return all(isinstance(k, int | str) and isinstance(v,
|
|
56
|
+
return all(isinstance(k, int | str) and isinstance(v, list | set) for k, v in dct.items())
|
|
@@ -5,7 +5,7 @@ from xync_schema.enums import ExStatus, ExType, ExAction
|
|
|
5
5
|
from xync_schema.models import Ex, TestEx as ExTest
|
|
6
6
|
|
|
7
7
|
from tests.Abc.BaseTest import BaseTest
|
|
8
|
-
from xync_client.Abc.Base import BaseClient, DictOfDicts, FlatDict
|
|
8
|
+
from xync_client.Abc.Base import BaseClient, DictOfDicts, FlatDict, MapOfIdsList
|
|
9
9
|
from xync_client.Abc.Ex import BaseExClient
|
|
10
10
|
|
|
11
11
|
|
|
@@ -39,8 +39,8 @@ class TestEx(BaseTest):
|
|
|
39
39
|
# 22
|
|
40
40
|
async def test_cur_pms_map(self, clients: list[BaseExClient]):
|
|
41
41
|
for client in clients:
|
|
42
|
-
cur_pms:
|
|
43
|
-
ok = self.
|
|
42
|
+
cur_pms: MapOfIdsList = await client.cur_pms_map()
|
|
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
46
|
logging.info(f"{client.ex.name}:{ExAction.pms.name} - ok")
|
|
@@ -27,7 +27,7 @@ class ExClient(BaseExClient, BaseBingXClient):
|
|
|
27
27
|
[pp.update({p["id"]: {"name": p["name"], "logo": p["icon"]}}) for p in pms["data"]["paymentMethodList"]]
|
|
28
28
|
return pp
|
|
29
29
|
|
|
30
|
-
# 21: Список поддерживаемых валют
|
|
30
|
+
# 21: Список поддерживаемых валют на BingX
|
|
31
31
|
async def curs(self) -> FlatDict: # {cur.exid: cur.ticker}
|
|
32
32
|
params = {
|
|
33
33
|
"type": "1",
|
|
@@ -37,11 +37,11 @@ class ExClient(BaseExClient, BaseBingXClient):
|
|
|
37
37
|
curs = await self._get("/api/c2c/v1/common/supportCoins", params=params)
|
|
38
38
|
return {cur["id"]: cur["name"] for cur in curs["data"]["coins"]}
|
|
39
39
|
|
|
40
|
-
# 22: cur_pms_map
|
|
40
|
+
# 22: cur_pms_map на BingX
|
|
41
41
|
async def cur_pms_map(self):
|
|
42
42
|
pass
|
|
43
43
|
|
|
44
|
-
# 23:
|
|
44
|
+
# 23: Монеты на BingX
|
|
45
45
|
async def coins(self):
|
|
46
46
|
pass
|
|
47
47
|
|
|
@@ -13,16 +13,7 @@ from xync_client.loader import PG_DSN
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
class ExClient(BaseExClient):
|
|
16
|
-
|
|
17
|
-
pass
|
|
18
|
-
|
|
19
|
-
async def curs(self) -> FlatDict:
|
|
20
|
-
curs = await self._post("/json_svr/buy_crypto_fiat_setting")
|
|
21
|
-
curs = {cur["fiat"]: cur["fiat"] for cur in curs["datas"] if cur["p2p"]}
|
|
22
|
-
return curs
|
|
23
|
-
|
|
24
|
-
async def coins(self, cur: Cur = None) -> list[Coin]: ...
|
|
25
|
-
|
|
16
|
+
# 20: Список всех платежных методов на бирже
|
|
26
17
|
async def pms(self, cur: Cur = None) -> DictOfDicts:
|
|
27
18
|
await sleep(1)
|
|
28
19
|
doc = await self._get("/p2p")
|
|
@@ -48,15 +39,21 @@ class ExClient(BaseExClient):
|
|
|
48
39
|
pm["index"]: {"name": pm["pay_name"], "logo": pm["image"], "identifier": idf, "type_": pm["base_type"]}
|
|
49
40
|
for idf, pm in pms.items()
|
|
50
41
|
}
|
|
51
|
-
# pmcurs = {
|
|
52
|
-
# cur.ticker: (await self._get("/v3/c2c/configs/receipt/templates", {"quoteCurrency": cur.ticker}))["data"]
|
|
53
|
-
# for cur in await self.curs()
|
|
54
|
-
# }
|
|
55
|
-
# pp = {}
|
|
56
|
-
# [[pp.update({p["paymentMethod"]: p["paymentMethodDescription"]}) for p in ps] for ps in pmcurs.values()]
|
|
57
|
-
# pp = {k: v for k, v in sorted(pp.items(), key=lambda x: x[0])}
|
|
58
|
-
# return pp
|
|
59
42
|
|
|
43
|
+
# 21: Список поддерживаемых валют
|
|
44
|
+
async def coins(self, cur: Cur = None) -> FlatDict: ...
|
|
45
|
+
|
|
46
|
+
# 22: Списки поддерживаемых платежек по каждой валюте
|
|
47
|
+
async def cur_pms_map(self) -> MapOfIdsList:
|
|
48
|
+
pass
|
|
49
|
+
|
|
50
|
+
# 23: Монеты на Gate
|
|
51
|
+
async def curs(self) -> FlatDict:
|
|
52
|
+
curs = await self._post("/json_svr/buy_crypto_fiat_setting")
|
|
53
|
+
curs = {cur["fiat"]: cur["fiat"] for cur in curs["datas"] if cur["p2p"]}
|
|
54
|
+
return curs
|
|
55
|
+
|
|
56
|
+
# 24: ads
|
|
60
57
|
async def ads(self, coin: Coin, cur: Cur, is_sell: bool, pms: list[Pm] = None) -> list[Ad]:
|
|
61
58
|
pass
|
|
62
59
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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.dev18 → xync_client-0.0.11.dev20}/xync_client.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|