1k-tradingview-communication
Installation
SKILL.md
TradingView Communication
Use this to avoid re-discovering the bridge between the OneKey app repository and the separate TradingView chart repository. Do not assume fixed local filesystem paths; locate files by symbol names with rg.
Mental Model
The app loads the chart app inside WebView/iframe and both sides exchange plain message objects.
- Chart -> app:
$privatepayloads withscope,origin,method, anddata. - App -> chart:
webRef.current.sendMessageViaInjectedScript(message), which lands in the chart aswindow.postMessage(message). - Web/extension uses iframe
postMessage; native/desktop injects a script that callswindow.postMessage(...). - Market mode data normally comes from the OneKey app/background service. Perps/Hyperliquid candles are fetched by the chart app directly, while marks, price scale, symbol sync, and chart lines still use the app bridge.
Search Anchors
Start with rg instead of assuming local paths.
App repo anchors: