Company
Date Published
Author
Tyler Mitchell - Senior Product Marketing Manager
Word count
1227
Language
English
Hacker News points
None

Summary

In the second part of a series on monitoring Stellar assets using Couchbase and Python, this post explores loading and querying asset trades from the Stellar Decentralized Exchange, with a focus on Stellar Lumens (XLM) as the native asset. The process involves accessing an account's list of trades, loading them into Couchbase, and running queries to visualize trends and investments through the Couchbase web console. The post provides a step-by-step guide, including code examples for connecting to Couchbase, querying the Stellar Horizon service, parsing trades, and storing them as documents with unique keys. It highlights the trade details, such as asset types, counter assets, and transaction pairs, using REST API requests, and demonstrates how to create a basic index and perform queries using N1QL. The discussion aims to make these technical concepts accessible to beginners and hints at future posts that will delve deeper into document joins and calculations for evaluating trade profitability.