Skip to content

Instantly share code, notes, and snippets.

@clintmjohnson
Last active October 11, 2017 18:52
Show Gist options
  • Save clintmjohnson/7939c34685ed80b7447a987d6d4fe98e to your computer and use it in GitHub Desktop.
Save clintmjohnson/7939c34685ed80b7447a987d6d4fe98e to your computer and use it in GitHub Desktop.
Crypto Currency watch with Poloniex
def cryptoprices(pair):
from poloniex import Poloniex
apiKey = ""
secret = ""
polo = Poloniex(apiKey, secret)
market_data = polo.returnTicker()[pair]
bid = market_data["highestBid"]
ask = market_data["lowestAsk"]
volume = market_data["baseVolume"]
percentchange = market_data['percentChange']
print(pair+' '+percentchange)
btcpairs = ['BTC_ETH','BTC_XRP','BTC_STR','BTC_BCH','BTC_LTC','BTC_DASH','BTC_XMR',
'BTC_OMG','BTC_ZEC','BTC_BTS','BTC_SC','BTC_ETC','BTC_LSK','BTC_DGB',
'BTC_XEM','BTC_STRAT','BTC_MAID','BTC_FCT','BTC_ZRX','BTC_VTC','BTC_DOGE',
'BTC_BCN','BTC_STEEM','BTC_GNT','BTC_GAS','BTC_NXT','BTC_CVC','BTC_GAME',
'BTC_DCR','BTC_SYS','BTC_VIA','BTC_ARDR','BTC_CLAM','BTC_NAV','BTC_EMC2',
'BTC_RIC','BTC_REP','BTC_REP','BTC_AMP','BTC_LBC','BTC_EXP','BTC_BURST',
'BTC_XCP','BTC_XCP','BTC_NXC','BTC_NMC','BTC_VRC','BTC_FLDC','BTC_FLO',
'BTC_GNO','BTC_PINK','BTC_POT','BTC_NEOS','BTC_BLK','BTC_PASC','BTC_RADS',
'BTC_BTCD','BTC_GRC','BTC_BELA','BTC_XBC','BTC_SJCX','BTC_PPC','BTC_NAUT',
'BTC_SBD','BTC_NOTE','BTC_OMNI','BTC_XVC','BTC_XPM','BTC_BCY','BTC_HUC',
'BTC_BTM']
for pair in btcpairs:
cryptoprices(pair)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment