파이썬과 SDS API를 이용해서 특정 계정을 증인 프록시(witness proxy)로 설정한 계정 조회

in hive-141029 •  2 years ago 

SDS API를 이용해서 특정 계정을 증인 프록시로 설정한 계정의 목록을 조회할 수 있습니다. 예를 들어 @avle 계정을 증인 프록시로 설정한 계정들을 조회하려면 아래와 같이 할 수 있습니다.

import requests
import json

steem_id = 'avle'

sds_url = 'https://sds.steemworld.org/witnesses_api/getAccountsByWitnessProxy/' + steem_id
response = requests.get(sds_url)
res_dict = json.loads(response.text)

res_list = res_dict["result"]

requests.get()을 이용해서 증인 프록시를 조회하기 위한 url에 접속해서 응답을 받아 옵니다. 응답은 json 형식의 문자열인데, json.loads() 함수를 이용해서 딕셔너리(dict) 형식으로 변환합니다. "result" 키(key)에 계정 목록이 있으므로, 위의 예시처럼 해당 키의 값을 가져오면 됩니다.


@joviansummer의 스팀 프로젝트

스팀 증인노드를 운영중입니다. @jswit에 증인투표해 주시면 감사하겠습니다.
(https://steemitwallet.com/~witnesses)

jswit 증인 노드 프로젝트를 시작합니다.

jsup 업보팅(upvoting) 서비스 소개

jsup 수혜자 지정 기능 추가

jsup 서비스에 큐레이션 보상 분배 기능이 추가되었습니다.

jSTEEM 프로젝트 - 텔레그램 챗봇으로 구현하는 스팀 블럭체인 탐색기

STEEM.NFT - 디지털 아트 보존 프로젝트


Posted through the AVLE Dapp (https://avle.io)

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Thank you, friend!
I'm @steem.history, who is steem witness.
Thank you for witnessvoting for me.
image.png
please click it!
image.png
(Go to https://steemit.com/~witnesses and type fbslo at the bottom of the page)

The weight is reduced because of the lack of Voting Power. If you vote for me as a witness, you can get my little vote.

image.png

Upvoted! Thank you for supporting witness @jswit.