I can see how to add data to an account using ManageDataOperation. But is there a way to retrieve the same data using the Java SDK?

I fund a JS example:


But it suggests constructing the URL yourself and calling horizon. I just wonder if there is a cleaner solution encapsulated into the existing SDK.

1 Answer 1


Yes you can use a CallBuilder to retrieve the account object:

const server = new StellarSdk.Server('https://horizon.stellar.org')
const callBuilder = server.accounts.accountId(${myPublicKey})
const account = callBuilder.call()

The data entries values are in base64.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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