Skip to content
This repository was archived by the owner on Feb 1, 2024. It is now read-only.
This repository was archived by the owner on Feb 1, 2024. It is now read-only.

Infinite loop when encounters a trade that is different from base/quote asset #770

@ddombrowsky

Description

@ddombrowsky

There is an infinite loop when the bot encounters a trade from a different pair on the account. This happens to me often since I switch between bots on the same stellar account (not running them simultaneously).

I would expect it to just ignore the trade and move on.

Frequency: this happens every time I switch from one pair to another.

2022/09/30 16:39:04 encountered a trade (ID=184281168177836033-0) that is different from the base and quote asset (:/WFTM:GAEDZ7BHMDYEMU6IJT3CTTGDUSLZWS5CQWZHGP4XUOIDG5ISH3AFAEK2) on the bot or uses a different trading account, botTraderAccount=GDWJONB4JX6C3Y3MQSYGHMAI2L2BYFZ2D6UENO4YIHF26X5PGZKJER77 (tradeBaseAccount=GAITTRFFPHN76ETLGET52ZXZJRELJ56B32X46OOGLG3SIC5RBC5BYT4E, tradeCounterAccount=GDWJONB4JX6C3Y3MQSYGHMAI2L2BYFZ2D6UENO4YIHF26X5PGZKJER77)
2022/09/30 16:39:04 continuing to fetch trades from the new updated cursor (184281142407536641-1) because we did not hit a stoppping condition, (numFetchedTrades = 0, total len(trades) = 0, sdexTradesFetchLimit = 200; hitCursorEnd=false, hitRateLimit=false)
2022/09/30 16:39:04 returned from fetch trades API call for SDEX using cursor '184281142407536641-1' (len(records) = 1, error = <nil>)
2022/09/30 16:39:04 encountered a trade (ID=184281168177836033-0) that is different from the base and quote asset (:/WFTM:GAEDZ7BHMDYEMU6IJT3CTTGDUSLZWS5CQWZHGP4XUOIDG5ISH3AFAEK2) on the bot or uses a different trading account, botTraderAccount=GDWJONB4JX6C3Y3MQSYGHMAI2L2BYFZ2D6UENO4YIHF26X5PGZKJER77 (tradeBaseAccount=GAITTRFFPHN76ETLGET52ZXZJRELJ56B32X46OOGLG3SIC5RBC5BYT4E, tradeCounterAccount=GDWJONB4JX6C3Y3MQSYGHMAI2L2BYFZ2D6UENO4YIHF26X5PGZKJER77)
2022/09/30 16:39:04 continuing to fetch trades from the new updated cursor (184281142407536641-1) because we did not hit a stoppping condition, (numFetchedTrades = 0, total len(trades) = 0, sdexTradesFetchLimit = 200; hitCursorEnd=false, hitRateLimit=false)
2022/09/30 16:39:04 returned from fetch trades API call for SDEX using cursor '184281142407536641-1' (len(records) = 1, error = <nil>)
.... and so on, forever ...

It makes the bot unusable until it finally encounters a trade that it expects.

The configuration is using the balanced strategy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions