Cardano Public Api

Hello,

Is there a public api that is connected to the mainnet/testnet that we can access to build applications on?

I think it’s cumbersome to pull the cardano node and api on a device to just communicate with cardano.

Thanks in advance

Greets,
Sami

Welcome,
Please have a look at this new project: https://blockfrost.io/

3 Likes

Omg, that’s awesome!

3 Likes

Hi i am checking the blockfrost API and was wondering if i can get the complete_controlled Amount of ADA for a single (random in daedalus “receive” tab selected) address.
Requesting the /addresses/(ADDRESS) endpoint but getting the amount associated with this address not the complete one i see in my wallet. If i grab the stake_address from that response and call /accounts/STAKE_ADDRESS i get the correct amount of controlled ADA.

How does Daedalus then fetches the whole balance? Why cant i do that via blockfrost?
Thank you!

Hello,

How does Daedalus then fetches the whole balance? Why cant i do that via blockfrost?

Daedalus shows you both your balance and your rewards for the account together. Rewards are associated with a stake address until they are withdrawn to an address - before that, it is not really associated with the address itself.

However, maybe, instead of checking one specific address you want to use the account?

Hi Mmahut, that means overall ADA amount can be retrieved by requesting “accounts” providing path parameter stake address? e.g
https://cardano-mainnet.blockfrost.io/api/v0/accounts/stake1u8780f538dlzmezkwa9um0fl6t9t6e7r7p5kxv2hf8e2x4qahre7t
My Problem how to get users (who might not stake at all) balance. Right now i would ask the user to scan one of his addresses from the wallet and call:
https://cardano-mainnet.blockfrost.io/api/v0/addresses/{address}, i would get back the appropriate quantity but also stakeAddress (but what if user doesnt stake to a pool) would there still be a stakeAddress i can use to query “accounts” with?

Hope its not confusing, but its very important for me to get the users balance. Thank you so much

The status of whether user is staking to a pool does not really matter tbh. What matters is what type of wallet user is using. Most of the end user facing wallets in cardano ecosystem provide HD Wallets which provide base addresses to user. Thus, unless a user goes out of the way (using CLI or APIs/SDKs) to manually derive a HD wallet using enterprise addresses, the wallets users use will predominantly include stake address, even if not registered on chain - when not participating in staking.

Thank you rdlrt, very appreciated. After reading this one i think only the wallet can get the complete look on overall funds. As i am not having the wallet access to all keys and txs i am not able to query the overall balance.

https://cardano-community.github.io/support-faq/#/wallets?id=funds-in-a-wallet-versus-address

We offer a new API which is free and can be used from mainnet and testnet.
See the following:

1 Like