Exploring counterparty.db using a Sqlite GUI

##Example: Chart DEx Orders

  • In SQLite Studio, go to Tools > Export. Select “Query results”.

  • Create a query. In this case, it’s a query that dumps the entire orders table. To get the bare minimum for the chart below, use select block_index from orders;

  • Pick export format, destination, encoding…

  • Open your CSV file in Excel or other tool, add an index (first column), select index and block_index column (which shows bitcoin blocks which carry DEx orders) and go to Insert > Scatter.

Counterparty appeared between block height 250,000 and 300,000, so prior to that there were no DEx orders, which explains why the line starts in the middle of the chart. We can see that so far close to 30,000 orders were placed on the DEx.

This process could be automated from the CLI and the chart could be better formatted (example below; the straight red line represents linear trend), but this should be enough to get you started.

1 Like