import tradingeconomics as te
import json

te.login('guest:guest')

te.subscribe('calendar')


def on_message(ws, message):
    data = json.loads(message)
    print data



te.run(on_message)
Exemple #2
0
import tradingeconomics as te
import json

te.login('guest:guest')


def on_message(ws, message):
    print json.loads(message)


te.subscribe('EURUSD:CUR')
te.run(on_message)
import tradingeconomics as te
import json

te.login('guest:guest')


def on_message(ws, message):
    print(json.loads(message))


#to get multiple symbols
te.subscribe(['EURUSD:CUR', 'USDRUB:CUR', 'CL1:COM', 'AAPL:US'])

#to get just one symbol
te.subscribe('EURUSD:CUR')

te.run(on_message)
import tradingeconomics as te
import json

te.login('guest:guest')


def on_message(ws, message):
    print json.loads(message)


te.subscribe(['EURUSD:CUR', 'USDRUB:CUR', 'CL1:COM'])
te.run(on_message)