Skip to content

Reference

Multi-currency model

Each (player, currency) pair is a distinct identity on TS's side. For a player who can hold balances in multiple currencies, send a distinct userId variant per currency — e.g. 123_usd, 123_jpy, 123_usdt. Keep each variant stable. Avoid dashes in the userId.

Switching currencies = a fresh launch (new launch token, new iFrame URL).

Currency codes

Send currencyCode (alpha, lowercase or uppercase — pick a convention and stick with it) in query strings and userCurrency (numeric) in cookies.

currencyCodeuserCurrencycurrencyCodeuserCurrency
usd1aed39
eur2ngn40
aud3ugx41
cny4ghs42
gbp5sol43
jpy6bnb44
rub7usdc45
brl8trx46
pln9matic47
cad10
mxn11
chf12
thb13
btc14
mbt15
sek16
dkk17
nok18
cgx19
idr20
kes21
zar22
eth23
ltc24
usdt25
cent26
vnd27
try28
inr29
dash30
doge31
eos32
xrp33
myr34
php35
gcd36
krw37
bdt38

Send currency consistently across all callbacks for a given trade — TS uses it as part of the wallet identity lookup.

Language codes

Lowercase 2-letter ISO 639-1, with regional suffix where applicable:

en, ar, es, fr, it, kr, lv, nl, pt, ru, tr, zh-cn, zh-tw, hy, de, ja, et, sv,
hu-hu, id, ms, vi, th, fi, cs, es-mx, bg, el, lt, no, pl, ro, sk

Format rules:

  • language query param at Step-1 → uppercase 2-letter (EN, JA, ES).
  • languageSelect postMessage payload → lowercase with regional suffix (en, ja, zh-cn, es-mx).

Language switching (postMessage)

To change the iFrame's language at runtime without re-authentication, your parent page posts a message:

js
const iframe = document.getElementById('ts-tap')
const iframeOrigin = new URL(iframe.src).origin

function setLang(code) {
 iframe.contentWindow.postMessage(
 { type: 'languageSelect', payload: code },
 iframeOrigin
 )
}

iframe.addEventListener('load', () => setLang('en')) // initial sync
document.getElementById('lang-select').addEventListener('change', e => setLang(e.target.value))

Origin rules:

  • Post to the iFrame's origin only (scheme + host + port — NOT a full URL).
  • Compute origin from iframe.src so it adapts when TS changes hosts.

There's only one supported event type for now: languageSelect.