Developer APIs
Introduction
The AptoScan Developer APIs are provided as a free community service and without warranty for the Aptos Blockchain.
As the current network is still in the phase, expect the API end-points and data to change over time. Also expect frequent network resets as the network continues to evolve.
There is a (soft) limit of 5 API calls/sec/ip. Both GET/POST requests are supported for all endpoints with a maximum return limit of 1000 records per api call. If you have any questions or suggestions please feel free to get in touch with us.
Account
https://api.aptoscan.com/api?module=account&action=txlist&address=0x941062ca9baeff73f99d44776a8fd59ab979b5317c3d39d7796cf05576e4b95a&sort=asc(To get paginated results use page=<page number> and offset=<max records to return>.
To filter specific version use startversion=<version> or endversion=<version>.
To Sort use sort=asc / desc
Note: status: 0 = Success, 1 = Fail
(Returns up to a maximum of the last 1000 transactions only))
Version
https://api.aptoscan.com/api?module=version&action=getversion&version=1(Note: status: 0 = Success, 1 = Fail. (Returns up to a maximum of the last 10000 transactions only))
Block
Statistics
https://api.aptoscan.com/api?module=stats&action=totalsupply(Result returned in Octas, to get value in APT divide resultAbove/1000000)
Faucet
https://api.aptoscan.com/api?module=faucet&action=getfaucet&amount=1000000&address=0x941062ca9baeff73f99d44776a8fd59ab979b5317c3d39d7796cf05576e4b95a(Restricted to a maximum of 100 APT per request. (Amount in microdiem) Note: Network coins have NO actual monetary value)
Web Socket (Experimental - Subject to change)
The AptoScan exposes several data streams over standard WebSocket connections, which can be consumed by modern web browsers and server side WebSocket Libraries
To subscribe module messages from server, client shoud send subcription message to the server.
WebSocket URL
wss://AptoScan.io/wshandler
Subscribe Latest Version
{"event": "subscribe", "module": "version"}
Subscribe Total Supply of Aptos
{"event": "subscribe", "module": "stats", "action": "totalsupply"}
Subscribe Aptos Balance for Address
{"event": "subscribe", "module": "account", "action": "balance", "address":"your address"}
Subscribe Transaction for Address
{"event": "subscribe", "module": "transaction", "action": "txlist", "address":"your address"}