from xing.xasession import Session session = Session() session.login('credential.conf') print(session.account()) print(session.heartbeat()) session.logout()
from xing.xasession import Session from xing.query import Query from getpass import getpass userid = input("Id: ") passwd = getpass() session = Session() session.login(id=userid, passwd=passwd) print(session.account()) print(Query("서버시간조회").send()) print(Query("t0167").send()) print(session.heartbeat())
chart.load({ Chartdata.DAY : [ "20150101" ], Chartdata.WEEK : [ "20070101" ], Chartdata.MONTH : ("20100101", "20161231") }).process({ "SMA" : [ 5, 10, 20, 60], # 이동평균선 "BBANDS" : [20, 2], #볼랜져 밴드 period, 승수 "ATR" : 14, #ATR 지표 period "STOCH" : [ 5, 3, 0], #스토케스틱 K period, D period, D type "MACD" : [12, 26, 9], # short, long, signal "RSI" : 14, # period }) # 테스트를 위한 루프 while running: session.heartbeat() chart.load({ 5 : ["20151202"] }).process(5, { "SMA" : [ 5, 10, 20, 60], # 이동평균선 "BBANDS" : [20, 2], #볼랜져 밴드 period, 승수 "ATR" : 14, #ATR 지표 period "STOCH" : [ 5, 3, 0], #스토케스틱 K period, D period, D type "MACD" : [12, 26, 9], # short, long, signal "RSI" : 14, # period }) _5df = chart.get(5) _dayDf = chart.get(Chartdata.DAY) _weekDf = chart.get(Chartdata.WEEK) _monthDf = chart.get(Chartdata.MONTH) print(_5df)
from xing.xasession import Session from xingutils.query import Query from pprint import pprint import time if __name__ == "__main__": session = Session() session.login('credential.conf') session.heartbeat() data = Query("주식현재가호가조회").send(shcode="122630") pprint(data) session.logout()