API
lootx:// links — open a coin in the terminal from your website, bot, or screener
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
2lootx:// Links
Reference for the lootx:// scheme: commands, parameters, instrument formats, exchanges, link groups, terminal messages, and limits.
Complete reference for the lootx:// scheme: commands, parameters, instrument addressing, and terminal messages. A step-by-step guide with button examples is in “Open in LootX” button.
Format
lootx://<command>?<parameter>=<value>&<parameter>=<value>| Rule | Value |
|---|---|
| Command | From the closed list below. An unknown command raises the terminal window and shows a message. |
| Characters in values | Latin letters, digits, _ . : -. A value cannot start with - or /. |
| Encoding | Values can be percent-encoded (BYBIT%3ASOLUSDT.P): the terminal decodes them once, then validates. |
| Length | Link — up to 1500 characters; instrument symbol and src — up to 32. |
| Parameter order | Any. If a parameter repeats, the first occurrence wins. |
| Unknown parameters | Skipped without error. |
An invalid value is discarded by the terminal as if the parameter had not been passed. Therefore a typo usually turns into the message “arrived without an instrument”.
Commands
lootx://open/instrumentOpens the instrument in an already open panel: in the selected one, or if it does not show the coin (for example, “Positions”), in the first suitable panel on the active tab. If no suitable panel exists, it creates a new one. Where exactly to open it is set by target.
Required instrument — t, id, or v + s. Optional target, link, layout, level, src. With level the terminal also places a price level, and with layout=all-exchanges it opens the coin on all exchanges.
lootx://open/instrument?t=BINANCE:BTCUSDT.P&src=myapplootx://open/panelAlways creates a new panel of type layout and opens the instrument in it — even if such a panel already exists.
Required instrument. Optional layout (default — order book), target, link, level, src.
lootx://open/panel?layout=chart&t=OKX:ETHUSDT.P&target=window&src=myapplootx://open/all-exchangesSpreads the coin across all exchanges from the user’s “All exchanges” setting.
Required symbol: s=SOLUSDT or an instrument in t / id, from which the symbol is taken. The exchange does not matter here — even t=HTX:BTCUSDT will spread BTCUSDT across LootX exchanges. target=window opens the spread in a new window, target=tab in a new tab. Without target — as configured by the user.
lootx://open/all-exchanges?s=SOLUSDT&target=window&src=myapplootx://open/terminalRaises the terminal window — and does nothing else.
lootx://open/terminallootx://link/setAssigns an instrument to link group g: all panels in the group in all windows switch to it. It does not open new panels — if the group is empty, the command still executes.
Required g and an instrument.
lootx://link/set?g=3&t=BINANCE:BTCUSDT.P&src=myapplootx://link/clearResets the instrument assigned to link group g.
Required g.
lootx://link/clear?g=3&src=myapplootx://level/setPlaces a horizontal price level. With an instrument, the terminal first switches to it; without an instrument, it places the level on the coin currently open. The level appears in the order book, and via the level mirror also on the chart.
Required price. Optional instrument, link, src.
lootx://level/set?t=BINANCE:BTCUSDT.P&price=64821.5&src=myapplootx://level/clearRemoves levels placed by the service with the same src (0.6.53+). With price — the level at that price row, without it — all your levels on the coin, in all windows. Works even when the coin’s order book is closed, and does not switch the instrument. Levels drawn by the user or placed by other services remain.
Optional instrument, price, link, src. Without an instrument, the coin is taken from the selected panel or from group link.
lootx://level/clear?t=BINANCE:BTCUSDT.P&src=myappParameters
| Parameter | Values | Default | Purpose |
|---|---|---|---|
t |
EXCHANGE:SYMBOL or EXCHANGE:SYMBOL.P |
— | Instrument in TradingView format |
v |
exchange code | — | Exchange — together with s and m |
m |
spot, perp |
spot |
Market; futures and swap are read as perp |
s |
exchange symbol, up to 32 characters | — | For example, BTCUSDT |
id |
exchange_market_base_quote[_xMULTIPLIER] |
— | Canonical instrument identifier |
target |
current, group, tab, window, pane |
current |
Where to open |
layout |
see table below | orderbook |
Which panel to create |
link |
0–100, active |
— | Link group for the opened panel; 0 — no group |
g |
1–100 |
— | Group for link/set and link/clear |
ifEmpty |
create |
— | Create a panel if the group is empty when target=group. Without the parameter — do not create |
pane |
panel identifier | — | Destination for target=pane |
price, level |
positive number with a decimal point: 64821.5 |
— | Level price. Commas and exponents (1e5) are not accepted. level on open/* places a level together with opening |
src |
service name, up to 32 characters | unknown |
Who sent the command: shown in messages and tags levels |
Always pass src: without it the user will see unknown in messages, and levels from different services cannot be removed separately.
How to specify an instrument
Three forms. If a link contains several, the first in the order id → t → v + m + s wins; the rest are skipped.
t=BINANCE:BTCUSDT.P perpetual futures
t=BINANCE:BTCUSDT spotThe most convenient form for screeners: use the same code as in a TradingView chart link.
v=bybit&m=perp&s=SOLUSDT
v=binance&s=ETHUSDT without m — spotid=binance_perp_btc_usdt
id=binance_perp_pepe_usdt_x1000Format exchange_market_base_quote, suffix _xN — for contracts with a multiplier.
The terminal looks for the symbol in the exchange’s instrument list: case and separators do not matter (btcusdt, BTC-USDT), and PEPEUSDT will find the futures contract 1000PEPEUSDT. If the exchange does not have the requested market — for example, futures on Upbit — the available one opens.
Exchanges
| Exchange | Code | Also accepted | Markets |
|---|---|---|---|
| Binance | BINANCE |
— | spot, futures |
| Bybit | BYBIT |
— | spot, futures |
| OKX | OKX |
OKEX ¹ |
spot, futures |
| Bitget | BITGET |
— | spot, futures |
| Gate | GATE |
GATEIO ¹ |
spot, futures |
| MEXC | MEXC |
— | spot, futures |
| KuCoin | KUCOIN |
— | spot, futures |
| BingX | BINGX |
— | spot, futures |
| Hyperliquid | HYPERLIQUID |
HL ¹ |
spot, futures |
| Aster | ASTER |
ASTERDEX ¹ |
spot, futures |
| Binance Alpha | BINANCEALPHA |
ALPHA ¹ |
spot |
| Upbit | UPBIT |
— | spot |
¹ Since version 0.6.53.
The code works identically in t and v, case does not matter: binance and BINANCE are equivalent. Exchanges not available in LootX (for example, HTX, BitMart, Coinbase) are named by the terminal in the message: “Exchange “HTX” is not supported in LootX” (0.6.53+).
Where to open
| Value | What happens |
|---|---|
current |
The selected panel. Together with link, the instrument also goes to the whole group. |
group |
Only panels of group link in all windows; the selected panel does not change. If the group is empty — a message or a new panel with ifEmpty=create. |
tab |
A new tab. |
window |
A new window. Since 0.6.53 it opens as the current one: for a maximized terminal — maximized. |
pane |
A specific panel by pane=<id> in any window, including detached ones. |
What to create
| Value | Panel |
|---|---|
orderbook |
Order book |
chart |
Chart |
tape |
Time and sales |
liqmap |
Liquidity map |
combo1 |
Combo: chart on top, order book below |
combo2 |
Combo: order book on top, chart below |
combo3 |
Combo: chart on top, two order books below |
combo4 |
Combo: two order books on top, chart below |
all-exchanges |
Coin on all exchanges |
Link groups
Terminal panels are combined into link groups: changing the coin in one panel switches the whole group — in all windows, including background tabs. In the interface, groups are distinguished by color; in a link, only by number.
| Value | Meaning |
|---|---|
1–100 |
Group with this number |
active |
“To active window” mode: the panel shows the same coin as the selected panel (only in link) |
0 |
No group: a new panel does not follow anything (only in link) |
Terminal messages
A successful command runs silently. If it cannot be executed, the terminal raises the window and shows a message with the name from src:
| Situation | Message |
|---|---|
| Unknown command | Unknown command from “myapp” |
| No instrument | Command from “myapp” arrived without an instrument |
| Instrument not found | BTCUSDX — not found (request from “myapp”) |
| Exchange not supported ¹ | Exchange “HTX” is not supported in LootX (request from “myapp”) |
| Exchange not specified ¹ | Command from “myapp” did not specify an exchange |
| No panels in group | No panels in group 3 (request from “myapp”) |
| Panel not found | Panel not found (request from “myapp”) |
| No level price | Command from “myapp” arrived without a level price |
| Other failure | Could not execute command from “myapp” |
¹ Since version 0.6.53.
Limits
| What | Value |
|---|---|
| Rate | Up to 10 commands per second; excess is dropped without a message. |
| Queue | Up to 32 commands. On overflow, the oldest are dropped first. |
| Duplicates | A new command to the same target replaces a not-yet-executed one. Level commands are not replaced and run in order. |
| Trading | Unavailable: a link cannot place, modify, or cancel an order. |
| Response | None: the channel is one-way; the terminal does not report back to the site. |
https://docs.lootx.trade/en/api/deep-links
3Opening options and linking groups
All ways to open a coin with lootx://: selected panel, linking group, new panel, tab or window, all-exchanges, level with the coin — ready links and a comparison.
The same coin can open in the terminal in different ways: in the panel the user is looking at now, across their whole linking group, in a new tab or window, or immediately on all exchanges. This page lists every option — with ready links, an explanation of what will happen in the terminal, and a hint when to use each.
Basics and a sample button are in Button “Open in LootX”, the full list of parameters is in the lootx:// deep-links reference.
What composes an opening variant
The coin in the link is almost always specified the same way — t=EXCHANGE:SYMBOL, with .P for a perpetual futures contract. Three other parameters define the opening variant:
| Question | Parameter | Values |
|---|---|---|
| Where to open | target |
selected panel · only linking group · new tab · new window |
| Which group to link to | link |
1–100 — group, active — “To active window”, 0 — no group |
| Which panel to create if a new one is made | layout |
order book, chart, time and sales, liquidity map, combos, all-exchanges |
Without these parameters the link acts as the default variant — it changes the coin in the selected panel.
Choose a variant
Default behaviour: the user clicks and sees the coin where they are already looking.
In the selected panel and in the linking groupThe coin arrives in the current panel and in all panels of the user’s linking group.
Only in the linking groupThe group switches, while what the user is working with right now stays unchanged.
New panel, tab or windowAdd a chart or order book without touching the open panels.
On all exchangesOne coin — columns across all the user’s exchanges.
Level together with the coinOpen the coin and place a horizontal price level with a single link.
In the panel the user is looking at
lootx://open/instrument?t=BINANCE:BTCUSDT.P&src=myapp- The coin opens in the selected panel — the panel the user last used.
- Its linking group and panels set to “To active window” switch along with it — the same behavior as when the user picks a coin from the terminal list.
- If the selected panel has no coin, for example “Positions”, the coin opens in the first suitable panel on that tab. If there are no suitable panels, a new order book appears on the tab.
Suitable when the user clicks in your service and immediately looks at the terminal: screener, signals table, news feed.
In the selected panel and in the linking group
lootx://open/instrument?t=BINANCE:BTCUSDT.P&link=3&src=myapp- The selected panel gets the coin — same as the default variant.
- At the same time all panels in group 3 across all terminal windows receive it, including background tabs.
- The selected panel does not join group 3: its own linking group remains unchanged.
Suitable when the user has a dedicated group “for your service” that should follow every click, and you also need to switch the current panel.
Only in the linking group
lootx://open/instrument?t=BINANCE:BTCUSDT.P&link=3&target=group&src=myapp- Only panels in group 3 across all windows receive the coin.
- The selected panel does not change: the user can trade one coin and simultaneously view your signals in a separate group.
- If the group has no panels, the terminal shows the message ‘Group 3 has no panels (request from “myapp”)’.
To have the terminal create a place instead of showing the message, add ifEmpty=create:
lootx://open/instrument?t=BINANCE:BTCUSDT.P&link=3&target=group&ifEmpty=create&src=myappIf the group is empty, a new panel — an order book or the type specified in layout — will appear on the active tab and immediately join group 3. Subsequent links will arrive in that panel.
Suitable for most screeners. This is the cleanest option: your service manages its own linking group and does not interfere with the rest of the user’s workspace. How to let the user pick a group — see Linking group in your service.
New panel next to the current ones
lootx://open/panel?layout=chart&t=BINANCE:BTCUSDT.P&src=myappopen/panel always creates a new panel — even if the same panel type is already open — and adds it to the active tab. Open panels are not changed. The panel type is set by layout:
layout |
Panel |
|---|---|
orderbook |
Order book — default |
chart |
Chart |
tape |
time and sales |
liqmap |
Liquidity map |
combo1 … combo4 |
Combo of chart and order books — variants in the reference |
With link=5 the new panel immediately joins group 5, and the other panels in that group switch along with it.
In a new tab
lootx://open/panel?layout=combo1&t=BINANCE:BTCUSDT.P&target=tab&link=5&src=myappThe terminal opens a new tab — or uses an existing empty one — names it after the coin and creates the layout panel inside. Without link the panel is not in any linking group.
In a new window
lootx://open/panel?layout=chart&t=OKX:ETHUSDT.P&target=window&src=myappA new window with the layout panel is brought to the foreground. Since v0.6.53 it opens in the same state as the current one: if the terminal window is maximized, the new one will be maximized too. Useful for a second monitor.
The coin on all exchanges
lootx://open/all-exchanges?s=SOLUSDT&src=myappThe terminal lays out the coin in columns across all exchanges — according to the user’s “All exchanges” settings: the set and order of exchanges, spot and futures, chart position.
- Each column gets its own linking group automatically, so columns do not interfere with each other or with other panels.
- Without
targetthe layout opens where the user has configured it.target=tab— always a new tab,target=window— always a new window. - The exchange itself is irrelevant here; only the symbol is needed: even
t=HTX:BTCUSDTwill lay out BTCUSDT across LootX exchanges.
lootx://open/all-exchanges?s=SOLUSDT&target=window&src=myappSuitable for arbitrage and analytics services: the user immediately compares order books for the same coin across venues.
Open and immediately mark a level
lootx://open/instrument?t=BINANCE:BTCUSDT.P&level=64821.5&link=3&target=group&src=myappThe level parameter can be added to any opening variant: the terminal first opens the coin according to target and link, then places a horizontal level at price 64821.5. The level is attributed to your src, and can later be removed with the level/clear command without touching the user’s drawings. More — see Levels from your service.
Switch a group without opening anything
lootx://link/set?g=3&t=BINANCE:BTCUSDT.P&src=myappAll panels of group 3 across all windows switch to the coin. The command does not create panels, open windows, or show messages — even if the group is empty.
link/clear?g=3 clears the coin stored for the group — open panels are not changed.
Just raise the terminal
lootx://open/terminal?src=myappBrings the terminal window to the foreground — for example, for a “Go to terminal” button next to other actions.
Comparison of variants
| Link | Selected panel | Panels in group | What appears |
|---|---|---|---|
open/instrument |
Changes together with its group | — | Order book, if no suitable panel exists |
open/instrument + link=3 |
Changes | Group 3 changes | Order book, if no suitable panel exists |
open/instrument + link=3&target=group |
Does not change | Group 3 changes | Nothing; if the group is empty — a message |
… + ifEmpty=create |
Does not change | Group 3 changes | A panel in group 3 if the group was empty |
open/panel |
Does not change | With link — the group changes |
New panel on the tab |
open/panel + target=tab |
Does not change | With link — the group changes |
New tab |
open/panel + target=window |
Does not change | With link — the group changes |
New window |
open/all-exchanges |
Does not change | Each column has its own group | “All exchanges” tab or window |
link/set?g=3 |
Does not change | Group 3 changes | Nothing |
Linking group in your service
Terminal panels are grouped into linking groups: changing the coin in one panel switches the whole group. In the terminal UI groups are distinguished by color, in the link they are addressed by number only.
The best pattern for a screener is to let the user pick a group once in your service settings and then send every click to that group. The user does not pick a group on each transition, and the terminal group always shows what they selected in your UI.
To make the choice look familiar, color your groups the same way the terminal does:
| Group | Color in terminal | Color code |
|---|---|---|
1 |
Red | #EF5350 |
2 |
Blue | #42A5F5 |
3 |
Green | #66BB6A |
4 |
Orange | #FFA726 |
5 |
Purple | #AB47BC |
6 |
Teal | #26C6DA |
7 |
Yellow | #FFEE58 |
8 |
Pink | #EC407A |
// The group the user chose in your settings (1–8).
const group = settings.lootxGroup ?? 3;
export function openInLootx(tvSymbol) {
const query = new URLSearchParams({
t: tvSymbol, // "BINANCE:BTCUSDT.P"
link: String(group),
target: "group",
ifEmpty: "create", // the first click creates the panel in the group
src: "myscreener",
});
location.href = `lootx://open/instrument?${query}`;
}What happens on the terminal side
| Situation | What will happen |
|---|---|
| Terminal is closed | Windows will launch LootX. The command waits for the terminal to load and then executes. |
| Terminal already open | The command goes to the running terminal — a second copy is not started. |
| Window is minimized or covered by other windows | On every command the window is restored and brought to the foreground. |
| Multiple windows are open | The command arrives to the active terminal window — the one the user worked in last. |
| The user clicks many times in a row | A new command to the same target replaces the pending one: the terminal will open the last selected coin, not cycle through them all. Level commands are not replaced and are executed in order. |
| The command failed to execute | The terminal shows a message with the name from src — list in the reference. |
Recipes
The user picks a group in the screener settings. A click on a row opens the coin in that group and marks the liquidity wall price:
lootx://open/instrument?t=BINANCE:SOLUSDT.P&link=3&target=group&ifEmpty=create&level=182.45&src=densityscreenerWhen the wall is eaten, the screener removes its mark — the user’s drawings remain:
lootx://level/clear?t=BINANCE:SOLUSDT.P&price=182.45&src=densityscreenerEach signal opens the coin next to the user’s current work — in a separate window with a combo chart, convenient to keep on a second monitor:
lootx://open/panel?layout=combo1&t=BYBIT:ETHUSDT.P&target=window&src=signalbotFor frequent signals it’s better to send the coin to one group rather than opening a window per signal:
lootx://open/instrument?t=BYBIT:ETHUSDT.P&link=5&target=group&ifEmpty=create&src=signalbotCompare a coin across all the user’s exchanges — in a new tab:
lootx://open/all-exchanges?s=ETHUSDT&target=tab&src=arbitrageOpen two markets of the same coin — spot and futures — in different groups:
lootx://open/instrument?t=BINANCE:ETHUSDT&link=1&target=group&ifEmpty=create&src=arbitrage
lootx://open/instrument?t=BINANCE:ETHUSDT.P&link=2&target=group&ifEmpty=create&src=arbitrageOne link executes one command: two links are two clicks or two navigations in a single click handler.
Next
https://docs.lootx.trade/en/api/open-variants