translation

This is an AI translated post.

(로또 사는 아빠) 살림 하는 엄마

Building an Automated Trading Program Using Korea Investment & Securities API

Select Language

  • English
  • 汉语
  • Español
  • Bahasa Indonesia
  • Português
  • Русский
  • 日本語
  • 한국어
  • Deutsch
  • Français
  • Italiano
  • Türkçe
  • Tiếng Việt
  • ไทย
  • Polski
  • Nederlands
  • हिन्दी
  • Magyar

Summarized by durumis AI

  • Korea Investment & Securities API is the only one in Korea that supports overseas stock investment, and it has the advantage of being able to develop in various environments without installing a program using REST API and Websocket methods.
  • Unlike the method of handling Kiwoom Securities' HTS with RPA, the API method enables more accurate trading, and it is possible to operate stably in a Linux environment without depending on a Windows environment.
  • Currently, I am learning and developing logic for automated trading of overseas stocks while developing Korea Investment & Securities API to help my acquaintance, and I plan to proceed with the process of collecting information necessary for API development in the future.

I had to develop an API for Korea Investment & Securities. I think it's because overseas stocks, especially US stocks, have been recovering sharply recently. I'm more interested in trading through programming. I've already had an automated trading program running on Kiwoom Securities, so I haven't been interested in Korea Investment & Securities until now. However, I got involved in helping an acquaintance, and I started to look into it in detail. Here's a short review of it.


Advantages of Korea Investment & Securities API

Explanation of Korea Investment & Securities KIS Developers Structure


First, let's take a look at the advantages of Korea Investment & Securities API as described in WikiDocs.

Comparative explanation of API


Would anyone understand this comparison table and think, "Oh, so that's why Korea Investment & Securities (new) Open API is good!" if they weren't a programmer? After all, WikiDocs is written on the premise of programming, so it feels like it's explaining things to programmers.

Here's a screenshot of the content of JoCoding's YouTubevideo.


Excerpt from Jocoding's YouTube content - Advantages of Korea Investment & Securities API

  • The only 'REST API, Websocket' method in Korea
    • No program installation required
    • Development environment doesn't matter - Windows, Mac, Linux, etc.
  • The only API in Korea that allows 'Overseas Stock Investment'
    • No need to exchange currency when using integrated evidence
  • KIS Developer provides detailed guidelines and sample code.

These are the advantages they have listed. The one to pay attention to is that it is the only API in Korea that allows 'Overseas Stock Investment'. Other securities companies will provide overseas stock investment APIs in the future, but Korea Investment & Securities is undoubtedly the leader. I have been doing automatic trading of US stocks since 2021, but I have been using the Kiwoom Securities HTS RPA method, not the API method. It's similar to a person operating it, so there is a difference in the current price at the time of checking the current price and attempting to trade. (A 2~3 second difference occurs) That's why I hope the logic I thought of would work more accurately. Therefore, the fact that an overseas stock investment API is provided means that I can implement my own trading method more accurately.

And the fact that it is the only 'REST API, Websocket' method in Korea is actually a big advantage. I'm also using Kiwoom Securities' domestic API, but I need to install Kiwoom Securities' program to develop the API, and when I develop it with python, I can only develop it in 32bit. Naturally, it must be developed and operated in a Windows environment. Looking at it this way, Kiwoom Securities' domestic API may seem to have many restrictions, but most securities companies are in a similar situation, so it doesn't feel like a big restriction. In that sense, Korea Investment & Securities' API has a relatively big advantage.


  • I can easily run the program I created on a different PC environment.
  • It can be run in a Linux environment, so it can be operated in a more stable state.
    (Windows environments have too many exceptions. Updates turn off and on as they please...)


The logic I made has been working well since 2021, but I want it to be executed more accurately and I want to be less affected by the PC environment, and I think Korea Investment & Securities API can be the solution. These two reasons alone are enough to consider moving, but the problem is the commission fees.

Korea Investment & Securities US Overseas Stock Trading Fee


