Reporting API

Everyone loves seeing the additional crypto they are earning. Staked provides an API for full access to the details.

get
Get Balance Of Address

https://mainnet.staked.cloud/api/reports/:chain/delegator/:address/balance
This endpoint allows you to get the balance of an address that has delegated to a Staked delegator. You can also get delegation and reward transactions using the 'kind' query parameter.
Request
Response
Path Parameters
chain
required
string
Chain Name
address
required
string
Address to get balance for
Query Parameters
api_key
required
string
Your API key
start
optional
string
Start date. Format: YYYY-MM-DD
end
optional
string
End date. Format: YYYY-MM-DD
kind
optional
string
Transaction types to filter by
200: OK
// Simple Balance Response:
{
"balance": 5000000,
"timestamp": "2019-07-08T17:09:08.753866",
"address": "KT1W4Rda7pHrqmbDk4xDZ97YpgqAVHE5hndr"
}
// Filter by Transaction Kind:
[
...
{
"id": 149085,
"kind": "PAID",
"transaction_time": "2019-06-05T21:17:06",
"transaction_address": "4CA0DE34960577F5ED8D75CB573322FD5FD1A9F02ADEA9CDFB8C0C8F0DC90492",
"holding_address": "KT1W4Rda7pHrqmbDk4xDZ97YpgqAVHE5hndr",
"amount": null,
"reward": 193873,
"fees": 100,
"total": 193973,
"denom": null,
"block_reference": 554796
},
{
"id": 149086,
"kind": "PAID",
"transaction_time": "2019-05-15T05:19:51",
"transaction_address": "3471B104CC9A5FAF5CBF6441412D9E1E5108DE28CBB913E7E8440BBC842C8542",
"holding_address": "KT1W4Rda7pHrqmbDk4xDZ97YpgqAVHE5hndr",
"amount": null,
"reward": 109348,
"fees": 0,
"total": 109348,
"denom": null,
"block_reference": 283855
},
...
]

Transaction Kind Enum

Meaning

STK

Delegation Transactions

UNSTK

Undelegation Transactions

SCH

Scheduled Future Rewards

PEND

Rewards in Frozen Period

PYBL

Rewards Pending Distribution

PAID

Paid Rewards

React w/ Axios
jQuery
Node.js
Swift
import axios from "axios";
const api_key = 'YOUR API KEY';
const chain = 'TEZOS';
const address = 'KT1W4Rda7pHrqmbDk4xDZ97YpgqAVHE5hndr';
var api = axios.create({
baseURL: "https://mainnet.staked.cloud/api",
timeout: 1000000
});
api.defaults.headers.post["Content-Type"] = "application/json";
api.get(`/reports/${chain}/delegator/${address}/balance?api_key=${api_key}`).then(response => {
console.log(res);
})
const api_key = 'YOUR API KEY';
const chain = 'TEZOS';
const address = 'KT1W4Rda7pHrqmbDk4xDZ97YpgqAVHE5hndr';
var request = {
"url": `https://mainnet.staked.cloud/api/reports/${chain}/delegator/${address}/balance?api_key=${api_key}`,
"method": "GET",
"timeout": 0,
};
$.ajax(request).done(function (response) {
console.log(response);
});
var http = require('http');
const api_key = 'YOUR API KEY';
const chain = 'TEZOS';
const address = 'KT1W4Rda7pHrqmbDk4xDZ97YpgqAVHE5hndr';
var options = {
'method': 'GET',
'hostname': 'mainnet.staked.cloud',
'path': `/api/reports/${chain}/delegator/${address}/balance?api_key=${api_key}`
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
req.end();
import Alamofire
let api_key = 'YOUR API KEY';
let chain = 'TEZOS';
let address = 'KT1W4Rda7pHrqmbDk4xDZ97YpgqAVHE5hndr';
AF.request("https://mainnet.staked.cloud/api/reports/\(chain)/delegator/\(address)/balance?api_key=\(api_key)").response { response in
debugPrint(response)
}