Widget reference
A widget is a URL. Everything on this page can be written by hand, by you or by an AI assistant, from one piece of information: the slug of the account.
| Iframe widgets | Image widgets | |
|---|---|---|
| What they are | Live, interactive pages shown in an <iframe> | PNG or SVG files that redraw themselves on every request |
| Where they go | Any site that accepts HTML | Forum signatures, emails, GitHub READMEs, chats, builders that strip code |
| Types | 7 | 11 |
| Login or API key | None | None |
| Updates | Automatic, at every closed trade | Automatic, at every request |
| Required link back | No: the widget already links to the account page | Recommended: wrap the image in a link to the account page |
Both work for a published account (including an unlisted one) and for a published portfolio. A private account shows a fallback card instead of its data.
Find the slug
The slug is the last part of the account's public URL:
https://showmytrades.com/account/YOUR-ACCOUNT-SLUG
└── this is the slug
A published portfolio has its own slug, at the same kind of URL
(https://showmytrades.com/account/YOUR-PORTFOLIO-SLUG), and works with every widget below in
exactly the same way.
If you only have a login, the account's page is one click away from the dashboard, and the
widget builder lists your accounts and portfolios directly. With the API,
GET /api/v1/accounts returns the slug of every account you own.
Iframe widgets
URL
https://showmytrades.com/widget/YOUR-ACCOUNT-SLUG?type=TYPE&theme=THEME
Types
type | What it shows | Default size (px) | Height |
|---|---|---|---|
stats | Card with balance, gain, trades and win rate | 400 × 212 | Fixed |
stats-inline | One horizontal row with the same metrics, for tables of several accounts | 750 × 80 | Fixed |
equity | Interactive growth chart, with balance, equity, profit and drawdown views | 1000 × 400 | Dynamic |
monthly | Monthly returns table and chart | 1040 × 400 | Dynamic |
currency-pair | Statistics per symbol, table and chart | 900 × 400 | Dynamic |
trades | Closed and open trades with the balance after each one | 1100 × 520 | Dynamic |
complete | Full dashboard: overview plus every chart | 1500 × 900 | Dynamic |
Without type the widget is stats.
Parameters
| Parameter | Values | Default | Applies to |
|---|---|---|---|
type | one of the seven types above | stats | all |
theme | auto (follows the visitor's system), light, dark | auto | all |
bgColor | any CSS colour, URL-encoded (%23ffffff for #ffffff) | theme background | all |
chartColors | base64 of a JSON object with the colours to change, see below | account's own colours | equity, complete |
chartVisibility | base64 of a JSON object with the lines and areas to hide, see below | everything visible | equity, complete |
chartColors and chartVisibility are produced by the widget builder. The keys of chartColors
are balanceMain, balanceVolume, balanceEquity, balanceDeposit, balanceWithdrawal,
profitMain, profitDrawdown, twrTrade, twrDailyMain, twrDailyVolume, twrDailyEquity
and drawdown, each an rgba(...) string; only the keys you include are changed. chartVisibility
has one key per chart (twrDaily, balance, profit, twrTrade, drawdown), each with
enabled and a lines object of booleans. When in doubt, leave both out: the widget uses the
colours the owner set on the account page.
Snippet
Fixed-height widgets (stats, stats-inline) need only the <iframe>:
<iframe
src="https://showmytrades.com/widget/YOUR-ACCOUNT-SLUG?type=stats&theme=auto"
width="400"
height="212"
loading="lazy"
frameborder="0"
style="border-radius: 8px; width: 400px;">
</iframe>
Dynamic-height widgets grow with their content, so they post their height to the parent page.
Add the small script after the <iframe> and give the <iframe> an id:
<iframe
id="smt-equity"
src="https://showmytrades.com/widget/YOUR-ACCOUNT-SLUG?type=equity&theme=auto"
width="100%"
height="400"
loading="lazy"
frameborder="0"
style="border-radius: 8px; width: 100%;">
</iframe>
<script>
(function() {
var iframe = document.getElementById('smt-equity');
window.addEventListener('message', function(e) {
if (e.data?.type === 'widget-resize' && e.source === iframe.contentWindow) {
iframe.height = e.data.height;
}
});
})();
</script>
Several widgets on one page: give each <iframe> a different id and repeat the script with
that id, or make the script loop over all of them. Without the script the widget still works,
cut at the height you set.
A width of 100% is the right choice for responsive layouts; the charts redraw to fit.
Image widgets
URL
https://showmytrades.com/api/widget-image/YOUR-ACCOUNT-SLUG/TYPE_THEME.FORMAT
Three parts, joined as in growth-daily_dark.png: the type, an underscore, the theme, a dot,
the format.
Types
TYPE | What it shows | Size (px) | Formats |
|---|---|---|---|
stats | Card: gain, drawdown, balance, equity | 310 × 170 | PNG, SVG |
stats-inline | Horizontal bar with the same four metrics | 750 × 80 | PNG, SVG |
summary | Growth, drawdown, last update and a growth chart | 500 × 290 | PNG, SVG |
growth-daily | Daily time-weighted growth chart | 1000 × 450 | PNG, SVG |
growth-trade | Growth per closed trade | 1000 × 455 | PNG only |
growth-mini | Compact growth line, no title or axes | 400 × 200 | PNG, SVG |
balance | Balance and equity lines | 1000 × 450 | PNG, SVG |
profit | Net profit with the drawdown overlaid | 1000 × 455 | PNG, SVG |
drawdown | Drawdown percentage bars | 1000 × 455 | PNG, SVG |
monthly | Monthly returns table (height follows the rows) | 1066 × 400+ | PNG, SVG |
currency-pair | Statistics per symbol (height follows the rows) | 1196 × 400+ | PNG, SVG |
Themes and formats
| Part | Values | Notes |
|---|---|---|
THEME | light, dark, transparent | transparent has no background: use it over a coloured page |
FORMAT | png, svg | PNG works everywhere, including forums and email; SVG is sharper and accepts custom colours |
SVG colour parameters
Only for .svg. Each value is a hex colour without the #, six characters.
| Parameter | Meaning | Available on |
|---|---|---|
bg | Background | all |
text | Main text | all |
positive | Gain colour | stats, stats-inline |
negative | Drawdown colour | stats, stats-inline |
label | Labels or axis labels | summary and every chart type |
grid | Grid lines | chart types |
line | Main line | summary and every chart type |
line2 | Secondary line | growth-daily, balance, profit |
animated | 0 turns off the drawing animation | chart types |
hideline, hideline2, hidearea | 1 hides the main line, the secondary line or the filled area | chart types |
https://showmytrades.com/api/widget-image/YOUR-ACCOUNT-SLUG/growth-daily_transparent.svg?line=00dc82&text=ffffff&animated=0
Snippets
HTML, with the link back to the account page:
<a href="https://showmytrades.com/account/YOUR-ACCOUNT-SLUG">
<img src="https://showmytrades.com/api/widget-image/YOUR-ACCOUNT-SLUG/summary_dark.png" alt="Trading results, updated automatically" width="500" height="290">
</a>
Markdown (GitHub README, documentation sites):
[](https://showmytrades.com/account/YOUR-ACCOUNT-SLUG)
BBCode (forum signatures):
[url=https://showmytrades.com/account/YOUR-ACCOUNT-SLUG][img]https://showmytrades.com/api/widget-image/YOUR-ACCOUNT-SLUG/stats-inline_light.png[/img][/url]
Which one to pick
| You want | Use |
|---|---|
| One chart on a web page | Iframe equity, width 100% |
| A small card in a sidebar | Iframe stats, or image summary |
| A table of several accounts | One iframe stats-inline per row |
| Several accounts as one result | A published portfolio, then any widget with the portfolio's slug |
| A place that refuses HTML (forum, email, README) | An image widget |
| A design the widgets do not offer | The API, with the attribution link |
Let the API compose it
If you would rather not assemble the snippet, one request returns it ready, after checking that the account exists and is published. No key is needed for a published account.
GET https://showmytrades.com/api/v1/accounts/{slug}/widget?type=equity&theme=auto&width=100%
GET https://showmytrades.com/api/v1/accounts/{slug}/widget?kind=image&type=summary&theme=dark&format=png
| Parameter | Values | Default |
|---|---|---|
kind | iframe, image | iframe |
type | an iframe type or an image type from the tables above | equity for iframe, summary for image |
theme | iframe: auto, light, dark; image: light, dark, transparent | auto / dark |
format | image only: png, svg | png |
width | iframe only: pixels from 200 to 2000, or 100% | the type's own width |
The response carries url, html (with the resize script when the height is dynamic),
markdown and bbcode for images, the size, short instructions, the list of the other types
and the account's attribution. The same thing is the get_widget_snippet tool of the
MCP server.
For AI assistants
When a user asks you to put their ShowMyTrades results on a page, you need only their account's
public URL. Take the slug from it, pick a type from the tables above, and write the snippet;
nothing has to be fetched or authenticated. If you can call tools, the get_widget_snippet
MCP tool or the /widget endpoint above return it composed and verified. If the user has no account yet, the steps are in
Show your trading results on your website.
For the exact element to use in WordPress, Wix, Webflow, Squarespace or Shopify, see the guides
for WordPress and
website builders.
Show your trading results on your website
Step by step: put the live chart and statistics of your MT4, MT5, cTrader or TradeLocker account on your own website, with a ready-made widget or with the free API.
Authentication
Public accounts need no key. For your own accounts, create a Developer API Key and send it as a Bearer token.