Pedro
June 26, 2024, 4:31pm
1
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.
What am i doing wrong or what is the problem?
Divya
June 28, 2024, 9:24am
2
@Pedro please share the complete query here as text
Pedro
June 28, 2024, 3:21pm
3
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}
Divya
July 1, 2024, 7:42am
4
I can see the offset working,
I tried bitcoin offset test 1 - Blockchain Data API
and bitcoin offset test 2 - Blockchain Data API .
Let me know if you have questions. Alternatively, you can create a support ticket at support.bitquery.io for any data issues
Pedro
July 2, 2024, 10:23am
5
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 ??
Divya
July 3, 2024, 6:36am
6
@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
block {
timestamp {
unixtime
}
height
}
Pedro
July 3, 2024, 8:50am
7
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?