<blockquote>
  <p>both return an index of 0. </p>
</blockquote>

<p>0 is the correct answer here.</p>

<blockquote>
  <p>Am I missing something here?</p>
</blockquote>

<p>Not sure.</p>

<p>I can't reproduce your problem. I'm querying blocktrail like this:</p>

<pre><code>curl https://api.blocktrail.com/v1/tbtc/address/2N6qMqR9D4BTkD6fS1h6Sq3kRV2FeB1L14j/transactions?api_key=MY_APIKEY
</code></pre>

<p>and that returns all of the transactions for the address, none of which have an index of 4.</p>

<p>Can you post the line of code that calls their API?</p>

CC BY-SA 3.0
2017-10-13T10:34:34.703Z
Thanks for taking the time to look into this! It turns out that I was querying for address instead of transaction (js):
`blocktrailClient.address((2N6qMqR9D4BTkD6fS1h6Sq3kRV2FeB1L14j), (err, address) => {console.log(address)})`
timothyylim
CC BY-SA 3.0
2017-10-12T20:02:55.293Z
2017-10-12T20:02:55.293Z
Nick ODell
<p>I've been using <a href="https://www.blocktrail.com/api/docs/lang/nodejs#data_overview" rel="nofollow noreferrer">Blocktrail's API</a>:</p>

<p><a href="https://www.blocktrail.com/api/docs/lang/nodejs#data_overview" rel="nofollow noreferrer">https://www.blocktrail.com/api/docs/lang/nodejs#data_overview</a></p>

<p>to get data for the following unspent address on the testnet: </p>

<p>2N6qMqR9D4BTkD6fS1h6Sq3kRV2FeB1L14j.</p>

<p>Blocktrail's API returns the index as 4, whereas blockexplorer's:</p>

<p><a href="https://testnet.blockexplorer.com/api/addr/2N6qMqR9D4BTkD6fS1h6Sq3kRV2FeB1L14j/utxo" rel="nofollow noreferrer">https://testnet.blockexplorer.com/api/addr/2N6qMqR9D4BTkD6fS1h6Sq3kRV2FeB1L14j/utxo</a></p>

<p>and smartbit's APIs:</p>

<p><a href="https://testnet-api.smartbit.com.au/v1/blockchain/address/2N6qMqR9D4BTkD6fS1h6Sq3kRV2FeB1L14j/unspent" rel="nofollow noreferrer">https://testnet-api.smartbit.com.au/v1/blockchain/address/2N6qMqR9D4BTkD6fS1h6Sq3kRV2FeB1L14j/unspent</a></p>

<p>both return an index of 0. Am I missing something here?</p>

<api><utxo><blocktrail>
Why does unspent address index differ between APIs?
timothyylim
# Why does unspent address index differ between APIs?

(Asked by: username_0 on 2017-10-12)

I've been using [Blocktrail's API](https://www.blocktrail.com/api/docs/lang/nodejs#data_overview):

<https://www.blocktrail.com/api/docs/lang/nodejs#data_overview>

to get data for the following unspent address on the testnet:

2N6qMqR9D4BTkD6fS1h6Sq3kRV2FeB1L14j.

Blocktrail's API returns the index as 4, whereas blockexplorer's:

<https://testnet.blockexplorer.com/api/addr/2N6qMqR9D4BTkD6fS1h6Sq3kRV2FeB1L14j/utxo>

and smartbit's APIs:

<https://testnet-api.smartbit.com.au/v1/blockchain/address/2N6qMqR9D4BTkD6fS1h6Sq3kRV2FeB1L14j/unspent>

both return an index of 0. Am I missing something here?

**Tags:** api, utxo, blocktrail


---

## 1 answers

### Answer by username_1 on 2017-10-12. Score: 2 | Accepted answer

> both return an index of 0.

0 is the correct answer here.

> Am I missing something here?

Not sure.

I can't reproduce your problem. I'm querying blocktrail like this:

```
curl https://api.blocktrail.com/v1/tbtc/address/2N6qMqR9D4BTkD6fS1h6Sq3kRV2FeB1L14j/transactions?api_key=MY_APIKEY

```

and that returns all of the transactions for the address, none of which have an index of 4.

Can you post the line of code that calls their API?

> **Comments:**
> **username_0**: Thanks for taking the time to look into this! It turns out that I was querying for address instead of transaction (js): `blocktrailClient.address((2N6qMqR9D4BTkD6fS1h6Sq3kRV2FeB1L14j), (err, address) => {console.log(address)})`  

---

