코스피/코스닥/코스피200 등의 주요시세정보를 제공합니다.
1 요청URL
| GET | 
 | 
| POST | 
URL - 
http://ds.gscms.co.kr:8888/Rest/api/StockIndex?sessionID=공개키
 
샘플
- 
http://ds.gscms.co.kr:8888/Rest/api/StockIndex?sessionID=test
 
- [application/x-www-form-urlencoded]
 
- 
path01=KOSPI
 
- [application/xml]
 
- 
<R><path01>KOSPI</path01></R>
 
- [application/json]
 
- 
{"path01":"KOSPI"}
 
 
주의사항
- filename, type, eCode, serviceKey, subFileName, wcfName 요청변수명은 사용이 불가하며, 
 
- path01 ~ path20은 Path에서 사용하지 않을 경우 사용가능.
 
- 요청변수명 중복사용시 Query보다 Body가 우선함.
 
 
 | 
2 요청변수
| 구분 | 
요청변수 | 
변수명 | 
유형 | 
필수 | 
샘플값 | 
설명 | 
| Path | 
fileName | 
요청 업무 | 
string | 
true | 
StockIndex 
 | 
StockIndex 
추가/변경 가능 
 | 
| 
path01 | 
시장코드 | 
string | 
true | 
KOSPI | 
KOSPI/KOSDAQ/KPI200 | 
| Query | 
returnType | 응답형식 | string | false | xml | xml or json HTTP Header의 Accept 사용 권장 | 
| 
eCode | 
법인코드 | 
string | 
false | 
Dataservice | 
요청 처리하고자 하는 법인코드 | 
| 
sessionID | 
공개키 | 
string | 
true | 
test | 
접근하려는 연계시스템 또는 사용자에 부여하는 Key값 | 
| 
subFileName | 
요청 업무(구분) | 
string | 
false | 
088 | 
요청 업무 세부 구분 코드(예-은행코드) | 
3 출력결과필드
| 출력변수 | 
유형 | 
샘플값 | 
설명 | 
| 
R_CODE | 
responseindex | 
0000 | 
처리결과코드 | 
| 
R_MSG | 
responseindex | 
정상 처리되었습니다 | 
처리결과메세지 | 
| 
시장지수명칭 | 
responseindex | 
 | 
 | 
| 
시장지수코드 | 
variable | 
 | 
 | 
| 
지수정보 | 
responseindex | 
 | 
 | 
| 
지수등락수치 | 
responseindex | 
 | 
 | 
| 
지수등락율 | 
responseindex | 
 | 
 | 
| 
지수등락구분 | 
responseindex | 
 | 
 | 
| 
거래량천주 | 
responseindex | 
 | 
 | 
| 
거래대금백만 | 
responseindex | 
 | 
 | 
| 
장중최고 | 
responseindex | 
 | 
 | 
| 
장중최저 | 
responseindex | 
 | 
 | 
| 
최고52주 | 
responseindex | 
 | 
 | 
| 
최저52주 | 
responseindex | 
 | 
 | 
| 
등락종목수/상한종목수 | 
responseindex | 
 | 
 | 
| 
등락종목수/상승종목수 | 
responseindex | 
 | 
 | 
| 
등락종목수/보합종목수 | 
responseindex | 
 | 
 | 
| 
등락종목수/하락종목수 | 
responseindex | 
 | 
 | 
| 
등락종목수/하한종목수 | 
responseindex | 
 | 
 | 
| 
투자자별매매동향/개인 | 
responseindex | 
 | 
 | 
| 
투자자별매매동향/외국인 | 
responseindex | 
 | 
 | 
| 
투자자별매매동향/기관 | 
responseindex | 
 | 
 | 
| 
프로그램매매동향/차익 | 
responseindex | 
 | 
 | 
| 
프로그램매매동향/비차익 | 
responseindex | 
 | 
 | 
| 
프로그램매매동향/전체 | 
responseindex | 
 | 
 | 
4 추가응답코드
개발가이드 페이지의 기본응답코드외 해당 업무특성상 추가되는 응답코드
5 Test API
Header
 | 
Key | 
Value | 
비고 | 
 | 
Content-Type
 | 
application/x-www-form-urlencoded
 | 
application/xml application/json
 | 
| 
 | 
Accept
 | 
 | 
application/xml application/json
 | 
| 
 | 
Authorization
 | 
 | 
토큰 인증용 헤더(Bearer + ' ' + 발급토큰)
 | 
| 
 | 
client_id
 | 
 | 
접속회원ID
 | 
| 
 | 
client_secret
 | 
 | 
접속비밀번호
 | 
| 
 | 
serviec_key
 | 
 | 
서비스Key
 | 
| 
 | 
user-tr-no
 | 
 | 
요청자 거래고유번호(요청자 생성)
 | 
Response
[POST]
http://ds.gscms.co.kr:8888/Rest/api/StockIndex?sessionID=test
Body
Response