Skip to content

Instantly share code, notes, and snippets.

@buzzkillb
Created August 23, 2020 19:25
Show Gist options
  • Save buzzkillb/f05823d8f92f9f229b9b747969cd7829 to your computer and use it in GitHub Desktop.
Save buzzkillb/f05823d8f92f9f229b9b747969cd7829 to your computer and use it in GitHub Desktop.
Get total for sale on SouthXchange
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