본문 바로가기
키움자동매매

func-GetMonthList(지수옵션 월물 리스트를 반환)

by hyunsoft 2022. 10. 12.

func-GetMonthList(지수옵션 월물 리스트를 반환)

  • Code Sample
private void funcGetMonthList() {
    string monthList = axKHOpenAPI.GetMonthList();

    //반환값의 월물간 구분은 ‘;’
    string[] spData = monthList.Split(';');

    string[] columns = new string[] { "지수옵션 월물 리스트" };
    List<string[]> list = new List<string[]>();
    list.Add(columns);

    for (int ni = 0; ni < spData.Length; ni++) {
        string[] row = new string[1];
        row[0] = spData[ni];
        list.Add(row);
    }
    PrintHtmlTable(list);
}

public void PrintHtmlTable(List<string[]> list) {
    string table = "<table>\r\n";
    for (int i = 0; i < list.Count; i++) {
        table +="<tr>";
        for (int j = 0; j < list[i].Length; j++) {
            table += string.Format("<td>{0}</td>", list[i][j]);
        }
        table +="</tr>\r\n";
    }
    table +="</table>";
    Console.WriteLine(table);
}
  • RESPONSE Data Sample
지수옵션 월물 리스트
202412
202406
202312
202309
202306
202303
202302
202301
202212
202211
202210
202210
202211
202212
202301
202302
202303
202306
202309
202312
202406
202412

 

키움증권 open-api 기본 함수 목록

728x90

댓글