Saxo Bank Accounts API

Provide services to get account template and create account.

Operations 9

POST /cm/v2/accounts Create account #
DELETE /port/v1/accounts/subscriptions/{ContextId}/{ReferenceId} Remove subscription #
DELETE /port/v1/accounts/subscriptions/{ContextId} Remove subscriptions by tag #
POST /port/v1/accounts/subscriptions Subscribe to accounts #
PUT /port/v1/accounts/{AccountKey}/reset Reset trial account #
GET /port/v1/accounts Get accounts of a client #
GET /port/v1/accounts/me Get accounts #
GET /port/v1/accounts/{AccountKey} Get account #
PATCH /port/v1/accounts/{AccountKey} Update account #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/saxo-accounts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

saxo-accounts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Services.AutoTrading Account Values Accounts API
  description: 'The AutoTrading service group provides endpoints for interacting with Saxo Bank''s SaxoSelect offering.Through these interfaces a client application can get Saxo Select trade leaders, portfolios and investments. Portfolio investments can be created and modifed.<div class=well style=''border: 1px solid rgb(204, 82, 0); border-image: none; background-color: rgb(255, 209, 179);padding:1px;''><strong> Note:</strong> </br>This service is subject to special licensing agreements and not generally available to all OpenAPI applications.</div>'
  version: 2.4.138+710c760591
  x-framework-version: 38.0.2+439c5b0ec3
  x-machine: SIMOAWEB11-DK2
servers:
- url: https://gateway.saxobank.com/sim/openapi
tags:
- name: Accounts
  description: Provide services to get account template and create account.
