Build Stocks App with SwiftUI & Charts: Part 1 π
Create a Yahoo Finance API service for a SwiftUI Stocks app in this first part of the series. Learn to build the foundation with Swift Charts.

Xcoding with Alfian
12.8K views β’ Sep 12, 2022

About this video
This is the 1st part of "Build Stocks App with SwiftUI & Swift Charts" series. In this part, we're going to create an API Service SPM Library to interface with Yahoo Finance REST API using Swift. #ios16 #swiftcharts #swiftui
We will learn on how to flatten Nested JSON to Swift models using Custom CodingKeys and init decoder.
Completed Project Swift Package GitHub Repository - XCAStocksAPI:
https://github.com/alfianlosari/XCAStocksAPI
Yahoo Finance REST API Postman Collection Download Link:
https://drive.google.com/file/d/1GzLBLGSE4nRjjj-bI0nSV0Un5VGiKO5j/view?usp=sharing
Timeline:
00:00:00 Introduction
00:01:25 Setup SPM Package - Library and Executable Targets
00:08:40 Fetch Quotes API Model & JSON Decoding
00:35:14 Search Tickers Symbols API Model & JSON Decoding
00:46:22 Fetch Charts API Model & JSON Decoding
01:19:23 Stocks API Service - Constants, APIError Model & Private Helpers
01:31:33 Fetch Quotes API
01:36:37 Search Tickers Symbols API
01:42:49 Fetch Charts API - ChartRange enum
01:52:42 Add SPM Library to an iOS project
01:57:14 Summary & Closing
Completed Project Swift Package GitHub Repository - XCAStocksAPI:
https://github.com/alfianlosari/XCAStocksAPI
Part 2 - Build My Ticker Symbol List and Search:
https://youtu.be/HYC0WboiImU
Yahoo Finance REST API Postman Collection Download Link:
https://drive.google.com/file/d/1GzLBLGSE4nRjjj-bI0nSV0Un5VGiKO5j/view?usp=sharing
Yahoo Finance API:
https://finance.yahoo.com/quotes/API,Documentation/view/v1/
We will learn on how to flatten Nested JSON to Swift models using Custom CodingKeys and init decoder.
Completed Project Swift Package GitHub Repository - XCAStocksAPI:
https://github.com/alfianlosari/XCAStocksAPI
Yahoo Finance REST API Postman Collection Download Link:
https://drive.google.com/file/d/1GzLBLGSE4nRjjj-bI0nSV0Un5VGiKO5j/view?usp=sharing
Timeline:
00:00:00 Introduction
00:01:25 Setup SPM Package - Library and Executable Targets
00:08:40 Fetch Quotes API Model & JSON Decoding
00:35:14 Search Tickers Symbols API Model & JSON Decoding
00:46:22 Fetch Charts API Model & JSON Decoding
01:19:23 Stocks API Service - Constants, APIError Model & Private Helpers
01:31:33 Fetch Quotes API
01:36:37 Search Tickers Symbols API
01:42:49 Fetch Charts API - ChartRange enum
01:52:42 Add SPM Library to an iOS project
01:57:14 Summary & Closing
Completed Project Swift Package GitHub Repository - XCAStocksAPI:
https://github.com/alfianlosari/XCAStocksAPI
Part 2 - Build My Ticker Symbol List and Search:
https://youtu.be/HYC0WboiImU
Yahoo Finance REST API Postman Collection Download Link:
https://drive.google.com/file/d/1GzLBLGSE4nRjjj-bI0nSV0Un5VGiKO5j/view?usp=sharing
Yahoo Finance API:
https://finance.yahoo.com/quotes/API,Documentation/view/v1/
Tags and Topics
Browse our collection to discover more content in these categories.
Video Information
Views
12.8K
Likes
282
Duration
01:58:08
Published
Sep 12, 2022
User Reviews
4.6
(2) Related Trending Topics
LIVE TRENDSRelated trending topics. Click any trend to explore more videos.
Trending Now