UA-API - Documentation

The API can only be used by registered partners.

RPC-JSON 2.0 API

The html endpoint is

https://steem-ua.com:5000/rpc

get_accounts <user> <encrypted_user> <accounts_list>

Get UA data for several accounts or a single account. user is the steem user name of a registered account and encrypted_user is the encrypted steem user name. Encryption is done with the memo of user with steem-ua as memo receiver.

accounts_list is the encrypted comma-separated account name list, for which UA data are requsted.

Python example

beem must be installed to run the following example:


         
from beem import Steem
from beem.account import Account
from beem.memo import Memo
import json
import requests

if __name__ == "__main__":
    memo_key = "5xx"
    stm = Steem(keys=[memo_key])
    user = Account("holger80", steem_instance=stm)
    steem_ua = Account("steem-ua", steem_instance=stm)
    
    memo = Memo(user, steem_ua, steem_instance=stm)

    enc_user = memo.encrypt("holger80")["message"]
    account_list = ["jesta", "good-karma"]

    url = "https://steem-ua.com:5000/rpc"
    request = {
         "jsonrpc": "2.0",
         "id": 0,
         "method": "get_accounts",
         "params": {"user": user["name"], "encrypted_user": enc_user, "accounts": account_list}
         }
    r = requests.post(url, data=json.dumps(request))
    result = r.json()
    

results in


    {
        'id': 0,
        'jsonrpc': '2.0',
        'result': {
            'block_num': 25425038,
            'n_accounts': 1119161,
            'account': [{
                'account': 'jesta',
                'created_at': '2016-07-12T08:20:57',
                'followers': 12317,
                'following': 90,
                'id': 17278,
                'rank': 1,
                'ua': 8.574,
                'ua_raw': 0.00546922
            },
            {
                'account': 'good-karma',
                'created_at': '2016-07-07T08:15:03',
                'followers': 31435,
                'following': 163,
                'id': 14805,
                'rank': 2,
                'ua': 8.554,
                'ua_raw': 0.00534818
            }],
            'status': 'success',
            'updated_at': '2018-08-27T04:33:18'
        }
    }    
           
   

get_sorted_by_ua <user> <encrypted_user> <start_account> <limit>

Get UA data for the top limit accounts starting from start_account. user is the steem user name of a registered account and encrypted_user is the encrypted steem user name. Encryption is done with the memo of user with steem-ua as memo receiver.

start_account is the start account, from which UA data are requested.

Python example

beem must be installed to run the following example:


         
from beem import Steem
from beem.account import Account
from beem.memo import Memo
import json
import requests

if __name__ == "__main__":
    memo_key = "5xx"
    stm = Steem(keys=[memo_key])
    user = Account("holger80", steem_instance=stm)
    steem_ua = Account("steem-ua", steem_instance=stm)
    
    memo = Memo(user, steem_ua, steem_instance=stm)

    enc_user = memo.encrypt("holger80")["message"]
    start_account = "good-karma"
    url = "https://steem-ua.com:5000/rpc"
    request = {
         "jsonrpc": "2.0",
         "id": 0,
         "method": "get_sorted_by_ua",
         "params": {"user": user["name"], "encrypted_user": enc_user, "start_account": start_account, "limit": 1}
         }
    r = requests.post(url, data=json.dumps(request))
    result = r.json()
    

results in


    {
        'id': 0,
        'jsonrpc': '2.0',
        'result': {
            'block_num': 25425038,
            'n_accounts': 1119161,
            'account': [{
                'account': 'good-karma',
                'created_at': '2016-07-07T08:15:03',
                'followers': 31435,
                'following': 163,
                'id': 14805,
                'rank': 2,
                'ua': 8.554,
                'ua_raw': 0.00534818
            }],
            'status': 'success',
            'updated_at': '2018-08-27T04:33:18'
        }
    }