API
Provided is an API to interact with the Nano network, with 5000 requests per day.
No uptime or accuracy guarantees, for production you should probably use your own node.
URL
https://proxy.powernode.cc/proxy
Websockets
wss://ws.powernode.cc
Available Commands
"account_history", "account_info", "account_balance", "accounts_balances", "account_key", "account_representative", "account_weight", "accounts_frontiers", "accounts_pending", "active_difficulty", "available_supply", "block_account", "block_info", "block_count", "block_create", "block_confirm", "blocks_info", "chain", "confirmation_quorum", "delegators_count", "frontiers", "key_create", "pending", "pending_exists", "process", "representatives", "representatives_online", "sign", "successors", "price", "mnano_to_raw", "mnano_from_raw", "work_validate", "validate_account_number", "version", "verified_accounts", "work_generate", "peers", "telemetry"
Making Requests
POST
curl -d '{"action":"block_count"}' https://proxy.powernode.cc/proxy
GET
curl https://proxy.powernode.cc/proxy?action=block_count
POST
import requests
import json
try:
r = requests.post("https://proxy.powernode.cc/proxy", json={"action":"block_count"})
status = r.status_code
print("Status code: ", status)
if (status == 200):
print("Success!")
try:
print(r.json())
except:
print(r)
except Exception as e:
print("Fatal error", e)
GET
r = requests.get('https://proxy.powernode.cc/proxy?action=block_count')
POST ASYNC
async function postData(data = {}, server='https://proxy.powernode.cc/proxy') {
const response = await fetch(server, {
method: 'POST',
cache: 'no-cache',
body: JSON.stringify(data)
})
return await response.json()
}
postData({"action":"block_count"})
.then((data) => {
console.log(JSON.stringify(data, null, 2))
})
.catch(function(error) {
console.log(error)
})
GET JQUERY
$.get("https://proxy.powernode.cc/proxy?action=block_count", function(data, status){
console.log(data)
})
Special thanks to Json for the NanoRPCProxy!
More documentation on interacting with the API can be found at https://github.com/Joohansson/NanoRPCProxy