paths:
  /cm/v2/accounts:
    post:
      tags:
      - Accounts
      summary: Create account
      description: Create an additional account for an existing client
      operationId: AccountsV2CreateAccount
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Models.CreateAccount'
            example:
              ChoiceOfAccount: '65'
              ClientKey: BxS0VWLta8lJ3SBpjGBQjw==
      responses:
        '201':
          description: Account successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Models.AccountDetails'
              example:
                AccountId: '2147279960'
                AccountKey: BxS0VWLta8lJ3SBpjGBQjw==
        '500':
          description: Internal Server Error
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                required:
                - ErrorCode
                - Message
                type: object
                properties:
                  ErrorCode:
                    enum:
                    - DocumentVerificationError
                    type: string
                    example: None
                    x-enum-descriptions:
                      DocumentVerificationError: Document verification error
                  Message:
                    type: string
                  ModelState:
                    $ref: '#/components/schemas/ModelStateDictionary'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                required:
                - ErrorCode
                - Message
                type: object
                properties:
                  ErrorCode:
                    enum:
                    - AccountTemplateNotFound
                    type: string
                    example: None
                    x-enum-descriptions:
                      AccountTemplateNotFound: Account template not found
                  Message:
                    type: string
                  ModelState:
                    $ref: '#/components/schemas/ModelStateDictionary'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
      - OpenApiOAuthSecurityScheme: []
      - OpenApiJWTSecurityScheme: []
      x-required-permissions:
        confidential: Write
  /port/v1/accounts/subscriptions/{ContextId}/{ReferenceId}:
    delete:
      tags:
      - Accounts
      summary: Remove subscription
      description: Removes subscription for the current session identified by subscription id.
      operationId: AccountsV1DeleteSubscription
      parameters:
      - name: ContextId
        in: path
        description: Unique streaming context ID part of the streaming session
        required: true
        schema:
          type: string
        example: '29931122'
      - name: ReferenceId
        in: path
        description: Unique reference ID of the subscription.
        required: true
        schema:
          type: string
        example: A74231
      responses:
        '204':
          description: No Content
        '202':
          description: Subscription delete request will be processed eventually.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
      - OpenApiOAuthSecurityScheme: []
      - OpenApiJWTSecurityScheme: []
      x-required-permissions:
        personal: Subscribe
        community: Subscribe
  /port/v1/accounts/subscriptions/{ContextId}:
    delete:
      tags:
      - Accounts
      summary: Remove subscriptions by tag
      description: Removes all subscriptions for the current session on this resource marked with a specific tag, and frees all resources on the server.
      operationId: AccountsV1DeleteSubscriptions
      parameters:
      - name: ContextId
        in: path
        description: Unique streaming context ID part of the streaming session.
        required: true
        schema:
          type: string
        example: '29931122'
      - name: Tag
        in: query
        description: Tag that subscriptions are marked with
        schema:
          type: string
        example: CORE
      responses:
        '204':
          description: No Content
        '202':
          description: Subscription delete request will be processed eventually.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
      - OpenApiOAuthSecurityScheme: []
      - OpenApiJWTSecurityScheme: []
      x-required-permissions:
        personal: Subscribe
        community: Subscribe
  /port/v1/accounts/subscriptions:
    post:
      tags:
      - Accounts
      summary: Subscribe to accounts
      description: Creates a subscription on a list accounts, makes it active and returns an initial snapshot containing a list of accounts as specified by the parameters in the request.
      operationId: AccountsV1AddActiveSubscription
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountsSubscriptionRequest'
            example:
              Arguments:
                AccountGroupKey: LZTc7DdejXODf-WSl2aCyQ==
                AccountKey: LZTc7DdejXODf-WSl2aCyQ==
                ClientKey: 7m4I|vtYLUnEGg77o9uQhw==
              ContextId: '20221030064905067'
              Format: application/json
              ReferenceId: A21312
              RefreshRate: 500
              Tag: MyAccountRelatedSubscriptions
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountsSubscriptionResponse'
              example:
                ContextId: '20221030064905073'
                Format: application/json
                InactivityTimeout: 1500
                ReferenceId: A70755
                RefreshRate: 500
                Snapshot:
                  Data:
                  - AccountGroupKey: LZTc7DdejXODf-WSl2aCyQ==
                    AccountId: 192134INET
                    AccountKey: LZTc7DdejXODf-WSl2aCyQ==
                    AccountType: Normal
                    Active: true
                    CanUseCashPositionsAsMarginCollateral: false
                    CfdBorrowingCostsActive: false
                    ClientId: '654321'
                    ClientKey: 7m4I|vtYLUnEGg77o9uQhw==
                    CreationDate: '2017-01-01T13:00:00Z'
                    Currency: EUR
                    CurrencyDecimals: 2
                    DirectMarketAccess: false
                    FractionalOrderEnabled: false
                    IndividualMargining: false
                    IsCurrencyConversionAtSettlementTime: false
                    IsMarginTradingAllowed: true
                    IsShareable: true
                    IsTrialAccount: false
                    LegalAssetTypes:
                    - FxSpot
                    - Stock
                    - ContractFutures
                    ManagementType: Client
                    MarginCalculationMethod: Default
                    MarginLendingEnabled: None
                    PortfolioBasedMarginEnabled: false
                    Sharing:
                    - TradingFloor
                    SupportsAccountValueProtectionLimit: false
                    UseCashPositionsAsMarginCollateral: false
                State: Active
                Tag: MyAccountRelatedSubscriptions
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                required:
                - ErrorCode
                - Message
                type: object
                properties:
                  ErrorCode:
                    enum:
                    - InvalidClientId
                    - InvalidInput
                    - InvalidModelState
                    - UnsupportedSubscriptionFormat
                    type: string
                    example: None
                    x-enum-descriptions:
                      InvalidModelState: Error code returned when model state is invalid.
                      UnsupportedSubscriptionFormat: Error code returned when a subscription format that isn't supported by the publisher is requested.
                      InvalidClientId: Indicates that the requested client id was invalid.
                      InvalidInput: An error was encountered when processing given input parameters.
                  Message:
                    type: string
                  ModelState:
                    $ref: '#/components/schemas/ModelStateDictionary'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                required:
                - ErrorCode
                - Message
                type: object
                properties:
                  ErrorCode:
                    enum:
                    - SubscriptionLimitExceeded
                    type: string
                    example: None
                    x-enum-descriptions:
                      SubscriptionLimitExceeded: Error code returned when more than the maximum allowed number of subscriptions for a specified type, is exceeded.
                  Message:
                    type: string
                  ModelState:
                    $ref: '#/components/schemas/ModelStateDictionary'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
      - OpenApiOAuthSecurityScheme: []
      - OpenApiJWTSecurityScheme: []
      x-required-permissions:
        personal: Subscribe
        community: Subscribe
      x-streaming-type:
        $ref: '#/components/schemas/AccountResponseArray'
  /port/v1/accounts/{AccountKey}/reset:
    put:
      tags:
      - Accounts
      summary: Reset trial account
      description: Resets a trial account. Cannot be used in live environment.
      operationId: AccountsV1ResetAccount
      parameters:
      - name: AccountKey
        in: path
        description: Required unique key identifying the account.
        required: true
        schema:
          minLength: 1
          type: string
          x-type-name: AccountKey
        example: LZTc7DdejXODf-WSl2aCyQ==
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountResetRequest'
            example:
              NewBalance: 50000000
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                required:
                - ErrorCode
                - Message
                type: object
                properties:
                  ErrorCode:
                    enum:
                    - NoValidInput
                    - ResetAccountBalanceExceedsMaximum
                    - ResetAccountNegativeBalanceNotAllowed
                    type: string
                    example: None
                    x-enum-descriptions:
                      ResetAccountNegativeBalanceNotAllowed: Negative balances are not allowed.
                      ResetAccountBalanceExceedsMaximum: Balance exceeds maximum allowed value.
                      NoValidInput: No valid input values passed.
                  Message:
                    type: string
                  ModelState:
                    $ref: '#/components/schemas/ModelStateDictionary'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
      - OpenApiOAuthSecurityScheme: []
      - OpenApiJWTSecurityScheme: []
      x-required-permissions:
        personal: Write
  /port/v1/accounts:
    get:
      tags:
      - Accounts
      summary: Get accounts of a client
      description: Returns a list of all accounts owned by the specified client
      operationId: GET_AccountsV1GetAccounts
      parameters:
      - name: $inlinecount
        in: query
        description: Specifies that the response to the request should include a count of the number of entries in the collection
        schema:
          enum:
          - AllPages
          - None
          type: string
          x-enum-descriptions:
            None: The result will not contain an inline count
            AllPages: The result will contain a total count of items in the queried collection
        example: AllPages
      - name: $skip
        in: query
        description: The number of entries to skip from the beginning of the collection
        schema:
          minimum: 0
          type: integer
          format: int32
        example: 1
      - name: $top
        in: query
        description: The number of entries to return from the beginning of the collection
        schema:
          minimum: 0
          type: integer
          format: int32
          default: 1000
        example: 1
      - name: ClientKey
        in: query
        description: 'The client to which the accounts belong. Default: Logged-in user''s client.'
        schema:
          title: 'The client to which the accounts belong. Default: Logged-in user''s client.'
          minLength: 1
          type: string
          x-type-name: ClientKey
        example: 493b43a5-fe85-4d1f-9071-dd4a9d4e42a4
      - name: IncludeSubAccounts
        in: query
        description: Optionally set true to request that all sub accounts are returned.
        schema:
          title: Optionally set true to request that all sub accounts are returned.
          type: boolean
        example: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountResponseListResult'
              example:
                __next: /openapi/port/....../?$top=1&$skip=1
                Data:
                - AccountGroupKey: LZTc7DdejXODf-WSl2aCyQ==
                  AccountId: 192134INET
                  AccountKey: LZTc7DdejXODf-WSl2aCyQ==
                  AccountType: Normal
                  Active: true
                  CanUseCashPositionsAsMarginCollateral: false
                  CfdBorrowingCostsActive: false
                  ClientId: '654321'
                  ClientKey: 7m4I|vtYLUnEGg77o9uQhw==
                  CreationDate: '2017-01-01T13:00:00Z'
                  Currency: EUR
                  CurrencyDecimals: 2
                  DirectMarketAccess: false
                  FractionalOrderEnabled: false
                  IndividualMargining: false
                  IsCurrencyConversionAtSettlementTime: false
                  IsMarginTradingAllowed: true
                  IsShareable: true
                  IsTrialAccount: false
                  LegalAssetTypes:
                  - FxSpot
                  - Stock
                  - ContractFutures
                  ManagementType: Client
                  MarginCalculationMethod: Default
                  MarginLendingEnabled: None
                  PortfolioBasedMarginEnabled: false
                  Sharing:
                  - TradingFloor
                  SupportsAccountValueProtectionLimit: false
                  UseCashPositionsAsMarginCollateral: false
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
      - OpenApiOAuthSecurityScheme: []
      - OpenApiJWTSecurityScheme: []
      x-required-permissions:
        personal: Read
        community: Read
  /port/v1/accounts/me:
    get:
      tags:
      - Accounts
      summary: Get accounts
      description: Returns all accounts under a particular client to which the logged in user belongs.
      operationId: AccountsV1GetAccounts
      parameters:
      - name: $inlinecount
        in: query
        description: Specifies that the response to the request should include a count of the number of entries in the collection
        schema:
          enum:
          - AllPages
          - None
          type: string
          x-enum-descriptions:
            None: The result will not contain an inline count
            AllPages: The result will contain a total count of items in the queried collection
        example: AllPages
      - name: $skip
        in: query
        description: The number of entries to skip from the beginning of the collection
        schema:
          minimum: 0
          type: integer
          format: int32
        example: 1
      - name: $top
        in: query
        description: The number of entries to return from the beginning of the collection
        schema:
          minimum: 0
          type: integer
          format: int32
          default: 1000
        example: 1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountResponseListResult'
              example:
                __next: /openapi/port/....../?$top=1&$skip=1
                Data:
                - AccountGroupKey: LZTc7DdejXODf-WSl2aCyQ==
                  AccountId: 192134INET
                  AccountKey: LZTc7DdejXODf-WSl2aCyQ==
                  AccountType: Normal
                  Active: true
                  CanUseCashPositionsAsMarginCollateral: false
                  CfdBorrowingCostsActive: false
                  ClientId: '654321'
                  ClientKey: 7m4I|vtYLUnEGg77o9uQhw==
                  CreationDate: '2017-01-01T13:00:00Z'
                  Currency: EUR
                  CurrencyDecimals: 2
                  DirectMarketAccess: false
                  FractionalOrderEnabled: false
                  IndividualMargining: false
                  IsCurrencyConversionAtSettlementTime: false
                  IsMarginTradingAllowed: true
                  IsShareable: true
                  IsTrialAccount: false
                  LegalAssetTypes:
                  - FxSpot
                  - Stock
                  - ContractFutures
                  ManagementType: Client
                  MarginCalculationMethod: Default
                  MarginLendingEnabled: None
                  PortfolioBasedMarginEnabled: false
                  Sharing:
                  - TradingFloor
                  SupportsAccountValueProtectionLimit: false
                  UseCashPositionsAsMarginCollateral: false
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
      - OpenApiOAuthSecurityScheme: []
      - OpenApiJWTSecurityScheme: []
      x-required-permissions:
        personal: Read
        community: Read
  /port/v1/accounts/{AccountKey}:
    get:
      tags:
      - Accounts
      summary: Get account
      description: Returns the details about a single account
      operationId: AccountsV1GetAccount
      parameters:
      - name: AccountKey
        in: path
        description: Unique key for the account.
        required: true
        schema:
          minLength: 1
          type: string
          x-type-name: AccountKey
        example: LZTc7DdejXODf-WSl2aCyQ==
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountResponse'
              example:
                AccountGroupKey: LZTc7DdejXODf-WSl2aCyQ==
                AccountId: 192134INET
                AccountKey: LZTc7DdejXODf-WSl2aCyQ==
                AccountType: Normal
                Active: true
                CanUseCashPositionsAsMarginCollateral: false
                CfdBorrowingCostsActive: false
                ClientId: '654321'
                ClientKey: 7m4I|vtYLUnEGg77o9uQhw==
                CreationDate: '2017-01-01T13:00:00Z'
                Currency: EUR
                CurrencyDecimals: 2
                DirectMarketAccess: false
                FractionalOrderEnabled: false
                IndividualMargining: false
                IsCurrencyConversionAtSettlementTime: false
                IsMarginTradingAllowed: true
                IsShareable: true
                IsTrialAccount: false
                LegalAssetTypes:
                - FxSpot
                - Stock
                - ContractFutures
                ManagementType: Client
                MarginCalculationMethod: Default
                MarginLendingEnabled: None
                PortfolioBasedMarginEnabled: false
                Sharing:
                - TradingFloor
                SupportsAccountValueProtectionLimit: false
                UseCashPositionsAsMarginCollateral: false
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                required:
                - ErrorCode
                - Message
                type: object
                properties:
                  ErrorCode:
                    enum:
                    - InvalidInput
                    type: string
                    example: None
                    x-enum-descriptions:
                      InvalidInput: An error was encountered when processing given input parameters.
                  Message:
                    type: string
                  ModelState:
                    $ref: '#/components/schemas/ModelStateDictionary'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
      - OpenApiOAuthSecurityScheme: []
      - OpenApiJWTSecurityScheme: []
      x-required-permissions:
        personal: Read
        community: Read
    patch:
      tags:
      - Accounts
      summary: Update account
      description: Updates account details, particularly the user account shield value, the benchmark instrument or the account display name.
      operationId: AccountsV1UpdateAccount
      parameters:
      - name: AccountKey
        in: path
        description: Unique key of the account to share.
        required: true
        schema:
          minLength: 1
          type: string
          x-type-name: AccountKey
        example: LZTc7DdejXODf-WSl2aCyQ==
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountUpdateRequest'
            example:
              DisplayName: Trading Account
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                required:
                - ErrorCode
                - Message
                type: object
                properties:
                  ErrorCode:
                    enum:
                    - DisableUseCashPositionsAsMarginCollateralNotAllowed
                    - InvalidInput
                    - NoValidInput
                    - WouldExceedMargin
                    type: string
                    example: None
                    x-enum-descriptions:
                      NoValidInput: No valid input values passed.
                      InvalidInput: An error was encountered when processing given input parameters.
                      WouldExceedMargin: Disabling UseCashPositionsAsMarginCollateral would cause the account margin limits to be exceeded and is not allowed. To change this setting, please increase account collateral or reduce margin exposure first.
                      DisableUseCashPositionsAsMarginCollateralNotAllowed: Disabling UseCashPositionsAsMarginCollateral not allowed.
                  Message:
                    type: string
                  ModelState:
                    $ref: '#/components/schemas/ModelStateDictionary'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
      - OpenApiOAuthSecurityScheme: []
      - OpenApiJWTSecurityScheme: []
      x-required-permissions:
        personal: Write
