Trades & positions

Closed trades, open positions and pending orders, paginated and filterable.

Two endpoints, deliberately separate: closed trades are history and can number in the thousands, open positions and pending orders are what is on the account right now and change minute to minute.

List closed trades

GET /api/v1/accounts/{slug}/trades

Newest first.

Query parameters

from
string
Only trades closed on or after this date. YYYY-MM-DD or a full ISO 8601 instant.
to
string
Only trades closed on or before this date.
page
integer
Defaults to 1.
Closed trades are served in fixed pages of 20, so limit has no effect on this endpoint. pagination.limit always reports the real page size. Page through with page and stop on has_more.Filtering by instrument or magic number is not available here yet: use by_symbol and by_magic_number on the account for the aggregated view.

Response

Response
{
  "data": [
    {
      "ticket": "46202135",
      "symbol": "EURUSD-ECN",
      "side": "buy",
      "volume": 0.01,
      "open_price": 1.15418,
      "close_price": 1.15657,
      "stop_loss": null,
      "take_profit": null,
      "opened_at": "2026-08-10T23:00:00Z",
      "closed_at": "2026-08-14T15:00:01Z",
      "profit": 2.39,
      "commission": -0.06,
      "swap": 0,
      "net_profit": 2.33,
      "comment": "Dark Algo",
      "magic_number": 501031
    }
  ],
  "pagination": { "page": 1, "limit": 20, "total": 16, "has_more": false },
  "attribution": {
    "required": true,
    "text": "Data from ShowMyTrades",
    "url": "https://showmytrades.com/account/dark-algo",
    "account_url": "https://showmytrades.com/account/dark-algo"
  }
}

attribution is the credit for the account these trades belong to: see Attribution.

The trade object

ticket
string
The broker's identifier for the trade. A string, because not every platform uses numbers and some are long enough to lose precision as a JSON number.
side
string
buy or sell.
volume
number
Size in lots.
stop_loss
number
The stop loss price, or null when none was set. Never 0; see conventions.
take_profit
number
Same, for the take profit.
profit
number
Gross result, before commission and swap.
commission
number
Negative when charged.
swap
number
Overnight financing. Negative when charged, positive when credited.
net_profit
number
profit + commission + swap: what the trade actually did to the balance.
comment
string
The order comment from the platform, null if empty or hidden by the owner.
magic_number
integer
MT4 and MT5 only, null elsewhere. Usually identifies the strategy or EA that placed the trade.
Sum net_profit, not profit. Adding up the gross figures is the most common way to end up with a total that does not match the account balance.

List open positions

GET /api/v1/accounts/{slug}/positions

Everything still open on the account: open positions and pending orders (limit and stop orders that have not been filled yet). Newest first.

Query parameters

type
string
open for open positions only, pending for pending orders only, all for both. Defaults to all.
page
integer
Defaults to 1.
limit
integer
Items per page. Defaults to 50, maximum 200.
An account running a grid or a basket can hold hundreds of orders. Page through with page and stop on has_more, and only then add things up: a floating result summed over the first page alone will not match the account.

Response

Same object as a closed trade, with close_price, closed_at and net_profit absent (the trade has not finished), profit showing the current floating result, and one more field, order_type.

Response
{
  "data": [
    {
      "ticket": "46318901",
      "symbol": "EURUSD-ECN",
      "side": null,
      "order_type": "buy_limit",
      "volume": 0.01,
      "open_price": 1.152,
      "stop_loss": null,
      "take_profit": 1.158,
      "opened_at": "2026-08-21T09:02:10Z",
      "profit": 0,
      "commission": 0,
      "swap": 0,
      "comment": "Dark Algo",
      "magic_number": 501031
    },
    {
      "ticket": "46318772",
      "symbol": "EURUSD-ECN",
      "side": "sell",
      "order_type": "sell",
      "volume": 0.01,
      "open_price": 1.16104,
      "stop_loss": null,
      "take_profit": null,
      "opened_at": "2026-08-21T08:14:22Z",
      "profit": -3.42,
      "commission": -0.06,
      "swap": -0.11,
      "comment": "Dark Algo",
      "magic_number": 501031
    }
  ],
  "pagination": { "page": 1, "limit": 50, "total": 2, "has_more": false },
  "attribution": {
    "required": true,
    "text": "Data from ShowMyTrades",
    "url": "https://showmytrades.com/account/dark-algo",
    "account_url": "https://showmytrades.com/account/dark-algo"
  }
}
order_type
string
buy or sell for an open position; buy_limit, sell_limit, buy_stop or sell_stop for a pending order.
side
string
buy or sell for an open position, null for a pending order.
open_price
number
The entry price of an open position, or the price a pending order is waiting for.
profit
number
The floating result, before commission and swap. Always 0 on a pending order.
For the floating result of the account, request ?type=open and sum profit + commission + swap over every page. On a portfolio each row is in the currency of the account it belongs to, so the sum is only meaningful when every account shares one currency: use equity minus balance of the portfolio instead.
Open positions are as fresh as the account's last report. An account connected through our Expert Advisor reports continuously while its terminal is running; one connected by investor password or through a broker API updates on a schedule. updated_at on the account tells you how recent the data is.

Hidden data

An account owner can hide lot sizes, stop losses and take profits, order comments, or the trade list entirely. When something is hidden you still get the field, neutralised (null for prices and comments, 0 for volume) and a hidden list comes back empty with total: 0.

Your own accounts are never filtered.