Trading Page - Embedded Trading Platforms
Embedded WOW TRADER CFD platform
Our platforms are responsive. the embedding script will create the needed height for the div, make sure to NOT restrict the div height and width.
Just keep the div height and width as "100%".
In order to embed our FX/CFD platform, please first add the following code to the page HEAD section:
<script src="https://fx-trading.brand.com/bpFxCfd/embed/bpfxcfd-iframe.js"></script>
Then add the following script to the page in the location you would like the platform to show:
<div id="bpfxcfd"></div>
<script type="text/javascript">
tsApp({
apiHost: 'https://fx-trading.brand.com',
themeSet: 'default',
lang: 'en'
}).render( '#bpwidgets');
</script>
To fully embed the platform into different height of pages, you will need to write a script that will calculate the height of the div.
You can use the code we wrote as a reference only for what you should do as it is implemented in the below URL:
fx.tradesmarter.cn/bpFxCfd/embed/example-iframe.html
# Very Important - Copy and pasting this code will not work for you as each content site is different than the other.
(you should obviously replace the "https://fx-trading.brand.com" with "fx-trading.yourbrand.com" in your own script.
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Trading</title>
<link id="dynamic-favicon" href="" rel="shortcut icon">
<script src="https://https://fx-trading.brand.com/bpFxCfd/embed/bpfxcfd-iframe.js"></script>
</head>
<body style="margin: 0; padding: 0">
<h1 id="header">Embed Example</h1>
<div id="bpfxcfd"></div>
<script type="text/javascript">
const headerElement = document.getElementById('header');
const totalHeight = window.innerHeight;
const style = window.getComputedStyle ? getComputedStyle(headerElement, null) : headerElement.currentStyle;
const marginTop = parseInt(style.marginTop) || 0;
const marginBottom = parseInt(style.marginBottom) || 0;
const totalMargin = marginTop + marginBottom;
const headerHeight = headerElement.offsetHeight + totalMargin;
const embedHeight = totalHeight - headerHeight - 1;
document.getElementById('bpfxcfd').style.height = embedHeight + 'px';
tsApp({
apiHost: 'https://https://fx-trading.brand.com',
themeSet: 'default',
// lang: 'en',
}).render( '#bpwidgets');
</script>
</body>
</html>
Embedded WOW TRADER OPTIONS Platform
In order to embed our options platform, please add the following code to the page in the location you would like the platform to show:
<script src="https://trading.brand.com/options-fe/embed/options-iframe.js"></script>
<script type="text/javascript">
optionsApp({
apiHost: 'https://trading.brand.com',
lang: 'en',
hideHeader: true,
styleUrl: 'https://www.brand.com/options-platform.css'
}).render('#optionsContainer');
</script>