주요 내부자 거래 위젯 연동하기

두 단계를 거치면 웨이커의 위젯을 연동할 수 있습니다

Step 01

위젯 링크 복사하기

Step 02

상호 연동하기

Step 01

위젯 링크 복사하기

화면 종류

연동할 위젯 화면을 선택해 주세요

위젯 종합

실시간 거래, AI 분석 등을 종합한 화면

종목 상세

특정 종목의 거래 현황 화면

거래 상세

내부자의 모든 거래를 분석한 화면

UI 설정

컬러 테마

헤더 노출

매매 버튼 노출

데이터 설정

국가

통화 설정

제외할 종목

Product Key

JWT

미리보기

Step 02

상호 연동하기

위젯 내에서 특정 액션에 JS 인터페이스를 호출하여 고객사 앱과 연동할 수 있습니다. 위젯에서 참조할 javascript interface 이름은 WaikerInterface 입니다.

상호 연동 항목

mts-connect

1

뒤로가기

처음 위젯이 열린 화면에서 다시 APP으로 돌아갈 수 있도록 상호 연동할 수 있어요.

2

공유하기

다른 사람에게 공유할 수 있도록 버튼을 제공해요.

3

매수 화면으로 이동하기

매수 화면으로 이동할 수 있는 버튼을 제공해요.

4

매도 화면으로 이동하기

매도 화면으로 이동할 수 있는 버튼을 제공해요.

Function Name

Parameters

callbackReturn

액션 설명

newWindow

url: string;

-

새로운 웹뷰를 호출

share

title?: string; text?: string; url: string;

-

공유하기 액션

moveToBuy

ticker: string;

-

종목 매수페이지로 이동

moveToSell

ticker: string;

-

종목 매도페이지로 이동

JS인터페이스 연동 예시

1
2  webView.addJavascriptInterface(WebAppInterface(this), "WaikerInterface")
3
4class WebAppInterface(private val context: Context) {
5    @JavascriptInterface
6    fun close() {
7        // Logic to close the in-app webview that called this method
8    }
9    fun newWindow(url: String) {
10        // Logic to open a new in-app webview with the provided URL
11    }
12    // Implement the necessary logic from the list below
13}
14  
1
2  webView.configuration.userContentController.add(
3    self, 
4    name: "WaikerInterface"
5  )
6  
7extension ViewController: WKScriptMessageHandler {
8    func userContentController(
9      _ userContentController: WKScriptMessage, 
10      didReceive message: WKScriptMessage
11    ) {
12        if message.name == "WaikerInterface" {
13            if let body = message.body as? [String: Any] {
14                if let method = body["method"] as? String {
15                    switch method {
16                    case "close":
17                        // Logic to close the in-app webview that called this method
18                        break
19                    case "newWindow":
20                        if let url = body["url"] as? String {
21                            // Logic to open a new in-app webview with the provided URL
22                        }
23                        break
24                    // Implement the necessary logic from the list below
25                    default:
26                        break
27                    }
28                }
29            }
30        }
31    }
32}

연동을 위해 도움이 필요할 경우 문의 주세요

웨이커 개발자센터는 PC에서 보실 수 있어요

웨이커에서 제공하는 투자 정보는 고객의 투자 판단을 위한 단순 참고용일 뿐, 투자 제안 및 권유, 종목 추천을 위해 작성된 것이 아닙니다

© 2023 Waiker Inc. All Rights Reserved.