From f94e8eac749f7445a2515e1ff3a5249593d06fd3 Mon Sep 17 00:00:00 2001 From: Artur <33733651+Keeqler@users.noreply.github.com> Date: Tue, 22 Oct 2024 10:32:34 -0300 Subject: [PATCH 1/2] fix: use correct pair when getting bids --- src/autoconvert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/autoconvert.py b/src/autoconvert.py index c9de760..b315145 100644 --- a/src/autoconvert.py +++ b/src/autoconvert.py @@ -21,7 +21,7 @@ def get_balance(asset: Literal['XBT', 'XMR']) -> str: return balance def get_bids(asset: Literal['XBT', 'XMR']): - return util.kraken_request('/0/public/Depth', {'pair': f'{asset}USD'})[f'{asset}USDT']['bids'] + return util.kraken_request('/0/public/Depth', {'pair': f'{asset}USDT'})[f'{asset}USDT']['bids'] def attempt_sell(asset: Literal['XBT', 'XMR']): balance = float(get_balance(asset)) From e5c0803648254d24c96e460aeebde02c69576d3a Mon Sep 17 00:00:00 2001 From: Artur <33733651+Keeqler@users.noreply.github.com> Date: Tue, 22 Oct 2024 10:51:15 -0300 Subject: [PATCH 2/2] fix: use USD order book when getting bids --- src/autoconvert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/autoconvert.py b/src/autoconvert.py index b315145..7bb9dc3 100644 --- a/src/autoconvert.py +++ b/src/autoconvert.py @@ -21,7 +21,7 @@ def get_balance(asset: Literal['XBT', 'XMR']) -> str: return balance def get_bids(asset: Literal['XBT', 'XMR']): - return util.kraken_request('/0/public/Depth', {'pair': f'{asset}USDT'})[f'{asset}USDT']['bids'] + return util.kraken_request('/0/public/Depth', {'pair': f'{asset}USD'})[f'X{asset}ZUSD']['bids'] def attempt_sell(asset: Literal['XBT', 'XMR']): balance = float(get_balance(asset))