Merge pull request #20 from MAGICGrants/get-bids-fix

fix: use correct pair when getting bids
This commit is contained in:
Justin Ehrenhofer
2024-10-22 09:09:32 -05:00
committed by GitHub

View File

@@ -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}USD'})[f'X{asset}ZUSD']['bids']
def attempt_sell(asset: Literal['XBT', 'XMR']):
balance = float(get_balance(asset))