components:
  schemas:
    AccountType:
      title: Describes the type of account.
      enum:
      - AutoTradingFollower
      - AutoTradingLeader
      - BlockTrading
      - Collateral
      - Commission
      - Funding
      - Interest
      - MarginLending
      - Normal
      - Omnibus
      - Other
      - Pension
      - Settlement
      - SettlementTrading
      - Tax
      - TaxFavoredAccount
      type: string
      example: BlockTrading
      x-enum-descriptions:
        Normal: Default. Used for normal client accounts.
        BlockTrading: Account used for allocating large block orders.
        SettlementTrading: For FX Settlement trading clients, this account type is used for the main trading account.
        Collateral: Account used to hold collateral assets. Not used for trading.
        Funding: Account used to transfer funds between client accounts. Not used for trading.
        Commission: Booking account for comissions only. Not used for trading.
        Interest: Booking account for interest only. Not used for trading.
        Omnibus: Partner account used to execute and clear client trades.
        Settlement: Used in connection with SettlementTrading accounts. SettlementTrading accounts is used on the actual trading account. Settlement accounts are used on the sub accounts. Not used for trading.
        Tax: Retention account for accumulating or withholding taxes. Not used for trading.
        AutoTradingLeader: Account Type for AutoTrading leader accounts.
        AutoTradingFollower: Account Type for AutoTrading follower accounts.
        TaxFavoredAccount: Tax favored account.
        MarginLending: Margin Lending.
        Pension: Pension account.
        Other: Account type not mapped.
    MarginLendingEnabled:
      title: Margin Lending Enabled.
      enum:
      - false
      - None
      - true
      type: string
      example: true
      x-enum-descriptions:
        None: Default. Margin Lending is not applicable.
        true: Margin Lending is enabled.
        false: Margin Lending is disabled.
    Models.CreateAccount:
      title: Create Account
      required:
      - ClientKey
      - ChoiceOfAccount
      type: object
      properties:
        ChoiceOfAccount:
          title: Choice Of Account (from Options)
          type: string
          example: stringValue
        ClientKey:
          title: Client Key of the user for which new account is to be created
          minLength: 1
          type: string
          x-type-name: ClientKey
      additionalProperties: false
      example:
        ChoiceOfAccount: '65'
        ClientKey: BxS0VWLta8lJ3SBpjGBQjw==
    PortfolioMarginMethod:
      title: Specifies the margin calculaion method for the given entity.
      enum:
      - Default
      - JanusMarginReplication
      - SpanForFutures
      - SpanForFuturesAndOptions
      type: string
      example: SpanForFutures
      x-enum-descriptions:
        Default: Uses Saxo exposure based margin.
        SpanForFutures: Uses rules-based SPAN methods to calculate margin on futures alone.
        SpanForFuturesAndOptions: Uses rules-based SPAN methods to calculate margin on futures and options.
        JanusMarginReplication: Uses rules-based the Janus methodology to calculate margin.
    AccountsSubscriptionResponse:
      title: Public response contract returned after setting up a subscription on accounts for a client.
      type: object
      properties:
        ContextId:
          title: The streaming context id that this response is associated with.
          type: string
          example: ContextId-1
          x-display-order: 1
        ReferenceId:
          title: The reference id that (along with streaming context id and session id) identifies the subscription (within the context of a specific service/subscription type)
          type: string
          example: ReferenceId-1
          x-display-order: 2
        Format:
          title: The media type (RFC 2046), of the serialized data updates that are streamed to the client.
          type: string
          example: application/json
        InactivityTimeout:
          title: The time (in seconds) that the client should accept the subscription to be inactive before considering it invalid.
          type: integer
          format: int32
          example: 0
        RefreshRate:
          title: Actual refresh rate assigned to the subscription according to the customers SLA.
          type: integer
          format: int32
          example: 0
        Snapshot:
          title: Snapshot of the current data on hand, when subscription was created.
          allOf:
          - $ref: '#/components/schemas/AccountResponseListResult'
        State:
          title: The value "Active".
          type: string
          description: This property is kept for backwards compatibility.
          example: Active
        Tag:
          title: Client specified tag assigned to the subscription, if specified in the request.
          type: string
          example: ClientTag
      additionalProperties: false
      example:
        ContextId: '20221030064905073'
        Format: application/json
        InactivityTimeout: 1500
        ReferenceId: A70755
        RefreshRate: 500
        Snapshot:
          Data:
          - AccountGroupKey: LZTc7DdejXODf-WSl2aCyQ==
            AccountId: 192134INET
            AccountKey: LZTc7DdejXODf-WSl2aCyQ==
            AccountType: Normal
            Active: true
            CanUseCashPositionsAsMarginCollateral: false
            CfdBorrowingCostsActive: false
            ClientId: '654321'
            ClientKey: 7m4I|vtYLUnEGg77o9uQhw==
            CreationDate: '2017-01-01T13:00:00Z'
            Currency: EUR
            CurrencyDecimals: 2
            DirectMarketAccess: false
            FractionalOrderEnabled: false
            IndividualMargining: false
            IsCurrencyConversionAtSettlementTime: false
            IsMarginTradingAllowed: true
            IsShareable: true
            IsTrialAccount: false
            LegalAssetTypes:
            - FxSpot
            - Stock
            - ContractFutures
         

# --- truncated at 32 KB (57 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/saxo/refs/heads/main/openapi/saxo-accounts-api-openapi.yml