Skip to content

Commit

Permalink
1.4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
DogsTailFarmer committed Jan 5, 2024
1 parent 9f41d8a commit fc08daa
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 22 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## v1.4.5 2024-01-05
### Fix
* `exch_client.py` init error

### Update
* replacing json with ujson to improve performance
* Dependency: Up requirements for crypto-ws-api==2.0.6

## v1.4.4 2023-12-13
### Update
* Before send cancel order result checking if it was be executed and generating trade event
Expand Down
2 changes: 1 addition & 1 deletion exchanges_wrapper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
__contact__ = "https://github.com/DogsTailFarmer"
__email__ = "jerry.fedorenko@yahoo.com"
__credits__ = ["https://github.com/DanyaSWorlD"]
__version__ = "1.4.4"
__version__ = "1.4.5"

from pathlib import Path
import shutil
Expand Down
31 changes: 16 additions & 15 deletions exchanges_wrapper/exch_srv.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import traceback
import asyncio
import functools
import json
import ujson as json
import logging.handlers
import toml
# noinspection PyPackageRequirements
Expand Down Expand Up @@ -579,20 +579,21 @@ async def OnKlinesUpdate(self, request: api_pb2.FetchKlinesRequest,
# logger.info(f"OnKlinesUpdate.event: {exchange}:{_event.symbol}:{_event.kline_interval}")
response.symbol = _event.symbol
response.interval = _event.kline_interval
candle = [_event.kline_start_time,
_event.kline_open_price,
_event.kline_high_price,
_event.kline_low_price,
_event.kline_close_price,
_event.kline_base_asset_volume,
_event.kline_close_time,
_event.kline_quote_asset_volume,
_event.kline_trades_number,
_event.kline_taker_buy_base_asset_volume,
_event.kline_taker_buy_quote_asset_volume,
_event.kline_ignore
]
response.candle = json.dumps(candle)
response.candle = json.dumps(
[_event.kline_start_time,
_event.kline_open_price,
_event.kline_high_price,
_event.kline_low_price,
_event.kline_close_price,
_event.kline_base_asset_volume,
_event.kline_close_time,
_event.kline_quote_asset_volume,
_event.kline_trades_number,
_event.kline_taker_buy_base_asset_volume,
_event.kline_taker_buy_quote_asset_volume,
_event.kline_ignore
]
)
yield response
_queue.task_done()

Expand Down
2 changes: 1 addition & 1 deletion exchanges_wrapper/http_client.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import asyncio
import json
import ujson as json
from urllib.parse import urlencode, urlparse

import aiohttp
Expand Down
2 changes: 1 addition & 1 deletion exchanges_wrapper/web_sockets.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sys
import asyncio
import json
import ujson as json
import logging
import time
from decimal import Decimal
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dynamic = ["version", "description"]
requires-python = ">=3.8"

dependencies = [
"crypto-ws-api==2.0.5.post3",
"crypto-ws-api==2.0.6",
"grpcio==1.48.2",
"grpcio-tools==1.48.2",
"idna==3.4",
Expand All @@ -26,7 +26,8 @@ dependencies = [
"aiohttp==3.9.0",
"Pympler~=1.0.1",
"websockets~=12.0",
"expiringdict~=1.2.2"
"expiringdict~=1.2.2",
"ujson~=5.9.0"
]

[tool.flit.module]
Expand Down
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
crypto-ws-api==2.0.5.post3
crypto-ws-api==2.0.6
grpcio==1.48.2
grpcio-tools==1.48.2
idna==3.4
Expand All @@ -8,4 +8,5 @@ toml~=0.10.2
aiohttp==3.9.0
Pympler~=1.0.1
websockets==12.0
expiringdict~=1.2.2
expiringdict~=1.2.2
ujson~=5.9.0

0 comments on commit fc08daa

Please sign in to comment.