2

I would like to do some analysis of the layout of the Stellar network (maybe some basic graph theory and stats) and I would like to grab a list of all account holders that have had a payment operation in past say 3 months. Is this possible with the Horizon API?

The docs only talk about querying a single account (https://www.stellar.org/developers/horizon/reference/endpoints/accounts-single.html). Is it possible to get a list of accounts somehow?

  • What EndingWithAli said. However, there is a third party GraphQL service which may help you. galactictalk.org/d/… – Synesso Mar 16 '18 at 23:00
  • Thanks, but is everything available through that interface? I'm new to GraphQL and but I tried to see how many accounts there were: { "data": { "allHistoryAccounts": { "totalCount": 63552 } } } 63552 seems really low – tlnagy Mar 16 '18 at 23:24
  • I don't know enough about it to know if it will serve your needs or not, but it's an avenue to explore. – Synesso Mar 17 '18 at 6:12
3

If you run an instance of stellar core you can query the database.

There are no actual endpoints of Horizon that enable you to query like that.

  • Is there a guide/docs to querying the database once you install stellar-core? – tlnagy Mar 16 '18 at 23:16
  • 2
    When you setup stellar-core you use a psql or sql-lite database. Thus, querying the database would be the same as querying any normal db. Here are schema details: github.com/stellar/stellar-core/blob/master/docs/db-schema.md – Rob Mar 17 '18 at 0:36
  • Is there any more documentation? E.g. what are the units for lastmodified? thanks! – tlnagy Mar 18 '18 at 4:00
0

If you know graphql I have a setup which connects directly to the Stellar postgres databases and would allow you to do this very thing incredibly simply.

See this thread for all the info and related links. https://galactictalk.org/d/885-graphql-interface-for-core-and-horizon-databases

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.