# cTrader ProtoOAExpectedMarginReq

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/ctrader/messages/protooaexpectedmarginreq, 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.

Asks for an estimate of the margin a trade would need under the account's leverage profile, which the definition says can be done before a new order is sent.

- Message: `ProtoOAExpectedMarginReq`
- Interface: cTrader Open API
- Group: Orders and positions
- Status: verified. Source: [help.ctrader.com](https://help.ctrader.com/open-api/messages/#protooaexpectedmarginreq), checked 2026-10-12.
- The definition file it was checked against: https://github.com/spotware/openapi-proto-messages/blob/main/OpenApiMessages.proto

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

Note: The definition says the estimate leaves out the ACCORDING_TO_GSL way of calculating margin.

## The message

- Name: `ProtoOAExpectedMarginReq`
- Direction: Request, sent by the client
- Payload type: `PROTO_OA_EXPECTED_MARGIN_REQ`, number `2139`. This number is what identifies the message on the wire.
- Answered by: [ProtoOAExpectedMarginRes](https://openbrokerapi.com/platforms/ctrader/messages/protooaexpectedmarginres)

## Fields

- `payloadType` (type ProtoOAPayloadType, optional): Identifies the message. Its default in the definition is PROTO_OA_EXPECTED_MARGIN_REQ, which is number 2139.
- `ctidTraderAccountId` (type int64, required): The account the message is about, by its cTrader account id. Responses and events carry the same id, which is how a program holding several accounts on one connection tells them apart.
- `symbolId` (type int64, required): The symbol, by its id on the cTrader platform. Ids come from the symbol list.
- `volume` (type repeated int64, optional): The sizes to estimate for. More than one can be sent. In hundredths of a unit, so 1000 means 10.00 units.

## Sample

Written by this site from the payload type and 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.

The three outer keys, clientMsgId, payloadType and payload, are the ones Spotware's page on sending and receiving JSON gives. The sample holds the message's required and repeated fields and leaves the optional ones out. Status: verified. Source: [help.ctrader.com](https://help.ctrader.com/open-api/sending-receiving-json/), checked 2026-10-12.

```json
{
  "clientMsgId": "msg-1",
  "payloadType": 2139,
  "payload": {
    "ctidTraderAccountId": 12345678,
    "symbolId": 1,
    "volume": [
      100000
    ]
  }
}
```

## Limits that apply at cTrader Open API

- Requests a second, not historical data: 50 requests per second
  - Scope: Per connection, requests that are not for historical data
  - Status: verified. Source: [help.ctrader.com](https://help.ctrader.com/open-api/), checked 2026-10-12.
  - Note: Historical data requests have their own lower limit, held in a separate record.
- Requests a second, historical data: 5 requests per second
  - Scope: Per connection, historical data requests only
  - Status: verified. Source: [help.ctrader.com](https://help.ctrader.com/open-api/), checked 2026-10-12.

## Related cTrader messages: Orders and positions

- [ProtoOAAmendOrderReq](https://openbrokerapi.com/platforms/ctrader/messages/protooaamendorderreq): Changes a pending order: its size, its prices, its expiry or its stop loss and take profit. The definition allows it only where the access token has trade permission for the account.
- [ProtoOAAmendPositionSLTPReq](https://openbrokerapi.com/platforms/ctrader/messages/protooaamendpositionsltpreq): Changes the stop loss and take profit of an open position. The definition allows it only where the access token has trade permission for the account.
- [ProtoOACancelOrderReq](https://openbrokerapi.com/platforms/ctrader/messages/protooacancelorderreq): Cancels a pending order. The definition allows it only where the access token has trade permission for the account.
- [ProtoOAClosePositionReq](https://openbrokerapi.com/platforms/ctrader/messages/protooaclosepositionreq): Closes an open position, in full or in part. The definition allows it only where the access token has trade permission for the account.
- [ProtoOADealListReq](https://openbrokerapi.com/platforms/ctrader/messages/protooadeallistreq): Asks for the account's deals in a period of time. A deal is one execution, so this is the trade history.
- [ProtoOADealListRes](https://openbrokerapi.com/platforms/ctrader/messages/protooadeallistres): Returns the deals in the period, one page at a time.
- [ProtoOAExecutionEvent](https://openbrokerapi.com/platforms/ctrader/messages/protooaexecutionevent): Sent when the server accepts or executes an order. It is the answer to the new order, cancel, amend and close requests, and it is also sent when a deposit or withdrawal takes place.
- [ProtoOAExpectedMarginRes](https://openbrokerapi.com/platforms/ctrader/messages/protooaexpectedmarginres): Returns the margin estimate for buying and for selling, for each size that was asked about.
- [ProtoOANewOrderReq](https://openbrokerapi.com/platforms/ctrader/messages/protooaneworderreq): Sends a new order. The definition allows it only where the access token has trade permission for the account.
- [ProtoOAOrderErrorEvent](https://openbrokerapi.com/platforms/ctrader/messages/protooaordererrorevent): Sent when an order request meets an error. It names the error and, where they apply, the order and the position.
- [ProtoOAOrderListReq](https://openbrokerapi.com/platforms/ctrader/messages/protooaorderlistreq): Asks for the account's orders in a period of time.
- [ProtoOAOrderListRes](https://openbrokerapi.com/platforms/ctrader/messages/protooaorderlistres): Returns the orders in the period, one page at a time.

## More on cTrader

- [All cTrader messages](https://openbrokerapi.com/platforms/ctrader/messages): 49 documented here, grouped by what they do.
- [Preview an order: the call at each API](https://openbrokerapi.com/endpoints/order-preview): The same job at every broker and platform API recorded here, HTTP or not.
- [cTrader API quickstart](https://openbrokerapi.com/platforms/ctrader/quickstart)
- [All cTrader error codes](https://openbrokerapi.com/errors/ctrader)
- [cTrader API page](https://openbrokerapi.com/platforms/ctrader): 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: cTrader ProtoOAExpectedMarginReq. Broker API Hub, https://openbrokerapi.com/platforms/ctrader/messages/protooaexpectedmarginreq, 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.
