示例#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
示例#2
0
文件: agent.py 项目: chrisguida/atxcf
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