openapi: 3.2.0 info: title: Services.Portfolio Account Groups API description: The Portfolio service group provides services and end points that serves information about the clients current portfolio, such as account balance, open positions etc. version: 2.4.82+77577352f2 x-framework-version: 41.0.17+46f32c3eb1 x-machine: SIMOAWEB8-DK1 servers: - url: https://gateway.saxobank.com/sim/openapi tags: - name: Account Groups description: 'End points serving account groups. The set of account groups is restricted by the supplied query parameters as well as whether or not the identity represented by the authorization token has access to the groups.' paths: /port/v1/accountgroups: get: tags: - Account Groups summary: Get a list of all accounts groups used by the specified client description: Get a list of all account groups used by the specified client operationId: AccountGroupsV1GetAccountGroups 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 account groups belong. required: true schema: title: The client to which the account groups belong. minLength: 1 type: string x-type-name: ClientKey example: 493b43a5-fe85-4d1f-9071-dd4a9d4e42a4 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/AccountGroupResponseListResult' example: Data: - AccountGroupKey: stringValue AccountGroupName: stringValue AccountValueProtectionLimit: 10 CollateralMonitoringMode: MaxOfCollateralCreditValueAndCollateralCreditLine MarginCalculationMethod: Default MarginLendingEnabled: 'No' MarginMonitoringMode: Equity PortfolioBasedMarginEnabled: false SupportsAccountValueProtectionLimit: true MaxRows: 99 '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/accountgroups/me: get: tags: - Account Groups summary: Get all accounts groups under a particular client to which the logged in user… description: Get all accounts gropus under a particular client to which the logged in user belongs. operationId: AccountGroupsV1GetAccountGroupsForLoggedInUser 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/AccountGroupResponseListResult' example: Data: - AccountGroupKey: stringValue AccountGroupName: stringValue AccountValueProtectionLimit: 10 CollateralMonitoringMode: MaxOfCollateralCreditValueAndCollateralCreditLine MarginCalculationMethod: Default MarginLendingEnabled: 'No' MarginMonitoringMode: Equity PortfolioBasedMarginEnabled: false SupportsAccountValueProtectionLimit: true MaxRows: 99 '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/accountgroups/{AccountGroupKey}: get: tags: - Account Groups summary: Get details about a single account group operationId: AccountGroupsV1GetAccountGroup parameters: - name: AccountGroupKey in: path description: Unique key for the account group. required: true schema: minLength: 1 type: string x-type-name: AccountGroupKey example: LZTc7DdejXODf-WSl2aCyQ== - name: ClientKey in: query description: The key of the client to which the account group belong. required: true schema: minLength: 1 type: string x-type-name: ClientKey example: 5DG7K1P5cqYBZ77tl7Af4w== responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/AccountGroupResponse' example: AccountGroupKey: stringValue AccountGroupName: stringValue AccountValueProtectionLimit: 10 CollateralMonitoringMode: MaxOfCollateralCreditValueAndCollateralCreditLine MarginCalculationMethod: SpanForFuturesAndOptions MarginLendingEnabled: None MarginMonitoringMode: Margin PortfolioBasedMarginEnabled: false SupportsAccountValueProtectionLimit: true '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: - Account Groups summary: Update account group information description: Enables the user to update account group settings. Particularly the account group AccountValueProtectionLimit . operationId: AccountGroupsV1UpdateAccountGroup parameters: - name: AccountGroupKey in: path description: Unique key of the account group to change. required: true schema: minLength: 1 type: string x-type-name: AccountGroupKey example: LZTc7DdejXODf-WSl2aCyQ== - name: ClientKey in: query description: The key of the client to which the account group belong. required: true schema: minLength: 1 type: string x-type-name: ClientKey example: 5DG7K1P5cqYBZ77tl7Af4w== requestBody: content: application/json: schema: $ref: '#/components/schemas/AccountGroupUpdateRequest' example: AccountValueProtectionLimit: 10 responses: '204': description: No Content '400': description: Bad Request content: application/json: schema: required: - ErrorCode - Message type: object properties: ErrorCode: enum: - InvalidInput - NoValidInput type: string example: None x-enum-descriptions: NoValidInput: No valid input values passed. 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: Write components: schemas: AccountGroupUpdateRequest: title: A parameter wrapper for account group update operations. type: object properties: AccountValueProtectionLimit: title: "If set, this value shields the account value from going below the given limit by automatically triggering closing of positions should the limit be exceeded.\n A limit of zero means there is no limit." type: number example: 10 additionalProperties: false example: AccountValueProtectionLimit: 10 AccountGroupResponse: title: Data contract for an account group. type: object properties: AccountGroupKey: title: Unique ID of the account group used for selection minLength: 1 type: string x-type-name: AccountGroupKey AccountGroupName: title: Name of the account group, displayed to the user type: string example: stringValue AccountValueProtectionLimit: title: "If set, this value shields the account value from going below the given limit by automatically triggering closing of positions should the limit be exceeded.\n A limit of zero means there is no limit." type: number example: 10 CollateralMonitoringMode: title: "Collateral Monitoring Mode.\n Null when entity is not monitored on collateral." allOf: - $ref: '#/components/schemas/CollateralMonitoringMode' MarginCalculationMethod: title: Calculation method for assessing margin utilization. allOf: - $ref: '#/components/schemas/PortfolioMarginMethod' MarginLendingEnabled: title: Margin Lending Enabled allOf: - $ref: '#/components/schemas/MarginLendingEnabled' MarginMonitoringMode: title: "Margin Monitoring Mode.\n Null when entity is not monitored on margin." allOf: - $ref: '#/components/schemas/MarginMonitoringMode' PortfolioBasedMarginEnabled: title: Portfolio Based Margin (PBM) is a method for mapping the risk of an investment portfolio. True if enabled else false. type: boolean example: true SupportsAccountValueProtectionLimit: title: If true, an AccountValueProtectionLimit may be set on this account. If it is false, the AccountValueProtectionLimit can be set on client or account group. type: boolean example: true additionalProperties: false example: AccountGroupKey: stringValue AccountGroupName: stringValue AccountValueProtectionLimit: 10 CollateralMonitoringMode: MaxOfCollateralCreditValueAndCollateralCreditLine MarginCalculationMethod: SpanForFuturesAndOptions MarginLendingEnabled: None MarginMonitoringMode: Margin PortfolioBasedMarginEnabled: false SupportsAccountValueProtectionLimit: true CollateralMonitoringMode: title: Collateral Monitoring Mode. Different monitoring modes will change the behavior of stop outs, pre-checks etc (For Collateral based entities). enum: - CollateralCreditValue - MaxOfCollateralCreditValueAndCollateralCreditLine type: string example: CollateralCreditValue x-enum-descriptions: MaxOfCollateralCreditValueAndCollateralCreditLine: Monitoring (stop-out's) are based on collateral credit value and collateral credit line. CollateralCreditValue: Monitoring (stop-out's) are based on collateral credit value MarginLendingEnabled: title: Margin Lending Enabled. enum: - 'No' - None - 'Yes' type: string example: 'Yes' x-enum-descriptions: None: Default. Margin Lending is not applicable. 'Yes': Margin Lending is enabled. 'No': Margin Lending is disabled. MarginMonitoringMode: title: Margin Monitoring Mode. enum: - Equity - Lines - Margin type: string example: Lines x-enum-descriptions: Margin: Monitoring (stop-out's) are based on standard margin utilization, pre-check's are done against standard margin utilization. Lines: Monitoring (stop-out's) are based on credit line utilization, pre-check's are done against trading and credit line utilization. Equity: Monitoring is based on standard equity utilization, pre-check's are done against standard equity utilization. ModelStateDictionary: type: object additionalProperties: type: array items: type: string AccountGroupResponseListResult: type: object properties: Data: type: array items: $ref: '#/components/schemas/AccountGroupResponse' description: The collection of entities for this feed. MaxRows: type: number description: The maximum number of rows that can be returned (if applicable). __count: type: number description: The total count of items in the feed. __next: type: string description: The link for the next page of items in the feed. additionalProperties: false example: Data: - AccountGroupKey: stringValue AccountGroupName: stringValue AccountValueProtectionLimit: 10 CollateralMonitoringMode: MaxOfCollateralCreditValueAndCollateralCreditLine MarginCalculationMethod: Default MarginLendingEnabled: 'No' MarginMonitoringMode: Equity PortfolioBasedMarginEnabled: false SupportsAccountValueProtectionLimit: true MaxRows: 99 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. responses: TooManyRequests: description: The request was rejected due to rate limit being exceeded. ServiceUnavailable: description: Service Unavailable. BadRequest: description: One or more of the provided parameters are invalid. content: application/json: schema: required: - ErrorCode - Message type: object properties: ErrorCode: enum: - InvalidRequest type: string example: None x-enum-descriptions: InvalidRequest: Default error code returned when it cannot be determined which part of the request is malformed. Message: type: string ModelState: $ref: '#/components/schemas/ModelStateDictionary' Unauthorized: description: Indicates that the request was rejected because the 'Authorization' header was missing in the request or contained an invalid security token. securitySchemes: OpenApiJWTSecurityScheme: type: http scheme: bearer bearerFormat: JWT OpenApiOAuthSecurityScheme: type: oauth2 flows: authorizationCode: authorizationUrl: https://sim.logonvalidation.net/authorize tokenUrl: https://sim.logonvalidation.net/token scopes: {}