Hello! Long time lurker first time poster
I'm writing a program that uses both the Bitstamp and the GDAX API to make limit orders (see & buy).
I'm a little confused as to where the fee calculation comes in. Do I calculate it before the API call, or is it calculated by the exchange post ex facto?
i.e on Bitstamp, would put in a sell of 10LTC, or 9.975LTC at the current Bid price (0.25%)?
on GDAX, would I put in a buy of 1BTC or 0.975BTC at the current Ask price? (0.30%)?
The reason I ask is that often after a trade, I appear to have a small amount of "change" left over - however, when putting in an order at current Bid/Ask I'm often met with an error about insufficient funds.
Any help would be greatly appreciated.
Many Thanks