translation

This is an AI translated post.

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

Difficulties Encountered While Developing the 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

  • This post details the difficulties experienced during the development of the Korea Investment & Securities API. Specifically, it candidly discusses challenges related to account opening, ISA account transfer, lack of mock trading support, real-time data reception via websockets, and understanding trading methodologies.
  • It highlights the lack of familiarity with ISA account characteristics, the psychological burden felt even without actual trading on a live trading account, the difficulties caused by insufficient understanding of websockets, and fundamental questions about trading methodologies, sharing the challenges encountered throughout the development process.
  • This article is based on the experience of opening a Hana Securities account about two weeks ago (as of May 30, 2024). It honestly shares the challenges faced during development and expresses a determination to find solutions in the future.

I wrote less about developing the Korean Investment & Securities API than I expected. While the previous posts were general and basic, this post describes the process of how I overcame the difficulties and trial and error I encountered during the process. Let's start with the difficulties, shall we?

Stock trading is difficult, but creating a program that does it automatically is even more challenging.


Opening a Korean Investment & Securities Account

The first difficulty I faced when I decided to develop was one that may have been unique to me. ㅠ_ㅠ It was opening a Korean Investment & Securities account. I had opened a Hana Securities account about two weeks ago for a similar reason, so I was unable to create a non-face-to-face account immediately. I forgot that there was a 20-day restriction period. Still, I needed to open an account, so I looked for a branch of Korean Investment & Securities in the area. Luckily, there was one about 40 minutes away (?) and I was able to visit and open an account.


ISA Account Transfer Failure +_+

Actually, I tried to create a non-face-to-face account first, but it was written as if transferring an ISA account opened at another bank would work immediately. I should have checked more carefully, but I agreed hastily because I needed to open an account quickly. The account was created easily, the API application was processed, and I was happy to see that the domestic API test was working well...

I found out that overseas stock trading requires a separate application. I thought it would be done automatically since I had created an account. ㅋㅋㅋㅋ I found out that I couldn't trade overseas stocks with an ISA account. It was obvious because of the nature of the ISA account, but I didn't know much about ISA accounts and I still don't. I just learned for sure this time that you can't trade overseas stocks with an ISA account.
Anyway, I visited the branch and opened an account, and the ISA account was transferred back to the previous bank. (The previous bank also called me and said that it would be returned if I didn't agree... Anyway, the ISA account seemed to be special.)

Anyway, stock trading is always easy, but the process of opening an account, installing HTS, MTS, and setting it up to trade is really difficult. Still, I created it and was able to develop through it.


Mock Trading Not Supported

REST API was really easy because it had a postman example. You could immediately check the data being requested and received, and you could convert it directly into python code through postman. However, there were quite a few functions that didn't support mock trading. While these features were not critical, it was inconvenient to have to check them in a live trading account. Checking in a live trading account wouldn't be a problem if you weren't actually trading, but I felt psychologically uneasy and the situation was uncomfortable. I hope Korean Investment & Securities will improve these aspects over time.


Websockets - Real-time Data Reception

The next difficult part was receiving real-time data through websockets.
In this part, the logic that continuously receives data is executed. I think I need to modify it so that I can send additional commands without being affected, but I couldn't find a way. This seems to be due to my lack of understanding of websockets, but also my lack of general understanding of programming languages. I will update it again when I find a solution in the future.

I don't understand websockets... Is it an infinite loop...? How do I properly connect events...? Threads... Ugh...


Trading Methodology - Molu?!

Finally, it was difficult to understand the trading methodology that users want. My trading methodology, the grid trading method, does not involve buy/sell techniques. This is because I buy/sell according to the values I set. However, typical trading methods are designed to move according to various situations, so they make buy/sell decisions based on conditional values. They gather minute data, place moving averages, and make buy/sell decisions based on ranges such as Bollinger bands. Technically, calculating conditional values is just a matter of applying a set formula, but I have a fundamental question about why we trade using this method. And I haven't gotten a good answer yet. The more I study stocks, the more difficult it seems. ^^;; (It should be 50/50 up and down, but why am I always on the downside?!)

I don't know... why it goes up and down... when to buy and sell...


I think there were many other difficulties besides these. But isn't it life to roll around and find a way to solve it? Next, I'll write about the trial and error process and alternatives for those difficulties. Fighting!!

김진혁
(로또 사는 아빠) 살림 하는 엄마
아빠는 로또를 사면서 대박을 기원합니다. 엄마가 살림 하면서 얻은 정보를 공유합니다.
김진혁
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

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

Building an Automated Trading Program Using Korea Investment & Securities API Korea Investment & Securities API is the only one in Korea that supports overseas stock investment, and it is possible to develop in various environments such as Windows, Mac, and Linux without installing a program through REST API and Websocket methods.

April 22, 2024

Why You Should Approach Investment with a Probabilistic Mindset: You’ll Never Know the Exact Cause of Investment Outcomes Investment outcomes are significantly influenced by luck, not just skill, and it is impossible to determine the exact cause. Therefore, investment should be approached with a probabilistic mindset, fighting as much as possible in favorable situations and
고집스런가치투자
고집스런가치투자
고집스런가치투자
고집스런가치투자

April 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

[SI Developer Story] 03. How to prepare for an SI company interview SI developer interviews focus more on coding ability than high technical skills, so understanding the Spring + mybatis structure learned at a government-funded training institute is sufficient. Most interviews do not include coding tests, and the decision
투잡뛰는 개발 노동자
투잡뛰는 개발 노동자
투잡뛰는 개발 노동자
투잡뛰는 개발 노동자
투잡뛰는 개발 노동자

April 16, 2024

[SI Developer Story] 09. The Start of Full-fledged Development After Joining the SI Project SI developers develop the functionalities specified in the RFP after joining the project, but frequent code changes due to additional requirements from clients make rapid development more important than efficiency. Therefore, development should focus on f
투잡뛰는 개발 노동자
투잡뛰는 개발 노동자
투잡뛰는 개발 노동자
투잡뛰는 개발 노동자
투잡뛰는 개발 노동자

April 18, 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

How to Increase Your Investment Win Rate: 1) Don’t Get Caught Up in the Majority Opinion, 2) Be Strict with the Results To increase your investment success rate, you shouldn’t get caught up in the majority opinion, and you need to be strict with the results. Through humility about success and a cold analysis of failure, you can improve your investment skills.
고집스런가치투자
고집스런가치투자
고집스런가치투자
고집스런가치투자

April 3, 2024