Skip to main content

[STEP4] Loading the Widget

In this section, we will explore how to load the widget using the URL generated in [STEP2] Setting Up the Widget and the authentication keys from [STEP3] Issuing and Utilizing WG Product Authentication Keys.


(1) Creating the URL

Select the widget path you want to load in the web view and append it to the widget domain https://ux-solution.waiker.ai to create the URL.

Example: https://ux-solution.waiker.ai/insider-transaction

WidgetPage NamePath
Insider TransactionHome/insider-transaction
Search/insider-transaction/search
Transaction Details/insider-transaction/transaction/{id}
Stock Details/insider-transaction/stock/{ticker}
Mini Stock Details (No Header, No AI Briefing)/insider-transaction/stock-mini/{ticker}

(2) Adding Product-Key and JWT Token to the URL Query String for Web View Execution

Example: https://ux-solution.waiker.ai/insider-transaction?product-key=YOUR_KEY&jwt=YOUR_JWT

KeyRequiredValue TypeDefault ValueDescription
product-keyOstringNullProduct key for widget access
jwtOstringNullJWT for widget access

(3) Customizing Widget Styles

If you did not customize the widget in [STEP2] Setting Up the Widget, you can do so using the URL query string.

Example: https://ux-solution.waiker.ai/insider-transaction?product-key=YOUR_KEY&jwt=YOUR_JWT&currency=USD&country=US&show-header=true

KeyRequiredValue TypeDefault ValueDescription
anonym-idXstringNullUnique user key (e.g., for favorite stocks)
color-themeX'dark' | 'light' | 'system''light'Dark mode option
custom-styleX'default''default'Custom style per company
currencyX'USD' | 'KRW''KRW'Currency type
countryX'US' | 'KR''US'Country of the exchange
languageX'en' | 'ko''ko'Language type
show-headerXboolean'true'Whether to display the widget header
show-buy-sell-buttonXboolean'false'Whether to display buy/sell buttons

Customization specific to certain pages is also available. Browse the list and select the desired options to add them to the URL query string.

PathKeyRequiredValue TypeDefault ValueDescription
news/{id}news-tickerXstringNullFocused stock setting
news/{id}news-countryX'US' | 'KR'NullFocused stock setting

(4) Load the Completed URL in the Web View and Serve

Please check the example of integrating the web view below.

import android.os.Bundle
import android.webkit.WebView
import androidx.appcompat.app.AppCompatActivity

class MainActivity : AppCompatActivity() {

private lateinit var webView: WebView

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)

webView = findViewById(R.id.webview)
webView.loadUrl("https://ux-solution.waiker.ai/insider-transaction?product-key=YOUR_KEY&jwt=YOUR_JWT")
}
}
import UIKit
import WebKit

class ViewController: UIViewController {
var webView: WKWebView!

override func loadView() {
webView = WKWebView()
webView.navigationDelegate = self
view = webView
}

override func viewDidLoad() {
super.viewDidLoad()

let url = URL(string: "https://ux-solution.waiker.ai/insider-transaction?product-key=abcde&jwt=abcde")!
webView.load(URLRequest(url: url))
}
}