Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message: bitget {"code":"12001","msg":"0PUFFER can be used at most"} #438

Open
ugoviti opened this issue Nov 10, 2024 · 10 comments
Open

Message: bitget {"code":"12001","msg":"0PUFFER can be used at most"} #438

ugoviti opened this issue Nov 10, 2024 · 10 comments

Comments

@ugoviti
Copy link

ugoviti commented Nov 10, 2024

Hi,

I'm experiencing an issue with some pairs (bitget exchange):

bot01  | 2024-11-10 16:31:14,187 - freqtrade.freqtradebot - WARNING - Unable to adjust position of trade for PUFFER/USDT: Could not place sell order due to ExchangeError. Message: bitget {"code":"12001","msg":"0PUFFER can be used at most","requestTime":1731252674060,"data":null}

follow a brief of freqtrade log:

bot01  | 2024-11-10 15:50:56,676 - freqtrade.freqtradebot - INFO - Long signal found: about create a new trade for PUFFER/USDT with stake_amount: 183.99439553714998 ...
bot01  | 2024-11-10 15:50:57,123 - freqtrade.freqtradebot - INFO - Order 1239518905938046976 was created for PUFFER/USDT and status is open.
bot01  | 2024-11-10 15:50:57,479 - freqtrade.wallets - INFO - Wallets synced.
bot01  | 2024-11-10 15:50:57,481 - freqtrade.rpc.rpc_manager - INFO - Sending rpc message: {'trade_id': 12, 'type': entry, 'buy_tag': '6 ', 'enter_tag': '6 ', 'exchange': 'Bitget', 'pair': 'PUFFER/USDT', 'leverage': 1.0, 'direction': 'Long', 'limit': 0.3873, 'open_rate': 0.3873, 'order_type': 'limit', 'stake_amount': 183.99439553714998, 'stake_currency': 'USDT', 'base_currency': 'PUFFER', 'quote_currency': 'USDT', 'fiat_currency': 'USD', 'amount': 0.0, 'open_date': datetime.datetime(2024, 11, 10, 14, 50, 57, 123253, tzinfo=datetime.timezone.utc), 'current_rate': 0.3873, 'sub_trade': False}
bot01  | 2024-11-10 15:50:57,578 - freqtrade.worker - INFO - Bot heartbeat. PID=1, version='2024.10, strategy_version: v15.1.206', state='RUNNING'
bot01  | 2024-11-10 15:50:58,000 - freqtrade.freqtradebot - INFO - Found open order for Trade(id=12, pair=PUFFER/USDT, amount=0.00000000, is_short=False, leverage=1.0, open_rate=0.38730000, open_since=2024-11-10 14:50:57)
bot01  | 2024-11-10 15:51:03,049 - freqtrade.freqtradebot - INFO - Found open order for Trade(id=12, pair=PUFFER/USDT, amount=0.00000000, is_short=False, leverage=1.0, open_rate=0.38730000, open_since=2024-11-10 14:50:57)
bot01  | 2024-11-10 15:51:08,041 - freqtrade.freqtradebot - INFO - Found open order for Trade(id=12, pair=PUFFER/USDT, amount=0.00000000, is_short=False, leverage=1.0, open_rate=0.38730000, open_since=2024-11-10 14:50:57)
bot01  | 2024-11-10 15:51:13,024 - freqtrade.freqtradebot - INFO - Found open order for Trade(id=12, pair=PUFFER/USDT, amount=0.00000000, is_short=False, leverage=1.0, open_rate=0.38730000, open_since=2024-11-10 14:50:57)
bot01  | 2024-11-10 15:51:13,293 - freqtrade.freqtradebot - INFO - Fee for Trade Trade(id=12, pair=PUFFER/USDT, amount=0.00000000, is_short=False, leverage=1.0, open_rate=0.38730000, open_since=2024-11-10 14:50:57) [buy]: 0.11383794 BGB - rate: 0.0008
bot01  | 2024-11-10 15:51:13,293 - freqtrade.persistence.trade_model - INFO - Updating trade (id=12) ...
bot01  | 2024-11-10 15:51:13,294 - freqtrade.persistence.trade_model - INFO - LIMIT_BUY has been fulfilled for Trade(id=12, pair=PUFFER/USDT, amount=475.06000000, is_short=False, leverage=1.0, open_rate=0.38730000, open_since=2024-11-10 14:50:57).
bot01  | 2024-11-10 15:51:13,720 - freqtrade.wallets - INFO - Wallets synced.
bot01  | 2024-11-10 15:51:13,722 - freqtrade.rpc.rpc_manager - INFO - Sending rpc message: {'trade_id': 12, 'type': entry_fill, 'buy_tag': '6 ', 'enter_tag': '6 ', 'exchange': 'Bitget', 'pair': 'PUFFER/USDT', 'leverage': 1.0, 'direction': 'Long', 'limit': 0.3873, 'open_rate': 0.3873, 'order_type': 'limit', 'stake_amount': 183.990738, 'stake_currency': 'USDT', 'base_currency': 'PUFFER', 'quote_currency': 'USDT', 'fiat_currency': 'USD', 'amount': 475.06, 'open_date': datetime.datetime(2024, 11, 10, 14, 50, 57, 123253, tzinfo=datetime.timezone.utc), 'current_rate': 0.3873, 'sub_trade': False}
bot01  | 2024-11-10 15:51:57,580 - freqtrade.worker - INFO - Bot heartbeat. PID=1, version='2024.10, strategy_version: v15.1.206', state='RUNNING'
bot01  | 2024-11-10 16:07:17,266 - NostalgiaForInfinityX5 - INFO - Grinding entry (g6) [2024-11-10 15:07:16.989503+00:00] [PUFFER/USDT] | Rate: 0.3786 | Stake amount: 9.1995369 | Profit (stake): -4.661440739200003 | Profit: -2.53% | Grind profit: 0.00% (0.0 USDT)
bot01  | 2024-11-10 16:07:17,267 - freqtrade.freqtradebot - INFO - Position adjust: about to create a new order for PUFFER/USDT with stake_amount: 9.1995369 for Trade(id=12, pair=PUFFER/USDT, amount=475.06000000, is_short=False, leverage=1.0, open_rate=0.38730000, open_since=2024-11-10 14:50:57)
bot01  | 2024-11-10 16:07:17,713 - freqtrade.freqtradebot - INFO - Order 1239523018788663321 was created for PUFFER/USDT and status is open.
bot01  | 2024-11-10 16:07:18,073 - freqtrade.wallets - INFO - Wallets synced.
bot01  | 2024-11-10 16:07:18,076 - freqtrade.rpc.rpc_manager - INFO - Sending rpc message: {'trade_id': 12, 'type': entry, 'buy_tag': '6 ', 'enter_tag': '6 ', 'exchange': 'Bitget', 'pair': 'PUFFER/USDT', 'leverage': 1.0, 'direction': 'Long', 'limit': 0.3786, 'open_rate': 0.3786, 'order_type': 'limit', 'stake_amount': 183.990738, 'stake_currency': 'USDT', 'base_currency': 'PUFFER', 'quote_currency': 'USDT', 'fiat_currency': 'USD', 'amount': 475.06, 'open_date': datetime.datetime(2024, 11, 10, 14, 50, 57, 123253, tzinfo=datetime.timezone.utc), 'current_rate': 0.3786, 'sub_trade': True}
bot01  | 2024-11-10 16:07:18,076 - freqtrade.freqtradebot - INFO - DCA order open, will wait for resolution: Trade(id=12, pair=PUFFER/USDT, amount=475.06000000, is_short=False, leverage=1.0, open_rate=0.38730000, open_since=2024-11-10 14:50:57)
bot01  | 2024-11-10 16:07:18,220 - freqtrade.rpc.rpc_manager - INFO - Sending rpc strategy_msg: Grinding entry (g6) [PUFFER/USDT] | Rate: 0.3786 | Stake amount: 9.1995369 | Profit (stake): -4.661440739200003 | Profit: -2.53% | Grind profit: 0.00% (0.0 USDT)
bot01  | 2024-11-10 16:07:21,809 - freqtrade.freqtradebot - INFO - Found open order for Trade(id=12, pair=PUFFER/USDT, amount=475.06000000, is_short=False, leverage=1.0, open_rate=0.38730000, open_since=2024-11-10 14:50:57)
bot01  | 2024-11-10 16:07:22,119 - freqtrade.freqtradebot - INFO - Fee for Trade Trade(id=12, pair=PUFFER/USDT, amount=475.06000000, is_short=False, leverage=1.0, open_rate=0.38730000, open_since=2024-11-10 14:50:57) [buy]: 0.0057110349 BGB - rate: 0.00080006
bot01  | 2024-11-10 16:07:22,119 - freqtrade.persistence.trade_model - INFO - Updating trade (id=12) ...
bot01  | 2024-11-10 16:07:22,119 - freqtrade.persistence.trade_model - INFO - LIMIT_BUY has been fulfilled for Trade(id=12, pair=PUFFER/USDT, amount=24.29000000, is_short=False, leverage=1.0, open_rate=0.37860000, open_since=2024-11-10 14:50:57).
bot01  | 2024-11-10 16:07:22,497 - freqtrade.wallets - INFO - Wallets synced.
bot01  | 2024-11-10 16:07:22,499 - freqtrade.rpc.rpc_manager - INFO - Sending rpc message: {'trade_id': 12, 'type': entry_fill, 'buy_tag': '6 ', 'enter_tag': '6 ', 'exchange': 'Bitget', 'pair': 'PUFFER/USDT', 'leverage': 1.0, 'direction': 'Long', 'limit': 0.3786, 'open_rate': 0.3786, 'order_type': 'limit', 'stake_amount': 193.186932, 'stake_currency': 'USDT', 'base_currency': 'PUFFER', 'quote_currency': 'USDT', 'fiat_currency': 'USD', 'amount': 24.29, 'open_date': datetime.datetime(2024, 11, 10, 14, 50, 57, 123253, tzinfo=datetime.timezone.utc), 'current_rate': 0.3786, 'sub_trade': True}
bot01  | 2024-11-10 16:26:27,274 - freqtrade.plugins.pairlistmanager - INFO - Whitelist with 75 pairs: ['BTC/USDT', 'DOGE/USDT', 'ETH/USDT', 'SOL/USDT', 'PEPE/USDT', 'ADA/USDT', 'GRASS/USDT', 'NEIROCTO/USDT', 'CARV/USDT', 'HMSTR/USDT', 'XRP/USDT', 'DOGS/USDT', 'TURBO/USDT', 'SHIB/USDT', 'MOODENG/USDT', 'X/USDT', 'ARB/USDT', 'WIF/USDT', 'SUI/USDT', 'TON/USDT', 'WLD/USDT', 'TAO/USDT', 'AVAX/USDT', 'OP/USDT', 'PUFFER/USDT', 'NOT/USDT', 'LINK/USDT', 'LTC/USDT', 'DRIFT/USDT', 'ORDER/USDT', 'CFX/USDT', 'ZK/USDT', 'FLOKI/USDT', 'BCH/USDT', 'STRK/USDT', 'FET/USDT', 'BANANA/USDT', 'BOME/USDT', 'NEAR/USDT', 'ENA/USDT', 'SLT/USDT', 'SEI/USDT', 'KAS/USDT', 'IO/USDT', 'LDO/USDT', 'GOAT/USDT', 'RUNE/USDT', 'ONDO/USDT', 'DOT/USDT', 'LPT/USDT', 'PEOPLE/USDT', 'NAKA/USDT', 'MOCA/USDT', 'LISTA/USDT', 'TRX/USDT', 'ENS/USDT', 'CATI/USDT', 'ZRO/USDT', 'SUNDOG/USDT', 'ETC/USDT', 'GALA/USDT', 'UXLINK/USDT', 'APT/USDT', 'LUCE/USDT', 'FIL/USDT', 'EIGEN/USDT', 'APU/USDT', 'RAY/USDT', 'CATS/USDT', 'ACT/USDT', 'TIA/USDT', 'FTM/USDT', 'DBR/USDT', 'ATOM/USDT', 'INJ/USDT']
bot01  | 2024-11-10 16:31:13,396 - NostalgiaForInfinityX5 - INFO - Grinding exit (g6) [2024-11-10 15:31:13.084447+00:00] [PUFFER/USDT] | Rate: 0.3866 | Stake amount: 9.390514 | Coin amount: 24.29 | Profit (stake): -0.44723368773853167 | Profit: -0.23% | Grind profit: 2.11% (0.1984260750132053 USDT)
bot01  | 2024-11-10 16:31:13,758 - freqtrade.wallets - INFO - Wallets synced.
bot01  | 2024-11-10 16:31:14,187 - freqtrade.freqtradebot - WARNING - Unable to adjust position of trade for PUFFER/USDT: Could not place sell order due to ExchangeError. Message: bitget {"code":"12001","msg":"0PUFFER can be used at most","requestTime":1731252674060,"data":null}
bot01  | 2024-11-10 16:31:15,322 - NostalgiaForInfinityX5 - INFO - Grinding exit (g6) [2024-11-10 15:31:15.054130+00:00] [PUFFER/USDT] | Rate: 0.3866 | Stake amount: 9.390514 | Coin amount: 24.29 | Profit (stake): -0.44723368773853167 | Profit: -0.23% | Grind profit: 2.11% (0.1984260750132053 USDT)
bot01  | 2024-11-10 16:31:15,734 - freqtrade.wallets - INFO - Wallets synced.
bot01  | 2024-11-10 16:31:16,135 - freqtrade.freqtradebot - WARNING - Unable to adjust position of trade for PUFFER/USDT: Could not place sell order due to ExchangeError. Message: bitget {"code":"12001","msg":"0PUFFER can be used at most","requestTime":1731252676006,"data":null}
bot01  | 2024-11-10 16:31:40,778 - freqtrade.wallets - INFO - Wallets synced.
bot01  | 2024-11-10 16:31:41,172 - freqtrade.freqtradebot - WARNING - Unable to adjust position of trade for PUFFER/USDT: Could not place sell order due to ExchangeError. Message: bitget {"code":"12001","msg":"0PUFFER can be used at most","requestTime":1731252701049,"data":null}
bot01  | 2024-11-10 16:31:45,348 - NostalgiaForInfinityX5 - INFO - Grinding exit (g6) [2024-11-10 15:31:45.062034+00:00] [PUFFER/USDT] | Rate: 0.3867 | Stake amount: 9.392942999999999 | Coin amount: 24.29 | Profit (stake): -0.39733863873462383 | Profit: -0.21% | Grind profit: 2.14% (0.200958368462756 USDT)
bot01  | 2024-11-10 16:31:45,727 - freqtrade.wallets - INFO - Wallets synced.
bot01  | 2024-11-10 16:31:46,127 - freqtrade.freqtradebot - WARNING - Unable to adjust position of trade for PUFFER/USDT: Could not place sell order due to ExchangeError. Message: bitget {"code":"12001","msg":"0PUFFER can be used at most","requestTime":1731252706008,"data":null}
bot01  | 2024-11-10 16:31:50,321 - NostalgiaForInfinityX5 - INFO - Grinding exit (g6) [2024-11-10 15:31:50.050260+00:00] [PUFFER/USDT] | Rate: 0.3864 | Stake amount: 9.385656 | Coin amount: 24.29 | Profit (stake): -0.5470237857463189 | Profit: -0.28% | Grind profit: 2.06% (0.1933653375594288 USDT)
bot01  | 2024-11-10 16:31:50,791 - freqtrade.wallets - INFO - Wallets synced.

