Pages:
Author

Topic: [Nxt] API of Nxt - page 5. (Read 37320 times)

legendary
Activity: 2142
Merit: 1010
Newbie
February 06, 2014, 03:56:54 AM
1. http://holms.cloudapp.net:6874/nxt?requestType=getAccountCurrentBidOrderIds&asset=14269709746849295412
{"errorCode":3,"errorDescription":"\"account\" not specified"}

can't get order from  getAccountCurrentBidOrderIds/ask api, with only assetid provided

This call returns orders of a particular account, u r supposed to provide account id.


btw, to cfb: how to answer the bid/ask order , then finish orders?

Just place an opposite order, Nxt will match them automatically.
full member
Activity: 236
Merit: 100
February 06, 2014, 02:58:19 AM
1. http://holms.cloudapp.net:6874/nxt?requestType=getAccountCurrentBidOrderIds&asset=14269709746849295412
{"errorCode":3,"errorDescription":"\"account\" not specified"}

can't get order from  getAccountCurrentBidOrderIds/ask api, with only assetid provided

2. wiki has a mistake in api
Get order IDs
http://localhost:7874/nxt?
     requestType=GET_BID_OR_ASK

http://holms.cloudapp.net:6874/nxt?requestType=getAskOrderIds
{"errorCode":3,"errorDescription":"\"asset\" not specified"}

http://holms.cloudapp.net:6874/nxt?requestType=getAskOrderIds
&asset=14269709746849295412
{"errorCode":3,"errorDescription":"\"timestamp\" not specified"}

http://holms.cloudapp.net:6874/nxt?requestType=getAskOrderIds&asset=14269709746849295412×tamp=0
{"askOrderIds":[]}
http://holms.cloudapp.net:6874/nxt?requestType=getBidOrderIds&asset=14269709746849295412×tamp=0
{"bidOrderIds":["17077867597681716581","16241672625542691626"]}

corrett api is
requestType=getBidOrderIds&asset=×tamp=

from this api ,can get orderids by only asset, not including account


btw, to cfb: how to answer the bid/ask order , then finish orders?

legendary
Activity: 2142
Merit: 1010
Newbie
February 05, 2014, 06:34:16 AM
@ AE client devs:

Do u need any other API calls related to Asset Exchange?

Get current account order IDs
Obtain current order IDs for bid or ask orders for a specific account, optionally filtered by an an assetID. Implemented in version 0.5.9.
Request
http://localhost:7874/nxt?     requestType=GET_BID_OR_ASK&     account=ACCOUNT&     asset=ASSETID
-------------
1. can we get order by asssetid, need not contain account no, because i want to know who bid/ask my asset
2. there are only 12 assets now , if 10k or more,  it is difficult find a asset, maybe a
  asset type, brand are needed when isssue them, for example:   crypto coin, nxt;crypto,doge
        car,honda;computer, lenovo

this is test picture. i only get a bid order, there is not any ask orders . i tried doing askorder but failed.
https://i.imgur.com/WLITgh2.jpg




Have u taken a look at getAccountCurrentAskOrderIds and getAccountCurrentBidOrderIds?
full member
Activity: 236
Merit: 100
February 05, 2014, 02:44:45 AM
@ AE client devs:

Do u need any other API calls related to Asset Exchange?

Get current account order IDs
Obtain current order IDs for bid or ask orders for a specific account, optionally filtered by an an assetID. Implemented in version 0.5.9.
Request
http://localhost:7874/nxt?     requestType=GET_BID_OR_ASK&     account=ACCOUNT&     asset=ASSETID
-------------
1. can we get order by asssetid, need not contain account no, because i want to know who bid/ask my asset
2. there are only 12 assets now , if 10k or more,  it is difficult find a asset, maybe a
  asset type, brand are needed when isssue them, for example:   crypto coin, nxt;crypto,doge
        car,honda;computer, lenovo

this is test picture. i only get a bid order, there is not any ask orders . i tried doing askorder but failed.



full member
Activity: 238
Merit: 100
February 03, 2014, 08:30:43 PM
on getState, can someone explain more detail of the following 3?  The Wiki page is very basic.

cumulativeDifficulty:
I dont understand cumulative difficulty in NXT at all (or in bitcoin; I should educate myself here) I expect what I need here is a very long explanation, so perhaps you could recommend a good site that can break it down from a beginner level?

numberOfPeers
The Wiki says "NUMPEERS is the number of peers on the network" but is this the node's best guess of total number of all active peers across the entire network? Even including peers that are maybe 10 hops away?

totalEffectiveBalance
Is this the total amount of NXT participating in the forging process?
legendary
Activity: 2142
Merit: 1010
Newbie
February 03, 2014, 05:24:35 PM
can we get explicit info on the getPeer API?

the downloadedVolume:  is that figure the amount other peers have downloaded from the node returning the data, or is it the amount that peer has downloaded from other peers?

And is it bytes or packets or what?


It's bytes. Downloaded by the node from that one peer.
full member
Activity: 238
Merit: 100
February 03, 2014, 05:05:36 PM
can we get explicit info on the getPeer API?

the downloadedVolume:  is that figure the amount other peers have downloaded from the node returning the data, or is it the amount that peer has downloaded from other peers?

And is it bytes or packets or what?
legendary
Activity: 2142
Merit: 1010
Newbie
February 01, 2014, 11:14:15 AM
Are transactions rebroadcast automatically in regular intervals in the network once they're sent their way? Source account had insufficient funds while broadcasting last night, but 16 hours later as it was funded, the pending transaction left by itself right after without any interaction with the NXT client.

Yes, now transactions r rebroadcasted.
hero member
Activity: 566
Merit: 500
February 01, 2014, 10:25:48 AM
Are transactions rebroadcast automatically in regular intervals in the network once they're sent their way? Source account had insufficient funds while broadcasting last night, but 16 hours later as it was funded, the pending transaction left by itself right after without any interaction with the NXT client.
full member
Activity: 238
Merit: 100
January 31, 2014, 10:21:30 AM
whoa....


where can I get more info on this '&requestType=unlockAccount' thing.  I must have missed something.  Where is this request type and all its options documented at?
legendary
Activity: 2142
Merit: 1010
Newbie
January 31, 2014, 09:22:28 AM
I can open on 2 client my account to forging? Because my computer have internet problem, but on my server I can forge.

U can.
sr. member
Activity: 281
Merit: 250
Developer of Ultracopier and Supercopier
January 31, 2014, 09:16:07 AM
You are in right, it's what I need. My Ip is 127.X.X.X not 127.0.0.1.
I can open on 2 client my account to forging? Because my computer have internet problem, but on my server I can forge.
legendary
Activity: 2142
Merit: 1010
Newbie
January 31, 2014, 08:38:52 AM
But I have too: 127.0.0.1; localhost; 0:0:0:0:0:0:0:1;
Replace by * will work, but it's not correct. I use 127.0.0.1, and it's into the list

What is returned by http://yourserver:7874/nxt?requestType=getMyInfo ?
sr. member
Activity: 281
Merit: 250
Developer of Ultracopier and Supercopier
January 31, 2014, 08:32:39 AM
But I have too: 127.0.0.1; localhost; 0:0:0:0:0:0:0:1;
Replace by * will work, but it's not correct. I use 127.0.0.1, and it's into the list
legendary
Activity: 2142
Merit: 1010
Newbie
January 31, 2014, 08:20:23 AM
And what about?:
wget -O - -q 'http://localhost:7874/nxt?requestType=unlockAccount&secretPhrase=toto'
{"errorCode":1,"errorDescription":"Incorrect request"}

There is no unlockAccount API call. It's part of web interface.
sr. member
Activity: 281
Merit: 250
Developer of Ultracopier and Supercopier
January 31, 2014, 08:11:58 AM
But I have too: 127.0.0.1; localhost; 0:0:0:0:0:0:0:1;
Replace by * will work, but it's not correct. I use 127.0.0.1, and it's into the list

And what about?:
wget -O - -q 'http://localhost:7874/nxt?requestType=unlockAccount&secretPhrase=toto'
{"errorCode":1,"errorDescription":"Incorrect request"}
legendary
Activity: 2142
Merit: 1010
Newbie
January 31, 2014, 07:51:25 AM
I have always:
{"errorCode":7,"errorDescription":"Not allowed"}
Or access denied, client runing at cli
I try:
wget 'http://localhost:7874/nxt?request=getBalance&account=398532577100249608' -O - -q

Put "*" into "allowedBotHosts" in "web.xml".
Why it work? Because the destination is well 127.0.0.1, and source too, then 127.0.0.1; localhost; 0:0:0:0:0:0:0:1; is correct.
With:
wget -O - -q 'http://localhost:7874/nxt?user=0.8690339662134647&requestType=unlockAccount&secretPhrase=toto&0.7187995600979775'
I have:
{"responses":[{"response":"denyAccess"}]}
And:
wget -O - -q 'http://localhost:7874/nxt?requestType=unlockAccount&secretPhrase=toto'
{"errorCode":1,"errorDescription":"Incorrect request"}

If u add "user" HTTP parameter then allowedUserHosts works.
sr. member
Activity: 281
Merit: 250
Developer of Ultracopier and Supercopier
January 31, 2014, 07:49:17 AM
I have always:
{"errorCode":7,"errorDescription":"Not allowed"}
Or access denied, client runing at cli
I try:
wget 'http://localhost:7874/nxt?request=getBalance&account=398532577100249608' -O - -q

Put "*" into "allowedBotHosts" in "web.xml".
Why it work? Because the destination is well 127.0.0.1, and source too, then 127.0.0.1; localhost; 0:0:0:0:0:0:0:1; is correct.
With:
wget -O - -q 'http://localhost:7874/nxt?user=0.8690339662134647&requestType=unlockAccount&secretPhrase=toto&0.7187995600979775'
I have:
{"responses":[{"response":"denyAccess"}]}
And:
wget -O - -q 'http://localhost:7874/nxt?requestType=unlockAccount&secretPhrase=toto'
{"errorCode":1,"errorDescription":"Incorrect request"}
legendary
Activity: 2142
Merit: 1010
Newbie
January 31, 2014, 07:12:20 AM
I have always:
{"errorCode":7,"errorDescription":"Not allowed"}
Or access denied, client runing at cli
I try:
wget 'http://localhost:7874/nxt?request=getBalance&account=398532577100249608' -O - -q

Put "*" into "allowedBotHosts" in "web.xml".
sr. member
Activity: 281
Merit: 250
Developer of Ultracopier and Supercopier
January 31, 2014, 07:10:52 AM
I have always:
{"errorCode":7,"errorDescription":"Not allowed"}
Or access denied, client runing at cli
I try:
wget 'http://localhost:7874/nxt?request=getBalance&account=398532577100249608' -O - -q
Pages:
Jump to: