Skip to content

Commit

Permalink
2.1.14
Browse files Browse the repository at this point in the history
  • Loading branch information
DogsTailFarmer committed Jul 7, 2024
1 parent f1e1ee5 commit dd50515
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 22 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.1.14 2024-07-07
### Fix
* `Bybit`: `fetch_ledgers()` doubling of incoming transfers to a subaccount

## 2.1.13 2024-06-26
### Fix
* `HTX`: WSS missed account change 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__ = "[email protected]"
__credits__ = ["https://github.com/DanyaSWorlD"]
__version__ = "2.1.13"
__version__ = "2.1.14"

from pathlib import Path
import shutil
Expand Down
36 changes: 18 additions & 18 deletions exchanges_wrapper/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,24 +493,24 @@ async def fetch_ledgers(self, symbol, limit=25):
uid=self.account_uid
)

params.pop('status')
params['accountType'] = 'UNIFIED'
params['category'] = 'spot'
params['type'] = 'TRANSFER_IN'

# Get Transaction Log
res, ts = await self.http.send_api_call(
"/v5/account/transaction-log",
signed=True,
**params
)

_res += bbt.on_balance_update(
res['list'],
ts,
symbol,
'log'
)
if not _res:
# Get Transaction Log
params.pop('status')
params['accountType'] = 'UNIFIED'
params['category'] = 'spot'
params['type'] = 'TRANSFER_IN'

res, ts = await self.http.send_api_call(
"/v5/account/transaction-log",
signed=True,
**params
)
_res += bbt.on_balance_update(
res['list'],
ts,
symbol,
'log'
)

for i in _res:
_id = next(iter(i))
Expand Down
3 changes: 0 additions & 3 deletions exchanges_wrapper/parsers/bybit_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,6 @@ def on_balance_update(data_in: list, ts: str, symbol: str, mode: str, uid=None)
}
}
)

elif mode == 'universal':
for i in data_in:
if i['coin'] in symbol and \
Expand All @@ -469,7 +468,6 @@ def on_balance_update(data_in: list, ts: str, symbol: str, mode: str, uid=None)
}
}
)

elif mode == 'log':
for i in data_in:
if i['currency'] in symbol:
Expand All @@ -484,7 +482,6 @@ def on_balance_update(data_in: list, ts: str, symbol: str, mode: str, uid=None)
}
}
)

return data_out


Expand Down

0 comments on commit dd50515

Please sign in to comment.