https://apiportal.koreainvestment.com/about
한국투자증권의 REST & WebSocket 방식 새 API 서비스를 쉽게 사용할 수 있는 Kotlin 라이브러리.
이 라이브러리는 개발중으로, API가 수시로 변경될 수 있습니다.
법인 사용이 가능하나, 개인 사용 목적으로 개발되었습니다.
개발자(devngho)와 기여자는 라이브러리의 사용에 대해 손해 등의 책임을 지지 않습니다.
Maven central에 배포되어 있습니다.
Gradle(Groovy)
implementation 'io.github.devngho:kt_kisopenapi:[VERSION]' // For kotlin multiplatform
implementation 'io.github.devngho:kt_kisopenapi-jvm:[VERSION]' // For JVM
implementation 'io.github.devngho:kt_kisopenapi-native:[VERSION]' // For kotlin multiplatform native
Gradle(Kotlin)
implementation("io.github.devngho:kt_kisopenapi:[VERSION]") // For kotlin multiplatform
implementation("io.github.devngho:kt_kisopenapi-jvm:[VERSION]") // For JVM
implementation("io.github.devngho:kt_kisopenapi-native:[VERSION]") // For kotlin multiplatform native
Pull requests를 사용하거나 Issues를 만들어주세요!
다이렉트로 API 접속(비권장)
// 예시
InquirePrice(api).call(InquirePrice.InquirePriceData(""))
- OAuth
- 접속토큰
- 발급
- 폐기
- 접속토큰
- 국내주식
- 주문
- 주문
- 정정
- 예약
- 잔고 조회
- 퇴직연금
- 시세
- 시세
- 체결
- 일자별
- 호가예상
- 투자자
- 회원사
- ELW
- 기간별 시세
- 실시간 시세
- 주문
- 국내선물옵션
- 주문
- 주문
- 정정
- 잔고 조회
- 시세
- 시세
- 기간별 시세
- 주문
- 해외주식
- 주문
- 주문
- 정정
- 예약
- 잔고 조회
- 현재가
- 체결가
- 기간별 시세
- 조건검색
- 주문
- 해외선물옵션
- 주문
- 주문
- 정정
- 잔고 조회
- 주문 내역
- 시세
- 상세
- 현재가
- 주문
- 예제 코드
// 예시(구현됨)
val stock = Stock(api, "")
stock.updateBy(StockPrice::class)
stock.price
stock.buy(price = 10000, count = 10)
stock.useLiveConfirmPrice {
print(it)
this.close()
}
레이어를 통해 접속(권장)
- Jetbrains/Kotlin - Apache License Version 2.0
- Kotlin/kotlinx.coroutines - Apache License Version 2.0
- ktorio/ktor - Apache License Version 2.0
- korge/krypto : WebSocket AES 처리를 위한 라이브러리 - MIT License
- ionspin/kotlin-multiplatform-bignum : 큰 수 처리를 위한 라이브러리 - Apache License Version 2.0