"Open in LootX" button
1"Open in LootX" button
How to add a button to a screener, signal service, or analytics site that opens a coin directly in the LootX terminal: lootx:// links, examples in HTML, React, and JavaScript.
The “Open in LootX” button takes a user from your service straight into the trading terminal: the right coin, exchange, and market, the right panel — all with one click. Technically, it’s just a regular link with the lootx:// scheme. No API keys, registration, or server-side work on your end is needed.
How it works
The user clicks the button
Your page has a regular link like lootx://open/instrument?….
The browser asks for permission
On the first visit, the browser will ask whether it’s okay to open LootX. In Chrome and Edge, you can check “Always allow” — then the prompt won’t appear for your site again.
The terminal runs the command
If LootX is already running, the command goes to the open window — a second copy of the terminal won’t launch. If it’s closed, Windows starts it and the command runs after startup.
Quick start
Build the link
You need the instrument code in TradingView format — t, where the .P suffix means perpetual futures — and the name of your service src: the user will see it in a terminal message if the command can’t be executed.
lootx://open/instrument?t=BINANCE:BTCUSDT.P&src=myscreenerPut the link on a button
Any element the user clicks on works — see the examples below.
Test it
Open the page on a computer with LootX installed and click the button. The terminal will bring its window to the front and open BTCUSDT in the active panel.
<a class="open-in-lootx"
href="lootx://open/instrument?t=BINANCE:BTCUSDT.P&src=myscreener">
Open in LootX
</a>type Props = { exchange: string; symbol: string; perp?: boolean };
export function OpenInLootX({ exchange, symbol, perp = true }: Props) {
const t = `${exchange}:${symbol}${perp ? ".P" : ""}`;
const query = new URLSearchParams({ t, src: "myscreener" });
return <a href={`lootx://open/instrument?${query}`}>Open in LootX</a>;
}// One function for all commands: values are encoded, src is always added.
export function lootxLink(command, params = {}) {
const query = new URLSearchParams({ ...params, src: "myscreener" });
return `lootx://${command}?${query}`;
}
lootxLink("open/instrument", { t: "BYBIT:SOLUSDT.P" });
// → lootx://open/instrument?t=BYBIT%3ASOLUSDT.P&src=myscreenerTry it right from here:
Works if LootX for Windows is installed on this computer.
Ready-made links
- Open a futures contract in the active panel
lootx://open/instrument?t=BYBIT:SOLUSDT.P&src=myapp - Open spot
lootx://open/instrument?t=BINANCE:ETHUSDT&src=myapp - Show the coin on all exchanges in a new window
lootx://open/all-exchanges?s=SOLUSDT&target=window&src=myapp - Open a chart in a new window
lootx://open/panel?layout=chart&t=OKX:ETHUSDT.P&target=window&src=myapp - Send the coin to link group 3
lootx://open/instrument?t=OKX:ETHUSDT.P&link=3&target=group&src=myapp - Open a coin and immediately mark a level
lootx://open/instrument?t=BINANCE:BTCUSDT.P&level=64821.5&src=myapp - Mark a level
lootx://level/set?t=BINANCE:BTCUSDT.P&price=64821.5&src=myapp - Clear your levels (0.6.53+)
lootx://level/clear?t=BINANCE:BTCUSDT.P&src=myapp
All commands and parameters are in the lootx:// links reference.
Levels from your service
A liquidity wall screener or signal service can mark important prices in the terminal. level/set places a horizontal level on a coin, and level/clear removes it.
Starting with version 0.6.53, each level is tagged with your src: the time and sales labels the line with the service name, and level/clear removes only your levels — manually drawn ones and those placed by other services stay in place. This lets you safely update drawings: first clear your levels, then place new ones.
How to invoke the link correctly
- From the page’s main window. From an iframe with the
sandboxattribute, the browser won’t open the link. If your widget is embedded on other sites, open the link in the top window. - Encode the values. Build the link with
URLSearchParamsorencodeURIComponent. Values may contain Latin letters, digits, and_ . : -; the entire link is up to 1500 characters. - Show a fallback. You can’t reliably detect from the browser whether the terminal is installed. Open the link right away, and after a few seconds unobtrusively offer help.
openButton.addEventListener("click", () => {
location.href = lootxLink("open/instrument", { t: "BINANCE:BTCUSDT.P" });
// Not "terminal is not installed", but a hint in case nothing happened.
setTimeout(() => {
hint.textContent = "Nothing opened? Install LootX for Windows.";
hint.hidden = false;
}, 3000);
});Security and limitations
| Rule | What it means for your integration |
|---|---|
| Navigation only | The link opens a coin, panel, or window and places levels. A link cannot place, modify, or cancel an order — there are no such commands in the scheme. |
| No return channel | The terminal sends nothing back to the site and reports nothing about the user. A successful command runs silently. |
| Strict validation | Commands come from a closed list, values from allowed characters. The terminal discards an invalid value as if it were not passed. |
| Rate limiting | Up to 10 commands per second; extras are dropped. A repeated command to the same target replaces a not-yet-executed one; level commands all execute in order. |
| Compatibility | The terminal ignores unknown parameters, so new parameters don’t break old versions. |
Next steps
https://docs.lootx.trade/en/api/open-in-lootx