0

I've been accepting orders on my website for several months using blockchain.info api. Everything worked smoothly until few days ago. At the moment I have two transactions made through api, both seem to get through, but I can't see them in my main wallet. Sent an email to customer support, no answer yet.

https://blockchain.info/address/19USdV4ENhRkcRbmjL2gZWBUPJqhc7xyuW

https://blockchain.info/address/1FApdPwewC8VCNzEJ9SCbECFqf2cPQyqZG

How is it working? How do I get those funds in my main wallet? Am I doing something wrong?

Actually, I recently had the problem with the gap limit. I changed the gap limit to 50 (default is 20) and then made a small payment from my main wallet back to myself to make the gap=0. And after that, these two transactions appeared.

Please advice. Appreciate your assistance.

  • found the reason. it's the gap limit. just paid one of those 20 unpaid transaction and everything is working – raid373 Jan 22 '18 at 9:07
1

The problem

When you make requests from the Receive V2 API, we create new addresses for you sequentially, ensuring that you don’t give two users the same address. If you request several addresses on behalf of your users without any of them making a payment, this will leave empty gaps between addresses with funds. This is fine unless this consecutive empty address gap reaches 21 addresses or more.

Most wallet software will only look ahead 20 addresses from the highest index address it can see (due to the BIP 44 standard we are following). Let’s say you get paid to the first address, address 1 — the wallet will look ahead 2-21 addresses to see if there are any additional funds or transaction history in those addresses. If it doesn’t find anything, it will stop looking. So, if you get paid to address 22, the wallet software will not see the funds because it stopped at 21. However, if you get paid to address 2, the wallet software will look ahead addresses 3-22, see the funds that were sent to the address 22, and then look an additional 20 ahead (addresses 23 – 43).

How to know if you’re affected

You can call the checkgap API via the following endpoint:

https://api.blockchain.info/v2/receive/checkgap?xpub={xpub}&key={apikey}

You’ll get a JSON response that looks like:

{ “gap”: 1 }

This gap value represents the difference between the index of the most recent address paid to, and the most recently-requested address. If that value is 20 or greater, funds paid to any further addresses created will be hard to access until earlier addresses receive funds.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.