Pages:
Author

Topic: [Nxt] API of Nxt - page 13. (Read 37374 times)

newbie
Activity: 20
Merit: 0
January 01, 2014, 03:54:00 PM
Hi,

whenever I try to do the following:

GET http://localhost:7874/nxt?requestType=getAccountTransactionIds&account=18024643391205620992×tamp=0&3.19606338E-8

I get an unknown account response.
Happens in 0.4.8, in 0.4.7e I got an incorrect timestamp error, and before everything was fine.

What am I doing wrong?
Do I need to do an unlockaccount request before this one?

Thanks.
legendary
Activity: 2142
Merit: 1010
Newbie
January 01, 2014, 02:03:33 PM
Why is the sendMoney API so slow on 0.4.8 (and most other versions)? It takes over 5 seconds per payment to get the txid, still a high percentage of these is not carried through. 34 peers shown.

Speed depends on number of peers it sends data to. Reduce maxNumberOfConnectedPublicPeers, increase pushThreshold, reduce connectTimeout.
hero member
Activity: 566
Merit: 500
January 01, 2014, 01:58:19 PM
Why is the sendMoney API so slow on 0.4.8 (and most other versions)? It takes over 5 seconds per payment to get the txid, still a high percentage of these is not carried through. 34 peers shown.
legendary
Activity: 2142
Merit: 1010
Newbie
January 01, 2014, 06:37:54 AM
From getConstants:

"peerStates":[{"description":"Non-connected","value":0},{"description":"Connected","value":1},{"description":"Disconnected","value":2}]

What is the difference between Non-connected and Disconnected?

Non-connected: Never was connected to this node.
Disconnected: Was connected, but now disconnected.

Like this?

Yes.
full member
Activity: 224
Merit: 100
January 01, 2014, 06:35:01 AM
From getConstants:

"peerStates":[{"description":"Non-connected","value":0},{"description":"Connected","value":1},{"description":"Disconnected","value":2}]

What is the difference between Non-connected and Disconnected?

Non-connected: Never was connected to this node.
Disconnected: Was connected, but now disconnected.

Like this?
legendary
Activity: 2142
Merit: 1010
Newbie
January 01, 2014, 04:59:14 AM
What is the meaning of numberOfUsers in the result of getState?

This is number of attempts to open NRS web interface. Each page refresh creates a new user, even if they have the same account.
full member
Activity: 224
Merit: 100
January 01, 2014, 04:55:31 AM
-Can multiple accounts be unlocked against the same NXT server at the same time?

Yes.


-Further, can I distribute the nxt software with my client to achieve a hassle-free end user experience?

Yes.

Thanks!

What is the meaning of numberOfUsers in the result of getState?
legendary
Activity: 2142
Merit: 1010
Newbie
January 01, 2014, 03:45:40 AM
-Can multiple accounts be unlocked against the same NXT server at the same time?

Yes.


-Further, can I distribute the nxt software with my client to achieve a hassle-free end user experience?

Yes.
full member
Activity: 224
Merit: 100
January 01, 2014, 03:39:58 AM
-Can multiple accounts be unlocked against the same NXT server at the same time?

-Further, can I distribute the nxt software with my client to achieve a hassle-free end user experience?

Thanks for your help!
legendary
Activity: 2142
Merit: 1010
Newbie
January 01, 2014, 12:48:03 AM
I think it has changed the protocol to 0.4.8, no longer works for almost any function??

No. What the issue do u have?
member
Activity: 112
Merit: 10
January 01, 2014, 12:18:48 AM
I think it has changed the protocol to 0.4.8, no longer works for almost any function??
legendary
Activity: 2142
Merit: 1010
Newbie
December 30, 2013, 03:52:50 AM
so,numbOfPeers should <= number of all nodes that run NRS client, If all nodes communicate well (they know each other) ,  numbOfPeers == number of all nodes, is that right?

