@a5rocks/

stonkser

Python

No description

fork
loading
Files
  • main.py
  • stonks
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
""" STONKS API """
import stonks
import time


# you can make sure you are controlling the right user!
badbot = stonks.Bot()

""" not done yet
# introducing: selling all your opponents' stonks
badbot.sell(user_id, 'all')
"""

# you can also obsessively check someone's stonks.
evil_user = stonks.User(user_id)

for _ in range(5):
  evil_user.update()
  print('balance: ' + evil_user.balance)
  print('net worth: ' + evil_user.net_worth)

  time.sleep(5)  # just don't spam the api!


# and leaderboard parsing :o
for place, user in enumerate(badbot.get_leaderboard().users):
  print(str(user) + ' is #' + str(place) + ' with a net worth of ' + str(user.net_worth))