A tool to analyze trading activity on Kujira's local trades contract. This tool fetches and analyzes transaction data from the Kujira blockchain, specifically focusing on release_escrow events.
- Fetches transaction data from Kujira API with pagination
- Processes release_escrow events
- Generates detailed statistics about trading activity
- Creates CSV exports of trade data
- Provides summary of trading activity by denomination and trader
- Python 3.6+
requestslibrary
- Clone the repository
- Create a virtual environment:
python3 -m venv venv source venv/bin/activate # On Unix/macOS
- Install dependencies:
pip install -r requirements.txt
-
Fetch transaction data:
python fetch_trades.py
This will create JSON files containing transaction data.
-
Parse and analyze trades:
python parse_trades.py
This will generate:
release_escrow_events.csv: Detailed trade datatrade_summary.json: Summary statistics including:- Total amounts by denomination
- Number of unique traders
- Most active traders
- Average trades per trader
trade_id: Unique identifier for the tradetrade_denom: Token denominationtotal_amount: Amount of tokens tradedsender: Address of the trader
{
"denom_totals": {
"denom1": amount1,
"denom2": amount2
},
"unique_traders": number,
"total_trades": number,
"avg_trades_per_trader": number,
"most_active_traders": [
{
"address": "trader_address",
"trades": number
}
]
}This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.