Esempio n. 1
0
def get_fund_asset_prices():
    price_d = prices.get_fund_asset_prices()
    output = "<p>"
    for key, val in price_d.iteritems():
        if isinstance(val, str):
            output += "{0}: {1}<br />".format(key, val)
        else:
            output += "{0}: {1:.8f}<br />".format(key, val)
    output += "</p>"
    return output
Esempio n. 2
0
def get_prices(message):
    # Message is replied to the sender (prefixed with @user)
    p = prices.get_fund_asset_prices()
    message.reply(str(p))
    print p