# DXtrade Push AccountPortfoliosSubscriptionRequest

Independent and unofficial. Not affiliated with or endorsed by any broker or platform named here. Educational only: nothing here is advice, and nothing here recommends a broker or a trade.

This is the markdown version of https://openbrokerapi.com/platforms/dxtrade/messages/accountportfoliossubscriptionrequest, written from the same records as that page.

Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.

Subscribes to the portfolios of chosen accounts, or of all. A snapshot comes first, then the whole portfolio is sent again whenever an order is issued, changed or cancelled, a position changes, or a cash balance changes.

- Message: `AccountPortfoliosSubscriptionRequest`
- Interface: DXtrade Push API
- Group: Account
- Status: verified. Source: [demo.dx.trade](https://demo.dx.trade/developers/#/DXtrade-Push-API?id=account-portfolio-subscription), checked 2026-10-12.

This is a message of the DXtrade Push API, not an HTTP endpoint. It has no method and no path: it is sent as JSON or XML over an open WebSocket connection. It is in no OpenAPI file on this site and the request builder does not list it.

Note: The specification says no differences are sent: each update is the full portfolio, and the account's version number shows which update is newer. Orders in a final state and closed positions appear once, in the first update after they complete. The specification says subscriptions with the request type ALL are rate limited for each user and subscription name, with a default of 1 a minute, and that passing the rate brings a Reject message with 429 Too Many Requests. The specification's own example sends accounts as a JSON list, while its Account Request table describes a string of codes separated by commas: the sample here follows the table.

## The message

- Name: `AccountPortfoliosSubscriptionRequest`
- Direction: Request, sent by the client
- Carried by: WebSocket. Sent on the WebSocket resource for business events, the one used for every subscription except market data. The specification writes the address with a placeholder for the host, which each broker or firm that offers DXtrade supplies. Two optional query string arguments are set when connecting: format, XML or JSON, and compression, which can only be gzip.

## Fields

- `type` (type String, required): Always AccountPortfoliosSubscriptionRequest.
- `requestId` (type String, required): An id of your own for the request. The answer names it in inReplyTo. The specification says to keep ids unique within a session.
- `timestamp` (type Timestamp, required): When the message was sent, in UTC.
- `session` (type String, required): The token of the session the message belongs to. It comes from the token login of the DXtrade REST API.
- `payload` (type Account Request, required or not: not stated): The accounts to subscribe to, with the fields below. The table gives no required mark for it.
- `payload.requestType` (type String, required): ALL for every account, LIST for the accounts named.
- `payload.accounts` (type String, optional): The account codes, separated by commas. Required where requestType is LIST.
- `payload.includeOffset` (type Boolean, optional): true also processes offset accounts, where requestType is ALL.

## What arrives

`AccountPortfolios`: The portfolios of the accounts subscribed to.

- `type` (type String, required): Always AccountPortfolios.
- `inReplyTo` (type String, required): The requestId of the AccountPortfoliosSubscriptionRequest message it answers.
- `timestamp` (type Timestamp, required): When the message was sent, in UTC.
- `session` (type String, required): The token of the session the message belongs to. It comes from the token login of the DXtrade REST API.
- `payload.portfolios` (type Portfolio, required): A list of account portfolios.
- `payload.portfolios[].account` (type Account code, required): The code of the account.
- `payload.portfolios[].version` (type Number, required): The version of the account, which rises with each change.
- `payload.portfolios[].balances` (type List of balance objects, required): Cash balances by currency. Zero balances are left out.
- `payload.portfolios[].positions` (type List of position objects, required): The positions on the account.
- `payload.portfolios[].orders` (type List of order objects, required): The orders on the account.
- `payload.portfolios[].owner` (type User, optional): The user who owns the account. Absent for an account with no owner.

## Sample

Written by this site from the fields recorded on this page. It has not been run against a terminal, a server or an account, and the values in it are placeholders. No credential is typed into it: where a field holds one, the placeholder says where it comes from. Nothing is entered on this site.

```json
{
  "type": "AccountPortfoliosSubscriptionRequest",
  "requestId": "1",
  "timestamp": "2026-10-12T09:00:00.000Z",
  "session": "<the session token from the REST login, from your own environment>",
  "payload": {
    "requestType": "LIST",
    "accounts": "default:demo1,default:demo2"
  }
}
```

## Related DXtrade Push messages: Account

- [AccountMetricsSubscriptionRequest](https://openbrokerapi.com/platforms/dxtrade/messages/accountmetricssubscriptionrequest): Subscribes to the metrics of chosen accounts, or of all, such as profit and loss and margin. Updates are sent periodically at a frequency set on the server, and less often for accounts with no trading activity.
- [AccountPortfoliosCloseSubscriptionRequest](https://openbrokerapi.com/platforms/dxtrade/messages/accountportfoliosclosesubscriptionrequest): Closes a portfolio subscription, by the requestId of the request that opened it. The server confirms, and no more portfolio updates are sent for that subscription.

## More on DXtrade

- [All DXtrade messages](https://openbrokerapi.com/platforms/dxtrade/messages): 8 documented here, grouped by what they do.
- [Subscribe to a stream: the call at each API](https://openbrokerapi.com/endpoints/streaming-subscribe): The same job at every broker and platform API recorded here, HTTP or not.
- [All DXtrade error codes](https://openbrokerapi.com/errors/dxtrade)
- [DXtrade API page](https://openbrokerapi.com/platforms/dxtrade): The full record: access, authentication, limits and the source for each.

## Licence and how to cite

The records behind this page are all rights reserved. This file is the page itself, at its own address, in another format. It is not part of the CC BY 4.0 downloads listed at https://openbrokerapi.com/data. Quote from it with a link to the page.

Cite as: DXtrade Push AccountPortfoliosSubscriptionRequest. Broker API Hub, https://openbrokerapi.com/platforms/dxtrade/messages/accountportfoliossubscriptionrequest, newest check 2026-10-12.

Where you rely on a single figure, cite the source and the checked date printed beside it as well. Where this page and a broker's own documentation differ, the documentation wins.
