Skip to content

Commit

Permalink
[skip ci] remove some fixmes
Browse files Browse the repository at this point in the history
  • Loading branch information
btschwertfeger committed Jan 12, 2025
1 parent b467b87 commit e546127
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/kraken_infinity_grid/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ def run(ctx: Context, **kwargs: dict) -> None:
ctx.obj |= kwargs

if ctx.obj["sqlite_file"]:
# FIXME: Maybe use in_memory for dry-run?
db_config = {"sqlite_file": ctx.obj["sqlite_file"]}
else:
db_config = {
Expand Down
7 changes: 3 additions & 4 deletions src/kraken_infinity_grid/gridbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,22 +108,22 @@ class KrakenInfinityGridBot(SpotWSClient):
New execution message - new order:
- If the init is not done yet, the algorithm ignores the message. FIXME
- If the init is not done yet, the algorithm ignores the message.
- The algorithm ties to assign the new order to the orderbook. In some cases
this fails, as newly placed orders may not be fetchable via REST API for
some time. For this reason, there are some retries implemented.
New execution message - filled order:
- If the init is not done yet, the algorithm ignores the message. FIXME
- If the init is not done yet, the algorithm ignores the message.
- If the filled order was a buy order (depending on the strategy), the
algorithm places a sell order and updates the local orderbook.
- If the filled order was a sell order (depending on the strategy), the
algorithm places a buy order and updates the local orderbook.
New execution message - cancelled order:
- If the init is not done yet, the algorithm ignores the message. FIXME
- If the init is not done yet, the algorithm ignores the message.
- The algorithm removes the order from the local orderbook and ensures that
in case of a partly filled order, the remaining volume is saved and placed
as sell order somewhen later (if it was a buy order). Sell orders usually
Expand Down Expand Up @@ -312,7 +312,6 @@ async def on_message( # noqa: C901,PLR0912,PLR0911
)

except Exception as exc: # noqa: BLE001
# FIXME: this is not a beauty
LOG.error(msg="Exception while processing message.", exc_info=exc)
self.save_exit(reason=traceback.format_exc())

Expand Down
4 changes: 2 additions & 2 deletions src/kraken_infinity_grid/order_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ def check_price_range(self: OrderManager) -> None:
LOG.debug("Check conditions for upgrading the grid...")

if self.__check_pending_txids():
# FIXME: This should not return here, but need to be checked first.
LOG.debug("Not checking price range because of pending txids.")
return

Expand Down Expand Up @@ -755,7 +754,8 @@ def cancel_all_open_buy_orders(self: OrderManager) -> None:

self.__s.orderbook.remove(filters={"side": "buy"})
except Exception: # noqa: BLE001
# FIXME: Check if this can still happen.
# FIXME: Check if this can still happen. Can't remember why this
# was added.
self.__s.save_exit(
str(
f"❌ Error in function >cancelAllOpenBuyOrders < \n"
Expand Down

0 comments on commit e546127

Please sign in to comment.