why if the pair is PUFFER/USDT bitget complain about 0PUFFER ? is a ccxt/bitget problem?

how I exclude the problematic pairs from the trading list? (It seems to only happen with new listed pairs and place sell orders)

this is another pair: LUCE/USDT

bot01  | 2024-11-10 20:34:05,829 - NostalgiaForInfinityX5 - INFO - Grinding exit (g1) [2024-11-10 19:34:05.551598+00:00] [LUCE/USDT] | Rate: 0.05606 | Stake amount: 41.2736144 | Coin amount: 736.24 | Profit (stake): -14.925307795066345 | Profit: -5.96% | Grind profit: 1.96% (0.8107585222262677 USDT)
bot01  | 2024-11-10 20:34:06,216 - freqtrade.wallets - INFO - Wallets synced.
bot01  | 2024-11-10 20:34:06,626 - freqtrade.freqtradebot - WARNING - Unable to adjust position of trade for LUCE/USDT: Could not place sell order due to ExchangeError. Message: bitget {"code":"12001","msg":"0LUCE can be used at most","requestTime":1731267246504,"data":null}

Thank you for the support

Kind Regards

@iterativv
Copy link
Owner

Hi. I never seen this before. Make sure you update FT & NFI and restart the bot first ?

@iterativv
Copy link
Owner

Also, those trades should have exited completely, no ? Is there an issue with the exit in some way, in general ?

@ugoviti
Copy link
Author

ugoviti commented Nov 14, 2024

Hi. I never seen this before. Make sure you update FT & NFI and restart the bot first ?

Yes absolutely, first used official Freqtrade from docker hub freqtradeorg/freqtrade:2024.10, then rebuilded also with latest release on 11/11/2024, same results, the bot is unable to find the pair when placing a sell order.

follow other coin examples:

bot01  | 2024-11-14 07:29:46,882 - freqtrade.freqtradebot - WARNING - Unable to exit trade SEI/USDT: Could not place sell order due to ExchangeError. Message: bitget {"code":"12001","msg":"0SEI can be used at most","requestTime":1731565786765,"data":null}
bot01  | 2024-11-14 07:29:51,970 - freqtrade.freqtradebot - WARNING - Unable to exit trade SEI/USDT: Could not place sell order due to ExchangeError. Message: bitget {"code":"12001","msg":"0SEI can be used at most","requestTime":1731565791853,"data":null}
bot01  | 2024-11-14 07:29:57,112 - freqtrade.freqtradebot - WARNING - Unable to exit trade SEI/USDT: Could not place sell order due to ExchangeError. Message: bitget {"code":"12001","msg":"0SEI can be used at most","requestTime":1731565796984,"data":null}
bot01  | 2024-11-14 10:24:52,626 - freqtrade.freqtradebot - WARNING - Unable to adjust position of trade for PUFFER/USDT: Could not place sell order due to ExchangeError. Message: bitget {"code":"12001","msg":"0PUFFER can be used at most","requestTime":1731576292480,"data":null}
bot01  | 2024-11-14 10:24:53,986 - freqtrade.freqtradebot - WARNING - Unable to adjust position of trade for BOME/USDT: Could not place sell order due to ExchangeError. Message: bitget {"code":"12001","msg":"0BOME can be used at most","requestTime":1731576293850,"data":null}
bot01  | 2024-11-14 10:24:57,815 - freqtrade.freqtradebot - WARNING - Unable to adjust position of trade for PUFFER/USDT: Could not place sell order due to ExchangeError. Message: bitget {"code":"12001","msg":"0PUFFER can be used at most","requestTime":1731576297684,"data":null}
bot01  | 2024-11-14 10:24:59,191 - freqtrade.freqtradebot - WARNING - Unable to adjust position of trade for BOME/USDT: Could not place sell order due to ExchangeError. Message: bitget {"code":"12001","msg":"0BOME can be used at most","requestTime":1731576299071,"data":null}

Also, those trades should have exited completely, no ? Is there an issue with the exit in some way, in general ?

Moreover forcing exit from freqtrade UI doesn't works... the coin reimain in the spot market.

tryed with "Forceexit limit", "Forceexit market", "Forceexit partial", none of these works.

The only way to sell the coin is from Exchange it self, so I must monitor the log freqtrade bot for that messages and sell by hand the problematic pairs.

I think this is a problem with Bitget Exchange, because other pairs doesn't have these problems.

I also opened the same issue in the freqtrade project issue traking

follow open/closed trades screenshot and PUFFER/USDT buy history

Schermata_20241114_102950

Schermata_20241114_103042

Not tryed same pairs with other strategy at moment, anyway I don't think this is a NostalgiaForInfinity issue.

Thank You for the feedback

@iterativv
Copy link
Owner

Yes, it's exchange connection API issue. You checked your settings, what you allow through your API key ?

@ugoviti
Copy link
Author

ugoviti commented Nov 15, 2024

Yes just verified, the API key have Read-write permissions on:

  • Futures|OrdersFutures|HoldingsSpot|TradeMargin|TradeCopy trading|Trade

After freqtrade restart, if I try to force exit by hand of the BOME trade, I get the following exception in freqtrade logs:

bot01 | requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.bitget.com/api/v2/spot/trade/place-order

Follow the full log:

bot01  | 2024-11-15 23:31:14,347 - freqtrade.persistence.trade_model - INFO - Found open trade: Trade(id=12, pair=PUFFER/USDT, amount=899.51000000, is_short=False, leverage=1.0, open_rate=0.35315113, open_since=2024-11-10 14:50:57)
bot01  | 2024-11-15 23:31:14,347 - freqtrade.persistence.trade_model - INFO - Found open trade: Trade(id=18, pair=BOME/USDT, amount=3187.90000000, is_short=False, leverage=1.0, open_rate=0.01013347, open_since=2024-11-12 09:50:59)
bot01  | 2024-11-15 23:31:14,347 - freqtrade.persistence.trade_model - INFO - Found open trade: Trade(id=19, pair=SEI/USDT, amount=178.83000000, is_short=False, leverage=1.0, open_rate=0.46948000, open_since=2024-11-12 10:06:09)
bot01  | 2024-11-15 23:31:14,347 - freqtrade.persistence.trade_model - INFO - Found open trade: Trade(id=20, pair=LDO/USDT, amount=76.22350000, is_short=False, leverage=1.0, open_rate=1.18322614, open_since=2024-11-12 10:06:11)
bot01  | 2024-11-15 23:31:14,348 - freqtrade.freqtradebot - INFO - Updating 0 open orders.
bot01  | 2024-11-15 23:32:50,659 - freqtrade.wallets - INFO - Wallets synced.
bot01  | 2024-11-15 23:32:51,101 - uvicorn.error - ERROR - Exception in ASGI application
bot01  | Traceback (most recent call last):
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/ccxt/base/exchange.py", line 568, in fetch
bot01  |     response.raise_for_status()
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status
bot01  |     raise HTTPError(http_error_msg, response=self)
bot01  | requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.bitget.com/api/v2/spot/trade/place-order
bot01  | 
bot01  | During handling of the above exception, another exception occurred:
bot01  | 
bot01  | Traceback (most recent call last):
bot01  |   File "/freqtrade/freqtrade/exchange/exchange.py", line 1269, in create_order
bot01  |     order = self._api.create_order(
bot01  |             ^^^^^^^^^^^^^^^^^^^^^^^
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/ccxt/bitget.py", line 4026, in create_order
bot01  |     response = self.privateSpotPostV2SpotTradePlaceOrder(request)
bot01  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/ccxt/base/types.py", line 35, in unbound_method
bot01  |     return _self.request(self.path, self.api, self.method, params, config=self.config)
bot01  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/ccxt/base/exchange.py", line 4107, in request
bot01  |     return self.fetch2(path, api, method, params, headers, body, config)
bot01  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/ccxt/base/exchange.py", line 4103, in fetch2
bot01  |     raise e
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/ccxt/base/exchange.py", line 4094, in fetch2
bot01  |     return self.fetch(request['url'], request['method'], request['headers'], request['body'])
bot01  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/ccxt/base/exchange.py", line 584, in fetch
bot01  |     skip_further_error_handling = self.handle_errors(http_status_code, http_status_text, url, method, headers, http_response, json_response, request_headers, request_body)
bot01  |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/ccxt/bitget.py", line 8387, in handle_errors
bot01  |     raise ExchangeError(feedback)  # unknown message
bot01  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bot01  | ccxt.base.errors.ExchangeError: bitget {"code":"12001","msg":"0BOME can be used at most","requestTime":1731709970950,"data":null}
bot01  | 
bot01  | The above exception was the direct cause of the following exception:
bot01  | 
bot01  | Traceback (most recent call last):
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/uvicorn/protocols/http/h11_impl.py", line 406, in run_asgi
bot01  |     result = await app(  # type: ignore[func-returns-value]
bot01  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
bot01  |     return await self.app(scope, receive, send)
bot01  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/fastapi/applications.py", line 1054, in __call__
bot01  |     await super().__call__(scope, receive, send)
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/starlette/applications.py", line 113, in __call__
bot01  |     await self.middleware_stack(scope, receive, send)
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/starlette/middleware/errors.py", line 187, in __call__
bot01  |     raise exc
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/starlette/middleware/errors.py", line 165, in __call__
bot01  |     await self.app(scope, receive, _send)
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/starlette/middleware/cors.py", line 93, in __call__
bot01  |     await self.simple_response(scope, receive, send, request_headers=headers)
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/starlette/middleware/cors.py", line 144, in simple_response
bot01  |     await self.app(scope, receive, send)
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
bot01  |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
bot01  |     raise exc
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
bot01  |     await app(scope, receive, sender)
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/starlette/routing.py", line 715, in __call__
bot01  |     await self.middleware_stack(scope, receive, send)
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/starlette/routing.py", line 735, in app
bot01  |     await route.handle(scope, receive, send)
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/starlette/routing.py", line 288, in handle
bot01  |     await self.app(scope, receive, send)
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/starlette/routing.py", line 76, in app
bot01  |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
bot01  |     raise exc
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
bot01  |     await app(scope, receive, sender)
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/starlette/routing.py", line 73, in app
bot01  |     response = await f(request)
bot01  |                ^^^^^^^^^^^^^^^^
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/fastapi/routing.py", line 301, in app
bot01  |     raw_response = await run_endpoint_function(
bot01  |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/fastapi/routing.py", line 214, in run_endpoint_function
bot01  |     return await run_in_threadpool(dependant.call, **values)
bot01  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/starlette/concurrency.py", line 39, in run_in_threadpool
bot01  |     return await anyio.to_thread.run_sync(func, *args)
bot01  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/anyio/to_thread.py", line 56, in run_sync
bot01  |     return await get_async_backend().run_sync_in_worker_thread(
bot01  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 2441, in run_sync_in_worker_thread
bot01  |     return await future
bot01  |            ^^^^^^^^^^^^
bot01  |   File "/home/ftuser/.local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 943, in run
bot01  |     result = context.run(func, *args)
bot01  |              ^^^^^^^^^^^^^^^^^^^^^^^^
bot01  |   File "/freqtrade/freqtrade/rpc/api_server/api_v1.py", line 258, in forceexit
bot01  |     return rpc._rpc_force_exit(str(payload.tradeid), ordertype, amount=payload.amount)
bot01  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bot01  |   File "/freqtrade/freqtrade/rpc/rpc.py", line 934, in _rpc_force_exit
bot01  |     result = self.__exec_force_exit(trade, ordertype, amount)
bot01  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bot01  |   File "/freqtrade/freqtrade/rpc/rpc.py", line 896, in __exec_force_exit
bot01  |     self._freqtrade.execute_trade_exit(
bot01  |   File "/freqtrade/freqtrade/freqtradebot.py", line 2022, in execute_trade_exit
bot01  |     order = self.exchange.create_order(
bot01  |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
bot01  |   File "/freqtrade/freqtrade/exchange/exchange.py", line 1303, in create_order
bot01  |     raise TemporaryError(
bot01  | freqtrade.exceptions.TemporaryError: Could not place sell order due to ExchangeError. Message: bitget {"code":"12001","msg":"0BOME can be used at most","requestTime":1731709970950,"data":null}

@iterativv
Copy link
Owner

Yes just verified, the API key have Read-write permissions on:

Try to make a new API, maybe ? And use it.

@ugoviti
Copy link
Author

ugoviti commented Nov 25, 2024

Hi,

I'm running some tests, and it seems (for now) that this error occurs due to an interaction between the Elite Trader function of Bitget and certain altcoins. Now in the Elite Trader section of Bitget, I have disabled many less popular coins, and since making this change, I have not received any more API 12001 errors when trading. It's too early to draw conclusions, but I will update you once I've conducted more tests. For now, however, it seems to be a Bitget issue related to how it handles sell orders.

Thank you for the support

@jrhugman
Copy link

Hi I'm having the same issue, could you post the list of pairs you have disabled please?

@ugoviti
Copy link
Author

ugoviti commented Dec 10, 2024

Hi, now I can report that this problem occurs with some pairs but only if Elite Trader is enabled on Bitget.
If I deactivate all the pairs from the elite trader section, this problem no longer occurs.
I imagine that it depends on the type of exit signal that is generated by freqtrade and that is not supported by bitget when the trade is linked to a copy trading pair.
Are there options for freqtrade that modify the method with which exit signals are managed in relation to the exchange? (limit, market, etc...)

However, I confirm that by deactivating as elite trader, or by deactivating the associated pairs, this problem disappears.

Thanks

@jrhugman
Copy link

Thanks for the quick reply :D. Ive disabled Elite Trader mode. Was hoping to get the best of both worlds but if its not going to work it is what it is. Might just be a case of waiting for bitget to sort their API out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants