Quantity ordered is less than requested

Hi,
I am new to Alpaca so apologies if this is something trivial or already known.

I am trying out an algo via signalstack on paper trading and I find that if I order 1 quantity of ETH, the order goes through, but it actually fills 0.9975 instead of 1. Any ideas as to why it is not exactly 1?

Thanks
-A

as the order is filled at the price you requested it at {is sent} then the “filled qty” is sent back to you if the price is above the share price when requested, “no buyers” the remaining parts of the order is rejected

@arnav_8 What @kris mentioned can happen and that is what is called a partial_fill. The order will remain open and try to fill the remaining portion. This can happen with either market or limit orders. Market orders will typically fill completely within a few minutes, however limit orders may not fill for a while (or ever) if the price remains outside one’s limit price. It’s a good practice when using limit orders to check if it hasn’t filled and either cancel the order or probably better, replace the limit price to a value which will fill.

However, that is not what happened in the case of buying 1 ETH but ending up with .9975 ETH. This is because crypto fees are withdrawn from the ‘final’ currency. The base crypto fee is .25% which is the difference between .9975 and 1.0. If one uses USD to buy ETH (ie USD/ETH) the transaction fee reduces ETH. If one sells ETH to get USD (ie ETH/USD) then the fee reduces the cash or USD in the account. There is more on how fees are handled in the docs here.

1 Like

Makes sense. Thank you @Dan_Whitnable_Alpaca and @kris !
I’ll adjust the algo accordingly.
Thanks again!
-A

1 Like