简体   繁体   中英

How to get forex data from iframe widget using javascript

I'm working on forex programming. My coding work find with demo datasource. Anyway, I found free forex data widget (iframe) called by javascript as below.

<script src="https://1forge.com/widget-cdn/forex-ticker/main.js" type="text/javascript"></script>
<div id="forex-ticker"></div> 
<script>
    ForexTicker.init(
    {
        pairs: ["EURUSD", "USDJPY", "GBPUSD", "USDCHF", "EURCHF", "AUDUSD"],
        theme: "dark", //this can be "light" or "dark" 
        margin: "10px",
        width: "100%",
        height: "600px",
  });
</script>

My silly question, Is it possible to get these iframe's data using javascript?. Any advice or guidance on this would be greatly appreciated, Thanks

If the iframe is on another domain, then by default you have no access to anything found inside. You will need to see if ForexTicker offers some sort of API to access things from within.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM