Skip to content

Calculate margin#


Calculates margin required to open a trade on the specified trading account.

POST /users/current/accounts/:accountId/calculate-margin

For more information see Swagger documentation. Note, that this URL is valid for new-york region only. You can find URLs for other regions on API access page.


Name Type Required Description
auth-token string Yes authorization token. See Authentication & authorization

Path parameters#

Name Type Required Description
accountId string Yes MetaTrader account id. You can retrieve account id from Web application after you add your MetaTrader account to our platform. The account id can also be obtained via Provisioning API


To execute the command, it is necessary to supply the request body in the format of the MarginOrder model.


Possible error response codes are listed here.


  • 200 - Margin for the specified trading account returned successfully. Response schema: Margin
  • 400 - Payload is not valid. Response schema: Error
  • 401 - Authorization failed. Response schema: Error
  • 404 - Trading account not found or not provisioned yet. Response schema: Error

Example request:

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'auth-token: token' -d '{
  "symbol": "EURUSD",
  "volume": 0.1,
  "openPrice": 1.1
}' ''

Example response:

  "margin": 110