No.
To get more info on a particular peer use http://localhost:7874/nxt?requestType=getPeer&peer=46.20.69.133
Peer state descriptions can be obtained via http://localhost:7874/nxt?requestType=getConstants
omo
full member
Activity: 147
Merit: 100
December 30, 2013, 03:48:28 AM
hello,
   what does 'numbOfPeers' from getState mean?
   does it mean the total number of nodes that run NRS client?

No, I think it's the peers who connect to you or whom you connect to.



It includes known and blacklisted peers also.

so,numbOfPeers should <= number of all nodes that run NRS client, If all nodes communicate well (they know each other) ,  numbOfPeers == number of all nodes, is that right?
legendary
Activity: 2142
Merit: 1010
Newbie
December 30, 2013, 12:38:26 AM
hello,
   what does 'numbOfPeers' from getState mean?
   does it mean the total number of nodes that run NRS client?

No, I think it's the peers who connect to you or whom you connect to.



It includes known and blacklisted peers also.
full member
Activity: 238
Merit: 100
December 30, 2013, 12:08:05 AM
hello,
   what does 'numbOfPeers' from getState mean?
   does it mean the total number of nodes that run NRS client?

No, I think it's the peers who connect to you or whom you connect to.

full member
Activity: 143
Merit: 100
December 28, 2013, 09:17:07 PM
hello,
   what does 'numbOfPeers' from getState mean?
   does it mean the total number of nodes that run NRS client?
newbie
Activity: 24
Merit: 0
December 27, 2013, 04:29:55 PM
Did you change anything?

No.

And it works:
Code:
{"transactionIds":["16327828505285932473","7776315672991437607","7478358102654400317","9038949217488707578","5107797978721572291","3056041568658981150","13938595992812911398","5860553720038071526","14088864536744330557","98233104059687517","3708542302478143606","11723261810965383682","8480031398450915391","4637952893059799971","4278983739975323329","11578788549066895383","17355434458110030026","15327384437462965022","11518685970067256485","6225568623338018976","5358668617356551382","7334304928632209196","11321968978650279956","14554751727556954823","96427141454859614"]}

Rename *.bak files to *.nxt, maybe ur copy of blockchain is inconsistent.

You were right, the blockchain was corrupt.

Version 0.4.7e is really stable, good job
full member
Activity: 168
Merit: 100
IDEX - LIVE Real-time DEX
December 27, 2013, 02:00:13 PM

Are there any root hosts that accept such requests and will take them in the future?

U should ask community in main Nxt thread for list of hosts who allow access to API calls.

These are open for User and Bot.

node1.nxtbase.com; node11.nxtbase.com; node21.nxtbase.com; node31.nxtbase.com; node41.nxtbase.com; node51.nxtbase.com; node61.nxtbase.com; node71.nxtbase.com; node81.nxtbase.com; node91.nxtbase.com;
legendary
Activity: 2142
Merit: 1010
Newbie
December 27, 2013, 11:41:30 AM
Did you change anything?

No.

And it works:
Code:
{"transactionIds":["16327828505285932473","7776315672991437607","7478358102654400317","9038949217488707578","5107797978721572291","3056041568658981150","13938595992812911398","5860553720038071526","14088864536744330557","98233104059687517","3708542302478143606","11723261810965383682","8480031398450915391","4637952893059799971","4278983739975323329","11578788549066895383","17355434458110030026","15327384437462965022","11518685970067256485","6225568623338018976","5358668617356551382","7334304928632209196","11321968978650279956","14554751727556954823","96427141454859614"]}

Rename *.bak files to *.nxt, maybe ur copy of blockchain is inconsistent.
newbie
Activity: 24
Merit: 0
December 27, 2013, 11:22:28 AM
I keep getting {"errorCode":4,"errorDescription":"Incorrect \"timestamp\""}

When trying to use requestType=getAccountTransactionIds

on version 0.4.7e, i tried different timestamps 0, -1, real timestamp

nothing works

What exactly ur request is?

For example:

http://localhost:7874/nxt?requestType=getAccountTransactionIds&account=6483973064837388393×tamp=0

This works for me in an earlier version, but not in 0.4.7e

Did you change anything?


Thanks
Pages:
Jump to: