# Counterparty-cli for counterblock

**URL:** <https://forums.counterparty.io/t/counterparty-cli-for-counterblock/1240>\
**Category:** Development\
**Created:** [May 31, 2015, 8:25am UTC](https://forums.counterparty.io/t/counterparty-cli-for-counterblock/1240 "2015-05-31T08:25:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rene](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/rene/32/355_2.png) [@rene](https://forums.counterparty.io/u/rene)\
**Post date:** [May 31, 2015, 8:25am UTC](https://forums.counterparty.io/t/counterparty-cli-for-counterblock/1240/1 "2015-05-31T08:25:07Z")

</div>

Hey,

is there an interface like the counterparty-cli for the counterblock API (esp. the dex Module)?  
Would be nice not to craft the calls by hand just to start playing around with the counterblock API functionality ;).

---

<div class="post-metadata">

**Author:** ![something](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/something/32/240_2.png) [@something](https://forums.counterparty.io/u/something)\
**Post date:** [June 1, 2015, 2:57pm UTC](https://forums.counterparty.io/t/counterparty-cli-for-counterblock/1240/2 "2015-06-01T14:57:15Z")

</div>

Hi

Maybe you can build a wrapper script that “translates” your CLI into counterblock API alls (via curl, or other).

Or maybe you can try to use Sqlite (not good for production, but good enough for playing around with).

> [@Can I use sqlite to read database of Counterparty directly?](https://forums.counterparty.io/t/can-i-use-sqlite-to-read-database-of-counterparty-directly/1201):
>
> Yes, with sqlite3 CLI. Note that this bypasses some protocol checks, for example it does not ensure that the DB is up-to-date. Examples Select top 10 holders of all Counterparty-issued assets: SELECT COUNT(\*) AS address, asset FROM balances GROUP BY asset HAVING count(\*) \> 100 Select number of transactions of particular asset (XXXX) in the past week: SELECT \* FROM order\_matches INNER JOIN blocks ON order\_matches.block\_index = blocks.block\_index WHERE asset='XXXX' AND block\_time \> 'timestam…

You can get the schema by dumping it from Sqllite CLI (or by checking counterblock API source on Github, I suppose).
