Author

Topic: listtransactions not working (Read 1149 times)

hero member
Activity: 560
Merit: 509
I prefer Zakir over Muhammed when mentioning me!
April 23, 2015, 07:23:04 AM
#7
I apologize, I forgot this thread.
I'm now working with walletnotify (php script) + gettransaction, what do you think about?

Looks okay. Check the code for fetching the transaction hex is correct, else, you will get a wrong result when you run "gettransaction". Good luck!
legendary
Activity: 1161
Merit: 1004
April 23, 2015, 04:57:00 AM
#6
Since I'm going to work with about 2.000 transactions a month, should I keep using listtransactions command?

Depends on your use. If you want to get latest transactions only, you can use "listsinceblock"* which shows transactions from the block you want. This might be better.

* https://bitcoin.org/en/developer-reference#listsinceblock

I apologize, I forgot this thread.
I'm now working with walletnotify (php script) + gettransaction, what do you think about?
hero member
Activity: 910
Merit: 1000
April 15, 2015, 06:57:17 AM
#5
Since I'm going to work with about 2.000 transactions a month, should I keep using listtransactions command?

Depends on your use. If you want to get latest transactions only, you can use "listsinceblock"* which shows transactions from the block you want. This might be better.

* https://bitcoin.org/en/developer-reference#listsinceblock

That's a pretty helpful command. I'm still learning all the bitcoin-cli commands and hadn't come across this one yet. Thanks for it!
hero member
Activity: 560
Merit: 509
I prefer Zakir over Muhammed when mentioning me!
April 14, 2015, 11:08:06 PM
#4
Since I'm going to work with about 2.000 transactions a month, should I keep using listtransactions command?

Depends on your use. If you want to get latest transactions only, you can use "listsinceblock"* which shows transactions from the block you want. This might be better.

* https://bitcoin.org/en/developer-reference#listsinceblock
legendary
Activity: 1161
Merit: 1004
April 13, 2015, 06:50:17 PM
#3
In Bitcoin.org, it is "skip" and I think "skip" suit in this command better.

"[skip=x]", where x is number of the most "recent transactions" which "should not" be shown.*

When you ran first command, seven transactions where shown. When you ran second command, recent 6 transactions weren't shown as "skip value was 6". Hope this solve your doubt.

If you want to study more, I suggest to you to look Bitcoin.org[1]. I find it quite useful and easy to understand than Bitcoin wiki.

listtransactions API: https://bitcoin.org/en/developer-reference#listtransactions

* Rephrased sentence from Bitcoin.org.
[1] https://bitcoin.org/en/developer-reference

Well explained, thank you.
Since I'm going to work with about 2.000 transactions a month, should I keep using listtransactions command?
hero member
Activity: 560
Merit: 509
I prefer Zakir over Muhammed when mentioning me!
April 13, 2015, 12:54:13 PM
#2
In Bitcoin.org, it is "skip" and I think "skip" suit in this command better.

"[skip=x]", where x is number of the most "recent transactions" which "should not" be shown.*

When you ran first command, seven transactions where shown. When you ran second command, recent 6 transactions weren't shown as "skip value was 6". Hope this solve your doubt.

If you want to study more, I suggest to you to look Bitcoin.org[1]. I find it quite useful and easy to understand than Bitcoin wiki.

listtransactions API: https://bitcoin.org/en/developer-reference#listtransactions

* Rephrased sentence from Bitcoin.org.
[1] https://bitcoin.org/en/developer-reference
legendary
Activity: 1161
Merit: 1004
April 13, 2015, 07:30:46 AM
#1
Hey there, I'm back  Undecided
This time I'm having troubles with listtransactions function because "from" parameter is not properly working!
I'm actually working on this address: https://www.blocktrail.com/tBTC/address/mzkKmWG9Sj4duFDzHQMvwEvt1S8f3K56sm

