Sending a transaction using HD wallet was giving sometimes an error like: "Total inputs(x) amount should be equal to total outputs(xx) amount!" which means that it has no funds but in fact there are enough funds distributed between the different addresses.
The issue is fixed now, when you use HD wallet sending transactions Crypto APIs will take care of inputs.
To know what fee you should set, use HD wallet size endpoint and fee per size.