diff --git a/.gitignore b/.gitignore index 87d6c87..6719f02 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ cov.xml .pytest_cache .vagrant local.sh +coverage.xml diff --git a/README.md b/README.md index 1d1a2de..6e5a379 100644 --- a/README.md +++ b/README.md @@ -10,22 +10,28 @@ [![PyPI license](https://img.shields.io/pypi/l/cryptocom-exchange.svg)](https://pypi.python.org/pypi/cryptocom-exchange/) [![PyPI version fury.io](https://badge.fury.io/py/cryptocom-exchange.svg)](https://pypi.python.org/pypi/cryptocom-exchange/) [![PyPI download month](https://img.shields.io/pypi/dm/cryptocom-exchange.svg)](https://pypi.python.org/pypi/cryptocom-exchange/) +[![Gitter](https://badges.gitter.im/goincrypto/cryptocom-exchange.svg)](https://gitter.im/goincrypto/cryptocom-exchange?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) + +Documentation: [https://cryptocom-exchange.rtfd.io](https://cryptocom-exchange.rtfd.io) + +Exchange original API docs: [https://exchange-docs.crypto.com](https://exchange-docs.crypto.com) + +### Description - provides all methods to access crypto.com/exchange API (except for websockets temporary) - full test coverage on real exchange with real money - simple async methods with custom retries and timeouts -**Changelog** +### Changelog +- **0.3.1** - fixed missing DAI pair - **0.3** - added websocket support for public endpoints and supports `sign=True` for private endpoints - **0.2.1** - fixed order_id in `get_order` func, still preparing for stable release - **0.2** - moved to new API v2, except for websockets -Documentation: [https://cryptocom-exchange.rtfd.io](https://cryptocom-exchange.rtfd.io) -Exchange original API docs: [https://exchange-docs.crypto.com](https://exchange-docs.crypto.com) +### Donation -**Donation** -If this lib helped you achieve profits will be glad to receive some donation to continue support +If this lib helped you achieve profits will be glad to receive some donation to continue support 💪 ERC20(CRO,MCO,USDT,ETH etc.): **0x348c268A563b0C809e4E21F4371E8cdFbD1f51bf** diff --git a/src/cryptocom/exchange/structs.py b/src/cryptocom/exchange/structs.py index 9b52bad..aad9aa6 100644 --- a/src/cryptocom/exchange/structs.py +++ b/src/cryptocom/exchange/structs.py @@ -59,6 +59,7 @@ class Coin(str, enum.Enum): USDT = 'USDT' USDC = 'USDC' + DAI = 'DAI' class Pair(str, enum.Enum): @@ -99,6 +100,7 @@ class Pair(str, enum.Enum): ALGO_USDT = 'ALGO_USDT' KNC_USDT = 'KNC_USDT' NEO_USDT = 'NEO_USDT' + DAI_USDT = 'DAI_USDT' MCO_CRO = 'MCO_CRO' ETH_CRO = 'ETH_CRO' @@ -117,6 +119,7 @@ class Pair(str, enum.Enum): ALGO_CRO = 'ALGO_CRO' KNC_CRO = 'KNC_CRO' NEO_CRO = 'NEO_CRO' + DAI_CRO = 'DAI_CRO' CRO_USDC = 'CRO_USDC' diff --git a/tests/test_exchange.py b/tests/test_exchange.py index f8000ba..80751af 100644 --- a/tests/test_exchange.py +++ b/tests/test_exchange.py @@ -13,8 +13,8 @@ async def test_get_pairs(exchange: cro.Exchange): for pair_keys in pairs.values(): assert sorted(keys) == sorted(pair_keys) - for pair in cro.Pair: - assert pair in pairs + for pair in pairs: + assert pair in cro.Pair @pytest.mark.asyncio