Related PR:
XRPLF/clio#1830
Code snippet:
https://github.com/XRPLF/rippled/blob/develop/src/xrpld/rpc/handlers/GatewayBalances.cpp#L129
rippled does not check the trustline of hotwallet. In PR1830, Clio also removed such check. hot wallet's balance can be 0 sometimes.
When format of hotwallet field is invalid:
api version 1 returns invalidHotWallet
api version >1 returns invalidParams