- 26/07/2024
- Contracted Projects
- Hyeseon Oh
- #project, #contracted
About the Project
There is an equation which the client thought based on the economic indices, and the client requested me to develop an application which automatically trades stocks due to the equation. The program consists of three parts: i. the part which fetches the indices, ii. the part which fetches the account information and iii. the part which actually performs the trade.
Fetching the indices
Considering the real-time property and the availability of the application, the client and I agreed on some websites to fetch indices from. They were fetched from i. the stock market API unrelated to the account information, ii. websites which provide information with JSON format and iii. websites which provide information with Microsoft Excel format. Then the data was combined in one place after JSON serialization and Excel file deciphering.
Fetching the account information
Next, from the market API, the program fetches the stock amount and the trade logs. Since the framework which I used for implementation had an inconsistent API, I had to very carefully approach on error handling. After that, considering the trade log and the stock amounts, the virtual cash data stored in the Core Data storage is changed. Then, the trade amount for each item was decided due to the given equation.
Trade in action
First, to perform the trade at given times, theoretically we could have the app to run in the background and have it trade on its own. However, eBEST XingAPI (currently LS XingAPI) and many other Korean stock trade APIs did not allow the trade to be performed in the background by requiring the currently running app's window handle in the API. This made me to fall back to the method in which a local push was used to "remind" the phone owner instead, and perform the actual trade when the button is pressed.
The trade itself is done due to the given trade amount and the price conditions.
Figures

Contribution and Information
- Period of Contribution: 1/2023 ~ 6/2023
- Total Participants: alone, except for the equation and the data sources
- My Roles: entire designing and development
- Used Tech Stacks: Apple Swift (SwiftUI, XingAPI)
I cannot provide the actual software and/or the entire source code due to the NDA.