xync-client 0.0.11.dev19__tar.gz → 0.0.11.dev22__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.dev19/xync_client.egg-info → xync_client-0.0.11.dev22}/PKG-INFO +1 -1
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/tests/TestEx.py +20 -2
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/BingX/ex.py +3 -3
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/Gate/ex.py +18 -21
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22/xync_client.egg-info}/PKG-INFO +1 -1
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/.env.sample +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/.gitignore +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/.pre-commit-config.yaml +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/README.md +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/makefile +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/pyproject.toml +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/setup.cfg +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/tests/Abc/AgentTest.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/tests/Abc/BaseTest.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/tests/Abc/OrderTest.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/tests/Binance/test_binance.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/tests/Bybit/test_bybit.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/tests/Bybit/test_bybit_p2p.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/tests/Gate/test_gate.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/tests/Htx/test_htx_p2p.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/tests/__init__.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/tests/_test_ex.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/Abc/Agent.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/Abc/Auth.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/Abc/Base.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/Abc/Ex.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/Abc/Order.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/Binance/__init__.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/Binance/binance_async.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/Binance/earn_api.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/Binance/ex.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/Binance/exceptions.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/Binance/sapi.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/Binance/web_c2c.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/BingX/__init__.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/BingX/base.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/BingX/req.mjs +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/BingX/sign.js +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/BingX/test/main.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/BitGet/__init__.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/BitGet/agent.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/BitGet/ex.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/BitGet/req.mjs +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/Bybit/agent.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/Bybit/ex.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/Bybit/web_earn.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/Bybit/web_p2p.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/Gate/premarket.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/Htx/agent.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/Htx/earn.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/Htx/ex.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/KuCoin/pub.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/KuCoin/web.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/Okx/ex.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/TgWallet/agent.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/TgWallet/auth.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/TgWallet/ex.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/TgWallet/order.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/TgWallet/pyro.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/TgWallet/web.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/__init__.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client/loader.py +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client.egg-info/SOURCES.txt +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client.egg-info/dependency_links.txt +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client.egg-info/requires.txt +0 -0
- {xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/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")
|
|
@@ -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
|
|
|
@@ -5,24 +5,15 @@ 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
|
|
|
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,16 +39,22 @@ 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
|
|
|
60
|
-
|
|
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
|
|
57
|
+
async def ads(self, coin: Coin, cur: Cur, is_sell: bool, pms: list[Pm] = None) -> ListOfDicts:
|
|
61
58
|
pass
|
|
62
59
|
|
|
63
60
|
|
|
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
|
{xync_client-0.0.11.dev19 → xync_client-0.0.11.dev22}/xync_client.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|