AndreyMashukov / go-crypto-bot

Multithread crypto bot implemented on Golang
MIT License
34 stars 7 forks source link

Check min profit percent was changed, cancel active limit order if profit percent is changed #21

Closed AndreyMashukov closed 8 months ago

AndreyMashukov commented 8 months ago

https://github.com/AndreyMashukov/go-crypto-bot/blob/5c55cde5ab1f11e0cca92551ec60dd87803f9559/src/service/exchange/order_executor.go#L715

AndreyMashukov commented 8 months ago

IMG_9469

AndreyMashukov commented 8 months ago

In issue #7 we implemented dynamic min profit, but we allow system to keep previously posted order alive until profit is positive, we have to cancel new not filled orders when min profit percent has changed and post new one with new calculated price

AndreyMashukov commented 8 months ago

https://github.com/AndreyMashukov/go-crypto-bot/blob/5c55cde5ab1f11e0cca92551ec60dd87803f9559/src/service/exchange/order_executor.go#L550

Refactoring is required and unit tests