Closing position does not liquidate entire holdings for symbol

Issue:
Purchase order is partially filled. Closing position also is partially performed. Targets are either ETHUSD, BTCUSD, or LTCUSD.

For example, trigger to buy 5 BTCUSD ends up getting filled at 4.985. Plenty of buying power so no explanation why Alpaca chose to not return it filled for the full amount. Sell order triggers and I’m using a liquidation approach so it just calls the base url /v2/positions/BTCUSD which should close out everything in my account for that asset. Result is it liquidates all but 0.0061 BTCUSD. Attempts to close out the position manually return a qty must be >= 0.0001 error.

Is this behavior related to the recent crypto changes and will be getting fixed?

1 Like

Regarding the fill discrepancy that is solved by using the new symbol pattern. ETH/USD, BTC/USD, etc. As noted in the other forum entries regarding the recent crypto changes the positions api is where I’m stuck as since it only accepts the older style of symbols. When they fix the positions api then I’ll revisit to see if the liquidation is back on track.

I’ve got the same problem, even if I do it in alpaca website manually buy and sell its still doesn’t liquidate whole crypto

1 Like

My crypto cannot sell. I am unable to even partially sell.

I’ll update this thread once they fix their end. Since I’m new to Alpaca thought I was missing something, but this is 100% an issue on their end. Appears to me they got their lines crossed when trying to support fractional shares and also crypto assets via the same positions endpoint which doesn’t batch the exit orders how we expect. For example, try to liquid a BTC/USD position and it will get rid of everything except for 0.000095 which then finds us in the position where attempts to clear that off the ledgers hits their API restrictions that you can’t execute an order with the error being qty must be >= 0.0001. Try the same action for ETH/USD and the precision they allow for the sale is almost the same with the error being qty must be >= 0.001. All in all, they must be working on it since this has real implications for customers. Just wish we could get a general idea of when they hope to find a solution.

1 Like

I got a reply from alpaca support team

Thanks for waiting.
We got a confirmation from the engineering team, this is the known limitation. For the record, some other platforms like (cex, binance) have similar limitation where decimal qty remains even after liquidating a position in crypto.

We have started working on crypto prop feature where users can trade quantity less than allowed decimals with FTX.
We will reach you back once the function, thank you
Sincerely,

The Alpaca Support Team

I hope they fix it soon