# GraphQL | Bitcoin - Problem with offset

**URL:** <https://community.bitquery.io/t/graphql-bitcoin-problem-with-offset/1978>\
**Category:** GraphQL API\
**Tags:** support, open\
**Created:** [June 26, 2024, 4:31pm UTC](https://community.bitquery.io/t/graphql-bitcoin-problem-with-offset/1978 "2024-06-26T16:31:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pedro](https://avatars.discourse-cdn.com/v4/letter/p/919ad9/32.png) [@Pedro](https://community.bitquery.io/u/Pedro)\
**Post date:** [June 26, 2024, 4:31pm UTC](https://community.bitquery.io/t/graphql-bitcoin-problem-with-offset/1978/1 "2024-06-26T16:31:33Z")

</div>

Hello im currently trying to get the transaction for this address  
" bc1ql2ek3acvgfxrklcpmuk43hnvpnd7g52arqgf63gs7gfpq2f9seqs40yj65 ".

The problem is when i m trying to test the offset in some cases if i change the offset the result is the same.

Check the prints bellow.

 ![bit_merge](https://us1.discourse-cdn.com/flex016/uploads/bitquery/original/1X/5e621011602a54e810c07c8b5175f5ccffe60093.jpeg)

What am i doing wrong or what is the problem?

---

<div class="post-metadata">

**Author:** ![Divya](https://avatars.discourse-cdn.com/v4/letter/d/13edae/32.png) [@Divya](https://community.bitquery.io/u/Divya)\
**Post date:** [June 28, 2024, 9:24am UTC](https://community.bitquery.io/t/graphql-bitcoin-problem-with-offset/1978/2 "2024-06-28T09:24:27Z")

</div>

@Pedro please share the complete query here as text

---

<div class="post-metadata">

**Author:** ![Pedro](https://avatars.discourse-cdn.com/v4/letter/p/919ad9/32.png) [@Pedro](https://community.bitquery.io/u/Pedro)\
**Post date:** [June 28, 2024, 3:21pm UTC](https://community.bitquery.io/t/graphql-bitcoin-problem-with-offset/1978/3 "2024-06-28T15:21:11Z")

</div>

query ($address: String!, $limit: Int!, $offset: Int!) {  
bitcoin(network: bitcoin) {  
out: coinpath(  
initialAddress: {is: $address}  
options: {direction: outbound, asc: “block.timestamp.unixtime”, limit: $limit, offset: $offset}  
) {  
sender {  
address  
}  
receiver {  
address  
}  
amount  
transaction {  
hash  
valueIn  
valueOut  
}  
block {  
timestamp {  
unixtime  
}  
}  
}  
}  
}

{“address”: “bc1ql2ek3acvgfxrklcpmuk43hnvpnd7g52arqgf63gs7gfpq2f9seqs40yj65”  
, “limit”:1,  
“offset”: 0}

---

<div class="post-metadata">

**Author:** ![Divya](https://avatars.discourse-cdn.com/v4/letter/d/13edae/32.png) [@Divya](https://community.bitquery.io/u/Divya)\
**Post date:** [July 1, 2024, 7:42am UTC](https://community.bitquery.io/t/graphql-bitcoin-problem-with-offset/1978/4 "2024-07-01T07:42:07Z")

</div>

> [@Pedro](#):
>
> {“address”: “bc1ql2ek3acvgfxrklcpmuk43hnvpnd7g52arqgf63gs7gfpq2f9seqs40yj65”  
> , “limit”:1,  
> “offset”: 0}

I can see the offset working,

I tried [bitcoin offset test 1 - Blockchain Data API](https://ide.bitquery.io/bitcoin-offset-test-1)  
and [bitcoin offset test 2 - Blockchain Data API](https://ide.bitquery.io/bitcoin-offset-test-2) .

Let me know if you have questions. Alternatively, you can create a support ticket at [support.bitquery.io](http://support.bitquery.io) for any data issues

---

<div class="post-metadata">

**Author:** ![Pedro](https://avatars.discourse-cdn.com/v4/letter/p/919ad9/32.png) [@Pedro](https://community.bitquery.io/u/Pedro)\
**Post date:** [July 2, 2024, 10:23am UTC](https://community.bitquery.io/t/graphql-bitcoin-problem-with-offset/1978/5 "2024-07-02T10:23:10Z")

</div>

if i set the limit to 13 and offset 0 i get different transfers and values than if i use limit 1 and offset 0 until offset 12. Shouldn’t i get the same ?

example:

offset 0 limit 1  
offset 1 limit 1  
…  
offset 12 limit 1,

all this results should have the same values than if i use  
offset 0 limit 13 ??

---

<div class="post-metadata">

**Author:** ![Divya](https://avatars.discourse-cdn.com/v4/letter/d/13edae/32.png) [@Divya](https://community.bitquery.io/u/Divya)\
**Post date:** [July 3, 2024, 6:36am UTC](https://community.bitquery.io/t/graphql-bitcoin-problem-with-offset/1978/6 "2024-07-03T06:36:22Z")

</div>

@Pedro it is different blocks.  
You are sorting by `asc: "block.timestamp.unixtime"`  
So when it comes to say 13, it’s a different block, so the hash is different.

You can check by adding `height` to your response

```auto
 block {
        timestamp {
          unixtime
        }
        height
      }

```

---

<div class="post-metadata">

**Author:** ![Pedro](https://avatars.discourse-cdn.com/v4/letter/p/919ad9/32.png) [@Pedro](https://community.bitquery.io/u/Pedro)\
**Post date:** [July 3, 2024, 8:50am UTC](https://community.bitquery.io/t/graphql-bitcoin-problem-with-offset/1978/7 "2024-07-03T08:50:52Z")

</div>

Yes, offset 13 is another transaction but until offset 12 is the same block / hash.

limit 12 offset 0 ---------------------------------- limit 1 offset 0 (…) limit 1 offset 12  
“amount”: 0.00007193130905882026, - “amount”: 0.00006449683904334293, limit 1 offset 0  
“amount”: 0.0003840734361349349, - “amount”: 0.00006449683904334293, limit 1 offset 1  
“amount”: 0.00015751498652214014, - “amount”: 0.00007193130905882026, limit 1 offset 2  
“amount”: 0.00041865059465131496, - “amount”: 0.00006449683904334293, limit 1 offset 3  
“amount”: 0.00008982394152517564, - “amount”: 0.00007193130905882026, limit 1 offset 4  
“amount”: 0.00004783246825551918, - “amount”: 0.00007193130905882026, limit 1 offset 5  
“amount”: 0.00004031052440208933, - “amount”: 0.00007193130905882026, limit 1 offset 6  
“amount”: 0.00047305972496303504, - “amount”: 0.00006449683904334293, limit 1 offset 7  
“amount”: 0.21134243596673805, ---- - “amount”: 0.00006449683904334293, limit 1 offset 8  
“amount”: 0.08599600777085017, — - “amount”: 0.00006449683904334293, limit 1 offset 9  
“amount”: 0.00004031052440208933, - “amount”: 0.00006449683904334293, limit 1 offset 10  
“amount”: 0.0005935519134533202, - “amount”: 0.00006449683904334293, limit 1 offset 11  
“amount”: 0.00006449683904334293, - “amount”: 0.00006449683904334293, limit 1 offset 12

On the left side i call all outbound transfers at once, in the right i call it 1 by 1. All transfer are from the same transaction (same hash and block), but i get different amounts. The order doesnt matter but the amount value yes and it is different.  
This is my point. Why is it different calling 1 by 1 and calling all at once?
