Using the REST API

Hi all,

Is it possible to make REST API calls without having a local node [fully synced] on my machine?

In other words, would it be possible to get the same functionality of the Algorand block explorer for my python app, but without the need to depend on a local node; which I fear may become an issue in regards to taking up too much space.

Thanks!

1 Like

Dave, yes. Just sign up and use purestake api. https://www.purestake.com/technology/algorand-api/

1 Like

Hi Dave,

AlgoExplorer has a full API. We will release it publicly very soon but if you want to start playing with it you can get full documentation here:
https://api.algoexplorer.io/v1/doc/swagger.yml, you can open this file with https://editor.swagger.io/ to read it fully formatted.

Get 10 latest transactions of Binance hot wallet:
https://api.algoexplorer.io/v1/account/SP745JJR4KPRQEXJZHVIEN736LYTL2T2DFMG3OIIFJBV66K73PHNMDCZVM/transactions/latest/10

Get transactions of block 2783757:
https://api.algoexplorer.io/v1/block/2783757/transactions

Get block count on Testnet:
https://api.testnet.algoexplorer.io/v1/block/count

It supports Mainnet / Testnet / Betanet.

Best,
Pablo

3 Likes

Hey Dave - Sorry for the delay here. As Visybl said, you can just sign up for an account on PureStake.com We’ve got a few different levels depending on what you’re looking for. Feel free to reach out if you need a hand nateATpurestakeDOTcom

1 Like

Hi, @NHamilton!
How can the PureStake POST API used?
Namely, in what binary format shoud be the transaction?
After using base 64 encoding, the result is:

Error: Bad Request

can't parse JSON. Raw result: msgpack decode error [pos 1]: only encoded map or array can be decoded into a struct

Can you give a specific example of using the POST API?

At present time, the POST transaction requires an additional header containing the content-type of application/x-binary and in JavaScript in particular one client for the GETs and one for the POST.

PureStake is working with Algorand to try to bake the header directly into the SDK’s for this call and barring that a simplified version where only a single client is created - but for now here is a complete example at https://github.com/PureStake/api-examples/blob/master/javascript-examples/submit_tx.js

PureStake has examples in all the SDK supported languages here - https://github.com/PureStake/api-examples

1 Like