Skip to content

Commit b1ad8d6

Browse files
authored
Add API endpoint return function for getting recently ended auctions
1 parent 9e17b66 commit b1ad8d6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

api.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ def get_player_auctions(self, player_name: str) -> dict:
3434
player_auctions = json.loads(api_request)
3535
return player_auctions
3636

37+
def get_recently_ended_auctions(self) -> dict:
38+
"""
39+
Returns a `dict` of all the auctions that have recently ended within 60 seconds.
40+
"""
41+
api_request = requests.get("https://api.hypixel.net/skyblock/auctions_ended").content
42+
recently_ended_auctions = json.loads(api_request)
43+
return recently_ended_auctions
44+
3745
def get_news(self) -> dict:
3846
"""
3947
Returns a `dict` of the latest Skyblock news from Hypixel.

0 commit comments

Comments
 (0)