First command:
Code:
listtransactions bitcoin 100 0
Code:
[
{
"account" : "bitcoin",
"address" : "mzkKmWG9Sj4duFDzHQMvwEvt1S8f3K56sm",
"category" : "receive",
"amount" : 0.00100000,
"vout" : 0,
"confirmations" : 6,
"blockhash" : "000000009ba667fe7e7d1da2a1e8aafe88404c87da43e0c03749f4ac75572961",
"blockindex" : 17,
"blocktime" : 1428923404,
"txid" : "73c24457fc2cbb463507fcaf3dcf31cb1a4e8d52e1e27ec4534d9c65c022aae9",
"walletconflicts" : [
],
"time" : 1428916502,
"timereceived" : 1428916502
},
{
"account" : "bitcoin",
"address" : "mzkKmWG9Sj4duFDzHQMvwEvt1S8f3K56sm",
"category" : "receive",
"amount" : 0.00114000,
"vout" : 0,
"confirmations" : 6,
"blockhash" : "000000009ba667fe7e7d1da2a1e8aafe88404c87da43e0c03749f4ac75572961",
"blockindex" : 15,
"blocktime" : 1428923404,
"txid" : "ebfbe3ea212190629fea63f1210d62c13a5dd31143beebecbb8465b351f0871e",
"walletconflicts" : [
],
"time" : 1428916516,
"timereceived" : 1428916516
},
{
"account" : "bitcoin",
"address" : "mzkKmWG9Sj4duFDzHQMvwEvt1S8f3K56sm",
"category" : "receive",
"amount" : 0.01000000,
"vout" : 0,
"confirmations" : 6,
"blockhash" : "000000009ba667fe7e7d1da2a1e8aafe88404c87da43e0c03749f4ac75572961",
"blockindex" : 10,
"blocktime" : 1428923404,
"txid" : "04e740d17ebbe31eb8522d0a3be2eebc2f19707225c1861cc19bf5751824d12e",
"walletconflicts" : [
],
"time" : 1428916521,
"timereceived" : 1428916521
},
{
"account" : "bitcoin",
"address" : "mzkKmWG9Sj4duFDzHQMvwEvt1S8f3K56sm",
"category" : "receive",
"amount" : 0.01000000,
"vout" : 0,
"confirmations" : 6,
"blockhash" : "000000009ba667fe7e7d1da2a1e8aafe88404c87da43e0c03749f4ac75572961",
"blockindex" : 16,
"blocktime" : 1428923404,
"txid" : "60edf9372117c53b24af7be847ecf125103b516379a1573ac87ca08e58402417",
"walletconflicts" : [
],
"time" : 1428916525,
"timereceived" : 1428916525
},
{
"account" : "bitcoin",
"address" : "mzkKmWG9Sj4duFDzHQMvwEvt1S8f3K56sm",
"category" : "receive",
"amount" : 0.02064000,
"vout" : 2,
"confirmations" : 5,
"blockhash" : "000000009700a992e9d76cda9c3b13c0236978d5cddae3de6eff74fd79e5c4f7",
"blockindex" : 18,
"blocktime" : 1428924605,
"txid" : "5b205c3428d9471c19866d992b20cf9c5cbc0f31757380773b44b41421c07464",
"walletconflicts" : [
],
"time" : 1428916706,
"timereceived" : 1428916706
},
{
"account" : "bitcoin",
"address" : "mzkKmWG9Sj4duFDzHQMvwEvt1S8f3K56sm",
"category" : "receive",
"amount" : 0.01921760,
"vout" : 2,
"confirmations" : 5,
"blockhash" : "000000009700a992e9d76cda9c3b13c0236978d5cddae3de6eff74fd79e5c4f7",
"blockindex" : 19,
"blocktime" : 1428924605,
"txid" : "f1dbd846c0c099121cebe9d79cb8befae6842ef96a9d89953192444a7aa3b959",
"walletconflicts" : [
],
"time" : 1428916708,
"timereceived" : 1428916708
},
{
"account" : "bitcoin",
"address" : "mzkKmWG9Sj4duFDzHQMvwEvt1S8f3K56sm",
"category" : "receive",
"amount" : 0.00681760,
"vout" : 2,
"confirmations" : 5,
"blockhash" : "000000009700a992e9d76cda9c3b13c0236978d5cddae3de6eff74fd79e5c4f7",
"blockindex" : 20,
"blocktime" : 1428924605,
"txid" : "9280235e76796d73b6f304fa67af64022991ba24e2db2317875cfb5ecc5b350d",
"walletconflicts" : [
],
"time" : 1428916709,
"timereceived" : 1428916709
}
]

Second command:
Code:
listtransactions bitcoin 100 6
Code:
[
{
"account" : "bitcoin",
"address" : "mzkKmWG9Sj4duFDzHQMvwEvt1S8f3K56sm",
"category" : "receive",
"amount" : 0.00100000,
"vout" : 0,
"confirmations" : 6,
"blockhash" : "000000009ba667fe7e7d1da2a1e8aafe88404c87da43e0c03749f4ac75572961",
"blockindex" : 17,
"blocktime" : 1428923404,
"txid" : "73c24457fc2cbb463507fcaf3dcf31cb1a4e8d52e1e27ec4534d9c65c022aae9",
"walletconflicts" : [
],
"time" : 1428916502,
"timereceived" : 1428916502
}
]

I don't understand how "from" parameter works, Wiki says it's used to count from a certain number but there's everything messed up  Shocked
Jump to: