Warning
This feature is in pre-release and currently under testing. Documentation is for reference only.
Query string parameters¶
You can use query string parameters to customise and configure the contextual behaviour of a WebView plugin. The parameters you pass are applied whenever a user launches or reloads the plugin.
| Parameter | Description | Possible values |
|---|---|---|
theme | cTrader theme | light, dark |
symbol | Active (current) symbol | EURUSD, GBPJPY, USDCAD, etc |
lang | cTrader client language | ar, cs, de, el, en, es, fr, hu, id, it, ja, ko, ms, pl, pt, ru, sk, sl, sr, th, tr, vi, zh |
platform | Platform where cTrader is running | web, windows, macos, android, ios |
placement | Plugin window placement | wl_bs, so_bs, so_eb, chart, asp_b, asp_t, tw_t, custom_w |
id | Unique plugin ID for protection against copying | E.g, 17238, 26047, 18359, etc. |
Placement descriptions¶
| Placement | Description | Platform | Use active symbol (symbol) in query string? |
|---|---|---|---|
wl_bs | Trade tabs bottom sheet | android, ios | No |
so_bs | Symbol overview bottom sheet | android, ios | Yes |
so_eb | Symbol overview embedded block | android, ios | Yes |
chart | Chart area | web, windows, macos | No |
asp_b | ASP block | web, windows, macos | Yes |
asp_t | ASP tab | web, windows, macos | Yes |
tw_t | Trade Watch tab | web, windows, macos | No |
custom_w | Custom window | web, windows, macos | No |
Note
To safeguard your intellectual property and prevent copying, you can implement a mechanism that requires your plugin to pass its unique ID (id) via a GET parameter upon launch. Validate the id every time the plugin runs, and block the plugin from executing if its id does not match the expected value.
Examples¶
Simple example (without a symbol)
https://example.com/ctrader_web_app_plugin?theme=dark&lang=en&platform=web&placement=chart&id=abc123
Mobile, light theme, Portuguese and EURUSD as active symbol
https://example.com/ctrader_web_app_plugin?theme=light&symbol=EURUSD&lang=pt&platform=android&placement=wl_bs&id=def456
Desktop with ASP block, dark theme, German and GBPJPY as active symbol
https://example.com/ctrader_web_app_plugin?theme=dark&symbol=GBPJPY&lang=de&platform=windows&placement=asp_b&id=xyz789