Ana içeriğe geç

Query string parameters

Query string parameters customise the contextual behaviour of a web-based plugin in all cTrader apps. 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, asp_b, asp_t, tw_t, custom_w
id Unique plugin ID for protection against copying For example, 17238, 26047, 18359, etc.

Placement descriptions

Placement Description Platform Use active symbol (symbol) in query string?
wl_bs Trade tabs bottom sheet android, ios
so_bs Symbol overview bottom sheet android, ios ✅
so_eb Symbol overview embedded block android, ios ✅
asp_b ASP block web, windows, macos ✅
asp_t ASP tab web, windows, macos ✅
tw_t Trade Watch tab web, windows, macos
custom_w Custom window web, windows, macos

Not

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=tw_t&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