Second attempt to automatically close positions on Kraken #40
No reviewers
Labels
No labels
blocked
breaking
bug
dependencies
duplicate
enhancement
good first issue
help wanted
question
tech debt
testing
wontfix
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference
scion/arbitrader!40
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "close-kraken-positions"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
It appears that Kraken actually modifies the volume of open positions over time, and requires that the volume match exactly when you place an order to close a position. Arbitrader remembers the volume from when it opened the position, but if the position was open for a few days it may have changed. We're going to remember the order ID and fetch the new volume (if the exchange supports it; not all of them do) and use that to close the position. If anything goes wrong we'll fall back to the volume we used to open the position.
In small scale, short term tests this strategy appears to work. I'm still waiting on a longer term position to close so I can see it "in the wild".
I wasn't able to confirm this fix in the wild like I wanted. The bot has not been trading very frequently lately. Unfortunately a lot of other stuff ended up on this branch and it is now preventing other development. The easiest way forward is to merge this PR and start working on other features. If the Kraken problem re-emerges, I'll do a better job of tackling it in an isolated branch and not blocking feature development.