What options do I have to avoid API gap limit? I am using xpub keys
Issues related to gap limit as summarized in this blog post. Basically you have few options


Use wallets like electrum to increase gap limit setting
Automatically send small amount of funds to 20th unsued address to keep things going. This is done by services like blockonomics
Keep generating new address without worrying about gap limit. Later you can generate all private keys using xprv and sweep in the funds from all private keys.