Kiwoom Securities is 0.07%, so the commission fee itself is attractive. But I'm getting a 0.044% commission fee from Kiwoom Securities. And other securities companies are offering commission fee events. ㅠ_ㅠ (My trading method makes it too difficult to switch every time.) Anyway, even considering all these factors, Korea Investment & Securities' API is a very attractive securities company for those who develop and use automated trading like me.


Conclusion

I've learned about the advantages of Korea Investment & Securities API and I've also thought about changing the logic I've been running, but the reason I'm developing the Korea Investment & Securities API right now is to help an acquaintance. I chose Korea Investment & Securities out of all the various securities companies, and I will learn how to automate trading according to my desired logic through Korea Investment & Securities' API and develop it. The next thing to learn is the process of collecting information for developing Korea Investment & Securities API. Let's go!

김진혁
(로또 사는 아빠) 살림 하는 엄마
아빠는 로또를 사면서 대박을 기원합니다. 엄마가 살림 하면서 얻은 정보를 공유합니다.
김진혁
Korea Investment & Securities API Development Reference This blog post describes the process of collecting information needed to develop an automated trading program using the Korea Investment & Securities API. You can get the information needed for automated trading program development using various material

April 22, 2024

A record of the development trials and tribulations of Korea Investment & Securities API This blog post is for developers who want to create an automated trading program using Korea Investment & Securities API. It introduces the difficulties encountered in the development process, such as account opening, unsupported mock trading, and Websock

April 23, 2024

Program Auto Trading Review (Grid Trading Method) 2 Years Already! Based on my experience of using stock auto trading programs for two years, I will share the grid trading method, the process of building an automated trading system using the UiPath tool, its advantages and disadvantages, and my future plans. This include

April 21, 2024

Easy and safe US stocks US stocks offer safe and steady growth, and are an honest market that operates according to market principles without the intervention of big players. By purchasing good US stocks at a low price and holding them for life, you can generate stable returns t
eskwon
eskwon
eskwon
eskwon
eskwon

February 7, 2024

Looking forward to the next stage of growth in the Korean startup ecosystem 'Startup Investment Attraction Strategy' covers in detail the information needed in the investment attraction process, and provides practical advice on writing IR materials, concluding contracts, and negotiation strategies. It is particularly useful for s
So Yeon Kim
So Yeon Kim
So Yeon Kim
So Yeon Kim

March 25, 2024

ETF Meaning, Types, Advantages, Investment Methods ETF (Exchange Traded Fund) is an investment product that combines the advantages of stocks and funds, with low management fees and high liquidity. There are various types of ETFs, including domestic stocks, overseas stocks, bonds, and commodities, and you
세상 모든 정보
세상 모든 정보
세상 모든 정보
세상 모든 정보

April 4, 2024

🚀 [Agent Layer, Woori Bank's Chosen Node Project] First Introduction in Korea - Bitcoin/Ethereum/NFT/Airdrop Woori Bank's investment, the AgentLayer node project is a protocol for autonomous AI agent collaboration, and node sales will begin on June 3rd at 1 PM. It currently has 1.77 million users and an active community, and is scheduled to be listed on Bybit an
팀 세력, SEPOWER
팀 세력, SEPOWER
팀 세력, SEPOWER
팀 세력, SEPOWER
팀 세력, SEPOWER

June 3, 2024

3 Things to Tell a First-Time Individual Investor This is advice for individual investors who are starting to invest in stocks, focusing on value investing strategy and a positive mindset. Value investing is a strategy that finds the probability that the market will be wrong in the short term, buys it, a
고집스런가치투자
고집스런가치투자
고집스런가치투자
고집스런가치투자

April 3, 2024

Why the US stock market has been the only one rising for the past 10 years It is a common mistake for individual investors to think that investing in the stock market of a country with high economic growth will result in high returns. Economic growth does not directly affect stock market returns, and various factors such as corp
고집스런가치투자
고집스런가치투자
고집스런가치투자
고집스런가치투자

April 3, 2024