I'm confused on how to use the Stellar Testnet for python. I have set up the friendbot to create an account. ('https://friendbot.stellar.org') How do we set up a balance on the testnet using the bot?

1 Answer 1


Creating and funding a test account using py-stellar-base:

from stellar_base.keypair import Keypair
kp = Keypair.random()
publickey = kp.address().decode()

import requests
r = requests.get('https://friendbot.stellar.org/?addr=' + publickey)


Resulted in this funded testnet account.

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.