kparichay / CryptoETF

Standard and custom ETF portfolio management and execution for cryptocurrencies.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with doge and XRP

thunderbolt78 opened this issue · comments

hi everytime want to sell DOGE i get an error. Are you able to look at this ?

execute_index_fund.py --liquidate --portfolio=DOGE

Current Portfolio ->
[('DOGE', 653.0965)]
##################################################
Target Portfolio ->
[('USDT', 653.0965)]
##################################################
Executing Trades (NOT LIVE) ->
pair = DOGE/USDT, side = SELL, base quant = 652.4, quant = 4650.3

execute_index_fund.py --liquidate --portfolio=DOGE --live

Executing Trades (LIVE) ->
pair = DOGE/USDT, side = SELL, base quant = 652.4, quant = 4650.3
Error: APIError(code=-1013): Filter failure: LOT_SIZE !!!
Traceback (most recent call last):
File "/root/etf_rebalance_a/execute_index_fund.py", line 283, in
main()
File "/root/etf_rebalance_a/execute_index_fund.py", line 280, in main
raise e
File "/root/etf_rebalance_a/execute_index_fund.py", line 276, in main
return exec(args)
File "/root/etf_rebalance_a/execute_index_fund.py", line 120, in exec
return fund.liquidate(**kwargs)
File "/root/etf_rebalance_a/index_fund.py", line 316, in liquidate
return self.__updatePortfolio(
File "/root/etf_rebalance_a/index_fund.py", line 145, in __updatePortfolio
liquidated_amount = self.__liquidateTrades(liquidate_trades, live_run)
File "/root/etf_rebalance_a/index_fund.py", line 52, in __liquidateTrades
return self.__executeTrades(trades,
File "/root/etf_rebalance_a/index_fund.py", line 47, in __executeTrades
non_self_trades_amount = sum([tradeFunc(symbol[0], symbol[1], quant, live_run)
File "/root/etf_rebalance_a/index_fund.py", line 47, in
non_self_trades_amount = sum([tradeFunc(symbol[0], symbol[1], quant, live_run)
File "/root/etf_rebalance_a/binance_client.py", line 254, in sellOrder
return self.__placeOrder(symbol,
File "/root/etf_rebalance_a/binance_client.py", line 219, in __placeOrder
order = self.client.create_order(symbol=pair,
File "/usr/local/lib/python3.9/dist-packages/binance/client.py", line 1385, in create_order
return self._post('order', True, data=params)
File "/usr/local/lib/python3.9/dist-packages/binance/client.py", line 374, in _post
return self._request_api('post', path, signed, version, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/binance/client.py", line 334, in _request_api
return self._request(method, uri, signed, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/binance/client.py", line 315, in _request
return self._handle_response(self.response)
File "/usr/local/lib/python3.9/dist-packages/binance/client.py", line 324, in _handle_response
raise BinanceAPIException(response, response.status_code, response.text)
binance.exceptions.BinanceAPIException: APIError(code=-1013): Filter failure: LOT_SIZE

same for XRP .. the accound has around 6k USD and it should be rebalanced to 10x 600 usd for each Crypto

Thanks for reporting the issue.

The error code is related to the minimum trading quantity which shouldn't happen given the portfolio.
To help me debug, did you face this error with other currencies?

I will take a look at it this week and get back to you soon.

hi, right now a have this error for doge and xrp. All others are correct

Executing Trades (LIVE) ->
Warn: DOT/USDT quantity less than minimum notional quantity, skipping...
pair = SOL/USDT, side = SELL, base quant = 10.59, quant = 0.10
pair = ADA/USDT, side = BUY, base quant = 13.3, quant = 15.0
pair = AVAX/USDT, side = BUY, base quant = 10.42, quant = 0.14
Warn: BNB/USDT quantity less than minimum notional quantity, skipping...
Warn: BTC/USDT quantity less than minimum notional quantity, skipping...
Warn: ETH/USDT quantity less than minimum notional quantity, skipping...
Warn: LUNA/USDT quantity less than minimum notional quantity, skipping...