Developer Portal

Create AccountPOST

Create a new trading account for a client profile. The account defines the client trading environment, including group and currency settings.

View as Markdown
POST
/accounts

Authorization

Authorization<token>

Bearer access token issued by the admin login flow.

In: header

Request Body

application/jsonRequired

The account to be created.

idCan be provided to override the auto generated ID, but it is not recommended as it may lead to data inconsistencies
groupIdAccount group ID
profileIdThe client profile ID
currencyAccount currency
positionModePosition mode, NETING or HEDGING
Default: "POSITIONING_MODE_UNSPECIFIED"Value in: "POSITIONING_MODE_UNSPECIFIED" | "POSITIONING_MODE_NETTING" | "POSITIONING_MODE_HEDGING"
statusTrade status, ENABLED, DISABLED or CLOSE_ONLY
Default: "TRADE_STATUS_UNSPECIFIED"Value in: "TRADE_STATUS_UNSPECIFIED" | "TRADE_STATUS_FULL" | "TRADE_STATUS_CLOSE_ONLY" | "TRADE_STATUS_DISABLED" | "TRADE_STATUS_LONG_ONLY"
nopNet open positions limit in account currency
Format: "double"
balanceAccount balance
Format: "double"
maxLeverageMaximum leverage allowed for this account
Format: "uint64"
versionAccount version for optimistic locking
Format: "uint64"
isSbSpread Betting flag - IMMUTABLE after account creation, can only be set during creation
isDemoDemo account flag - indicates if this is a demo account (false = live account)
marginCalcTypeOverridePer-account override for margin calculation type

MarginCalculationType defines how opposing positions on the same symbol are combined.

  • MARGIN_CALC_TYPE_UNSPECIFIED: unspecified — behaves as SUM
  • MARGIN_CALC_TYPE_SUM: long_margin + short_margin (most conservative)
  • MARGIN_CALC_TYPE_MAX: max(long_margin, short_margin) — partial hedging relief
  • MARGIN_CALC_TYPE_NET: margin on abs(long_qty - short_qty) — full hedging offset
Default: "MARGIN_CALC_TYPE_UNSPECIFIED"Value in: "MARGIN_CALC_TYPE_UNSPECIFIED" | "MARGIN_CALC_TYPE_SUM" | "MARGIN_CALC_TYPE_MAX" | "MARGIN_CALC_TYPE_NET"
dailyStatementWhether daily statement emails are enabled for this account
curl -X POST "https://example.com/accounts" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "string",
    "groupId": "string",
    "profileId": "string",
    "currency": "string",
    "positionMode": "POSITIONING_MODE_UNSPECIFIED",
    "status": "TRADE_STATUS_UNSPECIFIED",
    "nop": 0.1,
    "balance": 0.1,
    "maxLeverage": "string",
    "version": "string",
    "isSb": true,
    "isDemo": true,
    "marginCalcTypeOverride": "MARGIN_CALC_TYPE_UNSPECIFIED",
    "dailyStatement": true
  }'

A successful response.

{
  "account": {
    "id": "string",
    "groupId": "string",
    "profileId": "string",
    "currency": "string",
    "positionMode": "POSITIONING_MODE_UNSPECIFIED",
    "status": "TRADE_STATUS_UNSPECIFIED",
    "nop": 0.1,
    "balance": 0.1,
    "maxLeverage": "string",
    "version": "string",
    "isSb": true,
    "isDemo": true,
    "marginCalcTypeOverride": "MARGIN_CALC_TYPE_UNSPECIFIED",
    "dailyStatement": true
  }
}