Api?

Is there an external API for Counterparty available that gives details on the various assets being traded?

[quote author=celticwarrior72 link=topic=467.msg2927#msg2927 date=1406395580]
Is there an external API for Counterparty available that gives details on the various assets being traded?
[/quote]

It’s funny you should mention this as just today I created a note to put this request on GitHub after checking with the devs (right now I don’t think there is an external way to do this without running counterparty services as per below.)

http://counterpartyd.readthedocs.org/en/latest/API.html#status

I’ll look it up or maybe one of the devs will reapond.

So it is not possible to ping an API on counterpartyd from a remote location via http?

[quote author=celticwarrior72 link=topic=467.msg2935#msg2935 date=1406567704]
So it is not possible to ping an API on counterpartyd from a remote location via http?
[/quote]


It is not possible until there’s a Counterparty (or someone else) implements that functionality.
You can get some info that way from blockscan.com, but I believe not the parts you asked for (details about the DEX).

We now have a test dev server. Check out http://support.counterparty.co/support/solutions/articles/5000003524-how-do-i-get-started-developing-on for more info

Thanks!  I'll be trying it out.

I've managed to pull asset data from the get_asset_info API route.  I'm now interested in augmenting this with market data (pricing, #trades, etc.) and am wondering if there is a publicly available counterblockd API server to pull some data from?



I believe the counterwallet site uses counterblockd for its API. As with all APIs please use with care. I don't know what kind of protection is there against abuse.

[quote author=celticwarrior72 link=topic=467.msg3165#msg3165 date=1408989660]
I've managed to pull asset data from the get_asset_info API route.  I'm now interested in augmenting this with market data (pricing, #trades, etc.) and am wondering if there is a publicly available counterblockd API server to pull some data from?
[/quote]


Maybe this can help?
https://counterparty.freshdesk.com/solution/categories/5000010746/folders/5000016516/articles/5000003524-how-do-i-get-started-developing-on

Thanks.


I've managed to ping the counterblockd API and verify that it is responding, but I'm having trouble with the correct format of the JSON request.


For instance, when I try call the [size=1em][color=#0000ff]get_market_price_summary[/color][/size] route as follows


$request = &#039;{&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;jsonrpc&quot;:&quot;2.0&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;id&quot;:0,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;method&quot;:&quot;get_market_price_summary&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;params&quot;: {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;asset&quot;: [&quot;SWARM&quot;]<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br /> <br />}&#039;;

[font=verdana][size=1em]I get "invalid params".  How do I set up the params properly for these types of calls?[/size][/font]

I think this is an issue talking to bitcoind. Are you able to send xcp?

[quote author=celticwarrior72 link=topic=467.msg3179#msg3179 date=1409063267]
Thanks.


I've managed to ping the counterblockd API and verify that it is responding, but I'm having trouble with the correct format of the JSON request.


For instance, when I try call the [size=1em][color=#0000ff]get_market_price_summary[/color][/size] route as follows


$request = &#039;{&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;jsonrpc&quot;:&quot;2.0&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;id&quot;:0,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;method&quot;:&quot;get_market_price_summary&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;params&quot;: {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;asset&quot;: [&quot;SWARM&quot;]<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br /> <br />}&#039;;

[font=verdana][size=1em]I get "invalid params".  How do I set up the params properly for these types of calls?[/size][/font]
[/quote]

I haven't tried this myself, so this is just a guess: in case you tried while counterpartyd was down* for a couple of hours yesterday, try again.
* https://forums.counterparty.co/index.php/topic,510.msg3177/topicseen.html#msg3177

By the way, where is get_market_price_summary documented?

Looks like this is known and being worked on. https://github.com/CounterpartyXCP/counterpartyd/issues/263

The get_market_leaderboard only shows 20 assets and the get_markets_list shows 73 assets.  Why the discrepancy?



A leaderboard is typically not every record so the top 20 seems to make sense. In the code I see a limit of 100 but didn't fully trace how that works.

Does the get_markets_list call show ALL the available markets in the system?