[개발] 스몬 카드 투자[13]

in #sct5 years ago

오늘 스몬KR 카카오방에서 매도 중인 카드 리스트를 알고 싶다는 요청이 있었습니다. 유용한 기능으로 생각이 되어서 추가해보았습니다.

파이썬 프로그램은 아래 사이트에 있습니다. "run" 버튼을 누르시면 실행이 됩니다.
https://repl.it/@zonemultiwhs/smonall

명령어는 4번이고, 사용법은 아래와 같습니다.
4 계정명

이번에 새로 나온 reward 카드 골드를 받으신 분의 현재 매도 내역입니다.

그리고 사용의 편의를 위하여 한가지 기능을 추가하였습니다.
계정명을 입력하여야 하는 명령어의 경우에 계정명을 입력하지 않으면 INT_ACCOUNTS에 있는 첫 번째 계정으로 검색을 합니다. 따라서 4번 명령어의 경우에 4번만 입력하면 미리 정의된 계정으로 검색을 하게 되어서 불필요하게 계정명을 반복 입력할 필요가 없어졌습니다.

INT_ACCOUNTS = ['관심계정명']

기존 card 가격을 출력하는 함수를 조금만 수정하면 될 것으로 생각을 하였는데, 수정할 사항이 조금 많았습니다. 그리고 출력할 때 일반카드만 출력하고 골드카드도 함께 매도 주문이 있으면 뒤에 "+ gold"를 추가하는 방식으로 코딩을 하였습니다.

그런데 일반 카드는 없고, 골드 카드만 주문한 경우가 있더군요. 제보해주신 @gfriend96님 감사합니다.

그래서 아래와 같은 코드를 추가하였습니다. 이미 출력한 카드 ID가 들어있는 displayed list를 받은 후 여기 없는 카드만 출력하는 함수 입니다.

def    print_pending_gold_only(displayed, sglist) :
    for card in sglist :
        if card[0] not in displayed :
            displayed.append(card[0])
            print_this_pending_order(card, 'Gold', 0)

이 기능을 만든 후 몇 번 돌려보니, 의외로 유용한 기능으로 보입니다. 총 합이 나오기 때문에 매일 한 번씩 돌려보면 어제 몇 장이 팔렸는지 확인할 수도 있겠더군요. 또한 황당하게 높은 가격에 주문을 낸 경우에 가격을 조정할 수도 있을 것 같습니다.

뭔가를 전체적으로 볼 수 있다면 새로운 인사이트를 발견할 수 있는 것 같습니다.

Sort:  

jcar토큰 9월 구독 보팅입니다.
좋은 하루 보내세요. ^^

Hi @tradingideas!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your UA account score is currently 4.398 which ranks you at #2480 across all Steem accounts.
Your rank has not changed in the last three days.

In our last Algorithmic Curation Round, consisting of 109 contributions, your post is ranked at #23.

Evaluation of your UA score:
  • Some people are already following you, keep going!
  • The readers like your work!
  • Try to work on user engagement: the more people that interact with you via the comments, the higher your UA score!

Feel free to join our @steem-ua Discord server

Congratulations @tradingideas! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You received more than 60000 upvotes. Your next target is to reach 65000 upvotes.
You published a post every day of the week

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

빨리 파이슨 배워서 트아님 따라하고 싶은데 시간이 녹녹치 않네요.

시간을 내셔야 합니다.

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.034
BTC 64136.70
ETH 3128.20
USDT 1.00
SBD 3.94