Documentation Index
Fetch the complete documentation index at: https://docs.raze.bot/llms.txt
Use this file to discover all available pages before exploring further.
Integrate the Raze trading app as an iframe in your TypeScript application
Documentation Index
Fetch the complete documentation index at: https://docs.raze.bot/llms.txt
Use this file to discover all available pages before exploring further.
<iframe
id="trading-iframe"
src="https://frame.raze.sh/sol/"
frameborder="0">
</iframe>
// Get iframe reference
const iframe = document.getElementById('trading-iframe') as HTMLIFrameElement;
// Listen for messages from iframe
window.addEventListener('message', (event: MessageEvent<IframeResponse>) => {
if (event.source !== iframe.contentWindow) return;
handleIframeMessage(event.data);
});
// Send message to iframe
function sendMessage(message: IframeMessage): void {
iframe.contentWindow?.postMessage(message, '*');
}