GithubHelp home page GithubHelp logo

gokiwoom's Introduction

gokiwoom : Go wrapper for 키움증권 OpenAPI+

gokiwoom은 키움증권API를 golang에서 사용할 수 있도록 만든 모듈로 최대한 키움API 인터페이스를 그대로 유지하는 형태로 만들었습니다.



필수환경

키움api를 사용하려면 키움 open API+(https://www.kiwoom.com/h/customer/download/VOpenApiInfoView) 서비스 사용신청 및 API모듈을 설치하셔야 합니다.

또한 모의투자의 경우에는 별도 신청(https://www.kiwoom.com/h/mock/ordinary/VMockTotalMHOMEView) 을 하셔야 합니다. (* 모의투자기간이 제한되어 있으며, 투자기간이 종료시 재신청 필요 )


키움API 개발가이드 문서

https://download.kiwoom.com/web/openapi/kiwoom_openapi_plus_devguide_ver_1.5.pdf


예제

package main

import (
	"fmt"

	kw "github.com/smok95/gokiwoom"
)

func main() {
	kw.Initialize(1)

	// 연결상태 이벤트
	kw.SetOnEventConnect(func(errCode int32) {
		if errCode == 0 {
			fmt.Println("접속 성공")
		} else {
			fmt.Println("접속 실패")
		}

		// 종료
		kw.Disconnect()
	})

	// 접속
	kw.CommConnect()

	kw.Wait()
	
	kw.Uninitialize()
}

주의사항

32bit만 지원하며, kw_.dll이 프로세스 실행경로와 같은 위치에 존재하여 합니다.

gokiwoom's People

Contributors

smok95 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.