<p><strong>The problem</strong></p>

<p>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.</p>

<p>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).</p>

<p><strong>How to know if you’re affected</strong></p>

<p>You can call the checkgap API via the following endpoint:</p>

<p><a href="https://api.blockchain.info/v2/receive/checkgap?xpub=" rel="nofollow noreferrer">https://api.blockchain.info/v2/receive/checkgap?xpub=</a>{xpub}&amp;key={apikey}</p>

<p>You’ll get a JSON response that looks like:</p>

<pre><code>{ “gap”: 1 }
</code></pre>

<p>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.</p>

CC BY-SA 3.0
2018-01-22T11:06:28.903Z
2018-01-22T11:06:28.903Z
Tailer
<p>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.</p>

<p><a href="https://blockchain.info/address/19USdV4ENhRkcRbmjL2gZWBUPJqhc7xyuW" rel="nofollow noreferrer">https://blockchain.info/address/19USdV4ENhRkcRbmjL2gZWBUPJqhc7xyuW</a></p>

<p><a href="https://blockchain.info/address/1FApdPwewC8VCNzEJ9SCbECFqf2cPQyqZG" rel="nofollow noreferrer">https://blockchain.info/address/1FApdPwewC8VCNzEJ9SCbECFqf2cPQyqZG</a></p>

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

<p>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.</p>

<p>Please advice. Appreciate your assistance.</p>

CC BY-SA 3.0
2018-01-22T09:07:20.553Z
found the reason. it's the gap limit. just paid one of those 20 unpaid transaction and everything is working
raid373
<wallet><blockchain.info><api>
blockchain.info wallet doesn't show transactions made through api
raid373
# blockchain.info wallet doesn't show transactions made through api

(Asked by: username_0 on 2018-01-22)

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.

**Tags:** wallet, blockchain.info, api

> **Comments:**
> **username_0**: found the reason. it's the gap limit. just paid one of those 20 unpaid transaction and everything is working  

---

## 1 answers

### Answer by username_1 on 2018-01-22. Score: 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.


---

