GentBG x PUSSTEEM - burning both STEEM and PUSS

Image
by joviansummer original STEEMIT post: https://steemit.com/blog/@joviansummer/gentbg-x-pussteem-burning-both-steem-and-puss Hello, this is @joviansummer(witness: @jswit), developer of GentBG project. I registered @gentbg account to PUSSTEEM about a week ago and donated some of my own PUSS token to @gentbg's EPUSS account. Now, @gentbg will burn STEEM and EPUSS at the same time. PUSSTEEM's boosting upvotes will help increasing baseline burning significantly. @gentbg's SP reward is delegate to @jsup to get automated upvotes, forming a baseline burning of liquid reward independent of other people's upvotes. Some may argue 100%(both liquid and SP reward) burning is much better, but I chose this approach to prevent @gentbg from becoming a spamming account. Constantly asking for upvotes via mentioning and commenting every week may eventually become a big annoyance to curators. That being said, anyone is welcome to participate in countering STEEM inflation by giving upvotes ...

파이썬 beem에서 account history API 사용할 때 유의할 점 (2번째)

by joviansummer
original STEEMIT post: https://steemit.com/blog/@joviansummer/beem-account-history-api-2


파이썬 beem에서 특정 계정의 트랜잭션 이력을 조회하는 account history API를 사용할 때 주의할 점을 얼마전에도 포스팅한 적이 있습니다. 아래의 링크입니다.

파이썬 beem에서 Account 객체의 history_reverse() 함수 사용할 때 유의점

account_history_reverse() 함수를 사용할 때 1회당 조회수(batch_size)를 20개 이하로 설정해야 된다는 내용이었습니다.

그런데 최근에 또 다른 제약 사항이 있음을 발견했습니다. 동일한 IP주소에서 요청을 전송할 경우 1초당 10회 미만이 되어야 합니다. 이것은 공식 스팀 API 노드(api.steemit.com)에서 확인한 내용이며, 다른 API 노드에는 이러한 제약이 없을 수도 있습니다.

어쨌든 이력을 조회할 때 통상 for 반복문을 사용하는데, 너무 자주 조회 요청이 나가지 않도록 time.sleep() 함수를 이용해서 최소한 0.1초 이상 쉬는 시간이 있도록 하지 않으면 응답이 제대로 오지 않고 예외(exception)가 발생합니다.

이전 포스트의 코드 예시에 time.sleep()을 추가하면 아래와 같이 될 것입니다. 좀 여유 있게 0.3초 기다린 후에 다음 트랜잭션을 조회하도록 수정한 경우입니다.

from beem import Steem
from beem.account import Account
import time

steem_node = ["https://api.steemit.com"]
steem = Steem(node=steem_node)

account = Account('joviansummer', blockchain_instance=steem)

history_data = account.history(start=1, stop=5, use_block_num=False, batch_size=20)
for record in history_data:
  print(record)
  # 0.3초 기다리기
  time.sleep(0.3)

@joviansummer의 스팀 프로젝트

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

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

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

jsup 수혜자 지정 기능 추가

jsup 2.0 - 업보팅을 다시 위대하게

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

Steemit-Search - 스팀잇 포스팅 검색

Comments

Popular posts from this blog

스티미언의 영향력 지수 계산

jsup/avle code update - you don't have to write post everyday

jsup/avle 보팅 코드 갱신 - 1일1포스팅 강박에서 벗어나기