Your Money
341.18-(341.18*.0055)=339.3 after rounding
This means you can definitely exchange 339.3, note that you will only pay commission on the amount you trade, so there can be pennies left over because, for instance:
Your Money
341.18-(339.3+[339.3*.0055])=.01 or .02 after rounding depending on where and when
So, assuming you have 341.18 and can trade 339.3 plus commission, you need to do this math:
Amount of BTC to trade
So you do some algebra:
Amount of BTC to trade = 339.3
For instance, there is currently a sell interest of .95 BTC at $857, so plugging that in:
X=339.3/857
X=0.39591599 after rounding
So in this scenario, you could try to place a buy order for .39591599 BTC at $857, and as long as there is that much BTC for sale at that price or lower, your order will be processed, and then you will have BTC (and a penny or so, the lower the price, the more pennies left).
You can also try to place an order for a lower price, but it may not get filled, and the price may go higher. It's also possible that your order will match a dark order at a lower price and you will end up with more change, but you can presumably perform another transaction if the change is worth messing with the math to you.
If the lowest ask price is for an amount of BTC less than what you want to purchase, and you use that price for your math and order, your order will be partially filled and then sit open, where it may end up far off on price and you may have to cancel it and place another for the remainder. Depending on how much you care about the pennies, you could avoid this by doing the math on a higher ask price or by marking your order fill-or-kill (I think that works like all-or-none and wouldn't do a partial transaction, but I can't guarantee it, as I've never used it). If it didn't fill, then you'd still need to do the math again, though, so I don't think there's really any good reason to mess with fill-or-kill or be worried about a partial execution (since the commission is percent of transaction).