Skip to main content
GET
TypeScript

Authorizations

Authorization
string
header
required

The Trading API key (trdrs_sk_…), for market data, orders and account state on the accounts its owner holds. Use it server-to-server, and keep it on your server. Its scope is named trading in the API.

Query Parameters

provider
string

The provider the account is at, such as rithmic or paper. With account omitted, your default account there. Omit both for every open account you hold.

account
string

The account number at that provider. It must be one of your own accounts, or the call is refused with 400.

period
enum<string>
default:all

The last 7, 30 or 90 days counting today, the year so far, or every day. Send it or a range, never both.

Available options:
7d,
30d,
90d,
ytd,
all
from
string

Instead of a period, the range's first trading day, exactly as YYYY-MM-DD. Omit it to start from the first trade.

Pattern: ^\d{4}-\d{2}-\d{2}$
to
string

Instead of a period, the range's last trading day, exactly as YYYY-MM-DD. Omit it to end today.

Pattern: ^\d{4}-\d{2}-\d{2}$
tz
string
default:UTC

The IANA time zone whose calendar day is today, such as America/New_York. A period ends today in it.

fees
enum<string>
default:include

include takes each trade's commission and fees off its result; exclude reads each trade before them.

Available options:
include,
exclude

Response

The figures over the period.

The figures of your closed trades over a period, worked out from every round trip the accounts hold. Each trade's result is its realized profit and loss, less its commission and fees where feesIncluded. Money is in the account's currency, signed. A figure the trades cannot support is null. The drawdown and the streaks read the trades in the order they closed.

accounts
object[]
required

The accounts the figures cover.

from
string | null
required

The first trading day the period covers, as YYYY-MM-DD, or null for every day from the first trade.

to
string
required

The last trading day the period covers, as YYYY-MM-DD.

firstDay
string | null
required

The trading day of the first trade the accounts closed, or null when they have none.

feesIncluded
boolean
required

Whether each trade's commission and fees come off its result.

syncing
boolean
required

True while any of the accounts' fill or order history is still being copied from its provider, so older trades may still arrive.

trades
object
required

The period's trades.

days
object
required

The period's trading days, each the sum of the trades that closed on it.

grossProfit
number
required

What the winning trades made.

grossLoss
number
required

What the losing trades lost, as a positive amount.

net
number
required

The sum of every trade's result.

profitFactor
number | null
required

Gross profit over gross loss, or null with no losing trade.

averageTrade
number | null
required

The average trade, which is the expectancy of one.

averageWin
number | null
required

The average winning trade.

averageLoss
number | null
required

The average losing trade, negative.

winLossRatio
number | null
required

The average win over the size of the average loss.

averagePerDay
number | null
required

The net result over the trading days.

biggestWinner
number | null
required

The best trade.

biggestLoser
number | null
required

The worst trade.

maxDrawdown
number
required

The deepest fall of the running result from its high, trade by trade, as a positive amount.

recoveryFactor
number | null
required

The net result over the deepest drawdown, or null with no drawdown.

sharpe
number | null
required

The daily results' mean over their sample deviation, for a year of 252 trading days, or null under two days.

sortino
number | null
required

As sharpe, over the deviation of the losing days, or null with no losing day.

longestWinStreak
integer
required

The most winning trades in a row.

longestLossStreak
integer
required

The most losing trades in a row.

currentStreak
object | null
required

The run the latest trades are on, or null when the latest trade broke even or there is none. A breakeven trade ends a run.

score
object | null
required

The trader score: five measures from 0 to 100, and their mean, or null with no trade. The win rates count wins among wins and losses; the profit factor and the win/loss ratio earn 100 at 3 or above, and also with wins and no loss; drawdown control is the share of the gross profit the deepest drawdown left standing.

series
object
required

The period's charts, one point a trading day, oldest first.

calendar
object[]
required

Every trading day of the accounts' whole history with a closed trade, oldest first, and its result, whatever the period.