Blog

Blog / GRPC protocol for getting crypto data is here!

šŸ—“ Dec 10, 2022 | šŸ•‘ 4 min | šŸ‘¤ Vasil Safron

GRPC contract for interaction with cryptomation.com

What is it?

It is grpc contract for getting crypto data from different blockchain network (etherium, polygon, near, binance smart chain, tron) in your web3 apps.

When I find last version?

You could load it here:

wget https://raw.githubusercontent.com/cryptomation/grpc-contract/main/universal-api.proto
copy

How to use it?

  • First you need to create api keys for needed network here: šŸ‘‰ CryptoMation/Console
  • Download proto file from this repository: šŸ‘‰ CryptoMation/grpc-contract
  • Compile proto file with grpc compiler: šŸ‘‰ protoc --go_out=plugins=grpc:. universal-api.proto

What methods are available?

  • getBalance - get balance of account in the network
  • getTransactions - get transactions of account in the network

Simple example how get transactions of account in the tron/near/etherium/polygon network:

⚠ Possible values for network param: near, near-testnet, near-mainnet, etherium, polygon, tron

⚠ You must have grpcurl for running this example

grpcurl -plaintext -d '{"api_key": "insert_you_api_key", "network":"polygon", "address": "0xdec0de7e6ed3ee7bb3a2c0baae7827d101d1ec20"}' grpc.cryptomation.com com.cryptomation.universal.api.v1.grpc.UniversalCryptoApi/getTransactions
copy

Simple example how get balance of account in the tron/near/etherium/polygon network:

⚠ Possible values for network param: near, near-testnet, near-mainnet, etherium, polygon, tron

⚠ You must have grpcurl for running this example

grpcurl -plaintext -d '{"api_key": "insert_you_api_key", "network":"polygon", "address": "0xdec0de7e6ed3ee7bb3a2c0baae7827d101d1ec20"}' grpc.cryptomation.com com.cryptomation.universal.api.v1.grpc.UniversalCryptoApi/getBalance
copy

More info?

Much more info about our API method you could found on our docs!


Ready to get started?

Our api help your project gain easy access to a sea of crypto data.

If you want to try our Universal API, please enter your email or login from Google Gmail:

Continue with