Created
August 23, 2020 19:25
-
-
Save buzzkillb/f05823d8f92f9f229b9b747969cd7829 to your computer and use it in GitHub Desktop.
Get total for sale on SouthXchange
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import statistics | |
import requests | |
#denarius.io | |
#denarius.pro | |
#https://main.southxchange.com/Market/Book/D/BTC | |
# TODO: Add error handling | |
southx_book = requests.get("https://www.southxchange.com/api/book/D/BTC").json() | |
southx_book_sum = sum(map(lambda x: float(x['Amount'] or 0), southx_book['SellOrders'])) | |
print(southx_book_sum) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment