DetailedProductsKit 1.0.0

DetailedProductsKit 1.0.0

Maintained by Stuart Breckenridge.


Build Status codecov CodeFactor Version License Platform

DetailedProductsKit is a Swift library for iOS and macOS that manages all interaction with the the Franklin Templeton Detailed Product API.


In order to use DetailedProductsKit you first need to register, create an app, and obtain credentials on the Franklin Templeton Developer portal.


  • Authentication with the API
  • Data download
  • JSON decoding
  • Error handling
  • Response caching
  • Get up and running three lines of code


  • iOS 12.1+
  • Xcode 10.2+
  • Swift 5.0+


DetailedProductsKit is available through CocoaPods. To integrate DetailedProductsKit into your project add the following line to your Podfile and then run pod install:

pod 'DetailedProductsKit'


The functionality offered by DetailedProductsKit is surfaced through the DetailedProductsAPI class.


Add the following import declaration to the class where you want to use the API:

import DetailedProductsKit

Create a constant:

let productsAPI = DetailedProductsAPI(key: <#CONSUMER_KEY#>, secret: <#CONSUMER_SECRET#>)


After productsAPI is initialised, you can call any of the supported API endpoints. For example, to get the latest fund NAV data:

productsAPI.getFundNav(fundKey: "US8802081039", fundKeyType: .isin) { (result) in
    DispatchQueue.main.async {
        switch result {
            case .success(let nav):
                // Handle success
            case .failure(let error):
                // Handle error


DetailedProductsAPI will cache responses to API requests by default.

If you wish to disable caching, you can do so at the point of initialisation:

let productsAPI = DetailedProductsAPI(key: <#CONSUMER_KEY#>, secret: <#CONSUMER_SECRET#>, shouldCacheResponses: false)

Alternatively, you can disable caching by setting the shouldCacheResponses variable to false:

productsAPI.shouldCacheResponses = false

If you need to remove cached responses call the following method:


Example App

An example app is included. Change this line in ViewController to include your consumer key and secret:

let productsAPI = DetailedProductsAPI(key: "CONSUMER_KEY", secret: "CONSUMER_SECRET")

Then launch the app.


Stuart Breckenridge


DetailedProductsKit is available under the MIT license. See the LICENSE file for more info.