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. Omit it to use your default provider.

account
string

The account number at that provider. It must be one of your own accounts.

Response

The account at one revision.

The whole account at one revision: its summary, positions, working orders, protection and capabilities. GET /api/account/snapshot returns it, and every account event on the stream carries the same shape. Apply frames by revision alone: keep the newest one you have for the accountId, drop any at or behind it, and replace your whole picture with any ahead of it.

accountId
string
required

The account's id. It is opaque: key your panels and subscriptions by it, and never take it apart.

revision
integer
required

The account's revision. A frame that skips revisions is still complete, so there is nothing to catch up on and nothing to resync. Never work out a revision of your own.

clock
enum<string>
required

What the revision counts. engine is the account's own history on trdrs. observation is trdrs reading a provider: every reading gets a new revision, so two reads of an account nothing happened to still differ. Compare revisions, never count them.

Available options:
engine,
observation
cycle
integer | null
required

The paper book account's cycle, read with its rows. A reset starts a new cycle, so a frame from an earlier cycle describes an account that no longer exists, and nothing held from it applies. Null on a provider account, and on some older Demo accounts, whose reads carry no cycle.

positionModel
enum<string>
required

How the account holds positions. On net there is at most one signed position row per instrument, except on a provider account in hedge mode, which shows the rows its provider reports beside an accountMode refusal and sends no order. On independent_tickets every open ticket is its own row with its positionId, and its exits are the reduce-only orders that name that id.

Available options:
net,
independent_tickets
capabilities
object
required

What the provider behind the account supports.

connected
boolean
required

True while trdrs's connection to the provider is live. False means this is the last picture trdrs has, which you must be able to tell apart from an account that is flat.

account
object
required

Balance, profit and loss, and buying power.

Example:
positions
object[]
required

The open positions.

orders
object[]
required

The working orders.

brackets
object[]
required

The protection around the account's positions: every live bracket, and those that ended in the last day, with its ladders, the automation its stop losses run and the orders resting for it.

accountMode
object | null
required

The account settings an exchange reported on this reading, and whether trdrs can trade under them. Null for every other account.

margin
object

The account's leverage and margin modes, read with the rows: every instrument the account holds a position in or a working order on, and every instrument it saved a setting for. Absent on an account whose provider keeps no such setting, such as futures. An instrument with no entry has its starting setting, which GET /api/trading/symbol-config answers.

rules
object

Where the account's own rules stand on this revision: each loss floor whose breach fails the account, and its stage's profit target, in the account's currency. Present on an account a venue issues on the paper book with a drawdown rule, a loss limit or a stage that advances; absent on every other account.