Saxo Bank Apps API

Provides OAuth app secrets related endpoints

OpenAPI Specification

saxo-apps-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Services.AutoTrading Account Values Apps 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: Apps
  description: Provides OAuth app secrets related endpoints
paths:
  /developer/apps/resource/{AppKey}:
    get:
      tags:
      - Apps
      description: Returns requested resource by appKey
      operationId: DeveloperAppGetResourceByAppKey
      parameters:
      - name: AppKey
        in: path
        description: Unique key for each application
        required: true
        style: simple
        schema:
          type: string
        example: 75767c64-1452-4fcf-b858-958c1e33678d
      responses:
        '200':
          description: Indicates that the request was performed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppResourceDto'
              example:
                AppKey: stringValue
                Branding:
                - Description: stringValue
                  Id: 99
                  Name: stringValue
                CreatedBy:
                  Name: stringValue
                  UserKey: stringValue
                Description: stringValue
                Endpoints:
                  AuthorizationEndpoint: stringValue
                  TokenEndpoint: stringValue
                Flow: stringValue
                IsActive: false
                IsTradingEnabled: true
                Name: stringValue
                RedirectUris:
                - Branding:
                    Description: stringValue
                    Id: 99
                    Name: stringValue
                  Description: stringValue
                  RedirectUriId: 99
                  Uri: stringValue
                Secrets:
                - Secret: stringValue
                  SecretId: 99
                  ValidFrom: '0001-01-01T00:00:00Z'
                  ValidUntil: '0001-01-01T00:00:00Z'
                Status: Requested
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                required:
                - ErrorCode
                - Message
                type: object
                properties:
                  ErrorCode:
                    enum:
                    - NotAbleToIdentifyUserId
                    type: string
                    example: None
                    x-enum-descriptions:
                      NotAbleToIdentifyUserId: Not able to identify user id
                  Message:
                    type: string
                  ModelState:
                    $ref: '#/components/schemas/ModelStateDictionary'
        '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:
        confidential: Read
  /developer/apps/{AppKey}:
    get:
      tags:
      - Apps
      summary: Get app by appKey
      description: Returns requested app by appKey
      operationId: DeveloperAppGetAppByAppKey
      parameters:
      - name: AppKey
        in: path
        description: Unique key for each application
        required: true
        style: simple
        schema:
          type: string
        example: 76caa3a4-5eb5-45d3-88cf-bb74847a1d0e
      responses:
        '200':
          description: Indicates that the request was performed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppResourceDto'
              example:
                AppKey: stringValue
                Branding:
                - Description: stringValue
                  Id: 99
                  Name: stringValue
                CreatedBy:
                  Name: stringValue
                  UserKey: stringValue
                Description: stringValue
                Endpoints:
                  AuthorizationEndpoint: stringValue
                  TokenEndpoint: stringValue
                Flow: stringValue
                IsActive: false
                IsTradingEnabled: true
                Name: stringValue
                RedirectUris:
                - Branding:
                    Description: stringValue
                    Id: 99
                    Name: stringValue
                  Description: stringValue
                  RedirectUriId: 99
                  Uri: stringValue
                Secrets:
                - Secret: stringValue
                  SecretId: 99
                  ValidFrom: '0001-01-01T00:00:00Z'
                  ValidUntil: '0001-01-01T00:00:00Z'
                Status: Requested
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                required:
                - ErrorCode
                - Message
                type: object
                properties:
                  ErrorCode:
                    enum:
                    - NotAbleToIdentifyUserId
                    type: string
                    example: None
                    x-enum-descriptions:
                      NotAbleToIdentifyUserId: Not able to identify user id
                  Message:
                    type: string
                  ModelState:
                    $ref: '#/components/schemas/ModelStateDictionary'
        '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:
        confidential: Read
    delete:
      tags:
      - Apps
      summary: Deletes an app
      description: Deactivate an existing application
      operationId: DeveloperAppDeactivateApp
      parameters:
      - name: AppKey
        in: path
        description: Unique key for each application
        required: true
        style: simple
        schema:
          type: string
        example: 50fb26e9b4bc4e7ba78dc19f46bc84bf
      responses:
        '204':
          description: No Content
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                required:
                - ErrorCode
                - Message
                type: object
                properties:
                  ErrorCode:
                    enum:
                    - NotAbleToIdentifyUserId
                    type: string
                    example: None
                    x-enum-descriptions:
                      NotAbleToIdentifyUserId: Not able to identify user id
                  Message:
                    type: string
                  ModelState:
                    $ref: '#/components/schemas/ModelStateDictionary'
        '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:
        confidential: Write
    patch:
      tags:
      - Apps
      summary: Updates an app
      description: "Updates an existing application\n            Inactive app cannot be updated\n            App can be updated if (1) app is active or (2) user requests to activate the app and app can be made active"
      operationId: DeveloperAppUpdateApp
      parameters:
      - name: AppKey
        in: path
        description: Unique key for each application
        required: true
        style: simple
        schema:
          type: string
        example: 50fb26e9b4bc4e7ba78dc19f46bc84bf
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppUpdateRequest'
            example:
              Description: some description
              Name: App Name1
      responses:
        '204':
          description: No Content
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                required:
                - ErrorCode
                - Message
                type: object
                properties:
                  ErrorCode:
                    enum:
                    - NotAbleToIdentifyClientInfo
                    type: string
                    example: None
                    x-enum-descriptions:
                      NotAbleToIdentifyClientInfo: Not able to identify required client info
                  Message:
                    type: string
                  ModelState:
                    $ref: '#/components/schemas/ModelStateDictionary'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                required:
                - ErrorCode
                - Message
                type: object
                properties:
                  ErrorCode:
                    enum:
                    - UnableToActivateApp
                    type: string
                    example: None
                    x-enum-descriptions:
                      UnableToActivateApp: Unable to activate an app
                  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
  /developer/apps:
    get:
      tags:
      - Apps
      description: Gets the apps owned by the client of the user
      operationId: DeveloperAppGetApps
      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
        style: form
        explode: false
        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
        style: form
        explode: false
        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
        style: form
        explode: false
        schema:
          minimum: 0
          type: integer
          format: int32
          default: 20
        example: 1
      responses:
        '200':
          description: Indicates that the request was performed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppDtoListResult'
              example:
                Data:
                - AppKey: stringValue
                  Brandings:
                  - Description: stringValue
                    Id: 99
                    Name: stringValue
                  CreatedBy:
                    Name: stringValue
                    UserKey: stringValue
                  Description: stringValue
                  Endpoints:
                    AuthorizationEndpoint: stringValue
                    TokenEndpoint: stringValue
                  Flow: stringValue
                  IsActive: true
                  IsTradingEnabled: false
                  ManualOrderIndicationDefault: stringValue
                  ManualOrderIndicator: stringValue
                  Name: stringValue
                  Status: Approved
                MaxRows: 99
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                required:
                - ErrorCode
                - Message
                type: object
                properties:
                  ErrorCode:
                    enum:
                    - NotAbleToIdentifyUserId
                    type: string
                    example: None
                    x-enum-descriptions:
                      NotAbleToIdentifyUserId: Not able to identify user id
                  Message:
                    type: string
                  ModelState:
                    $ref: '#/components/schemas/ModelStateDictionary'
        '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:
        confidential: Read
    post:
      tags:
      - Apps
      description: Create a app
      operationId: DeveloperAppCreateApp
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppCreationRequest'
            example:
              Description: New App Description
              Flow: Code
              IsTradingEnabled: true
              Name: New App Name
              RedirectUri: http://my.domain/myApp
      responses:
        '201':
          description: Indicates that the request was performed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppDto'
              example:
                AppKey: stringValue
                Brandings:
                - Description: stringValue
                  Id: 99
                  Name: stringValue
                CreatedBy:
                  Name: stringValue
                  UserKey: stringValue
                Description: stringValue
                Endpoints:
                  AuthorizationEndpoint: stringValue
                  TokenEndpoint: stringValue
                Flow: stringValue
                IsActive: true
                IsTradingEnabled: false
                ManualOrderIndicationDefault: stringValue
                ManualOrderIndicator: stringValue
                Name: stringValue
                Status: Requested
        '400':
          description: Indicates that the request is not correct.
          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'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                required:
                - ErrorCode
                - Message
                type: object
                properties:
                  ErrorCode:
                    enum:
                    - NotAbleToIdentifyClientInfo
                    type: string
                    example: None
                    x-enum-descriptions:
                      NotAbleToIdentifyClientInfo: Not able to identify required client info
                  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
  /developer/apps/{AppKey}/redirecturis/{RedirectUriId}:
    get:
      tags:
      - Apps
      description: Gets a redirect uri by id
      operationId: DeveloperRedirectGetRedirectUriFromId
      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
        style: form
        explode: false
        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
        style: form
        explode: false
        schema:
          minimum: 0
          type: integer
          format: int32
        example: 1
      - name: $skiptoken
        in: query
        description: Specifies an entity id to start retrieving entries from. This is normally only used in generated nextlinks.
        style: form
        explode: false
        schema:
          type: string
        example: B17D8890-3C7A-4A47-A9AA-01B022ED03A5
      - name: $top
        in: query
        description: The number of entries to return from the beginning of the collection
        style: form
        explode: false
        schema:
          minimum: 0
          type: integer
          format: int32
          default: 0
        example: 1
      - name: AppKey
        in: path
        description: Unique key for each application
        required: true
        style: simple
        schema:
          type: string
        example: 50fb26e9b4bc4e7ba78dc19f46bc84bf
      - name: RedirectUriId
        in: path
        description: Unique key for each app redirect uri
        required: true
        style: simple
        schema:
          type: integer
          format: int32
        example: 1
      responses:
        '200':
          description: Indicates that the request was performed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppRedirectDto'
              example:
                Branding:
                  Description: stringValue
                  Id: 99
                  Name: stringValue
                Description: stringValue
                RedirectUriId: 99
                Uri: stringValue
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                required:
                - ErrorCode
                - Message
                type: object
                properties:
                  ErrorCode:
                    enum:
                    - NoResultFound
                    type: string
                    example: None
                    x-enum-descriptions:
                      NoResultFound: Record cannot be found based on input crieterias
                  Message:
                    type: string
                  ModelState:
                    $ref: '#/components/schemas/ModelStateDictionary'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                required:
                - ErrorCode
                - Message
                type: object
                properties:
                  ErrorCode:
                    enum:
                    - NotAbleToIdentifyUserId
                    type: string
                    example: None
                    x-enum-descriptions:
                      NotAbleToIdentifyUserId: Not able to identify user id
                  Message:
                    type: string
                  ModelState:
                    $ref: '#/components/schemas/ModelStateDictionary'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
      - OpenApiOAuthSecurityScheme: []
      - OpenApiJWTSecurityScheme: []
    delete:
      tags:
      - Apps
      description: Deletes a redirect uri
      operationId: DeveloperRedirectDeleteRedirectUri
      parameters:
      - name: AppKey
        in: path
        description: Unique key for each application
        required: true
        style: simple
        schema:
          type: string
        example: 50fb26e9b4bc4e7ba78dc19f46bc84bf
      - name: RedirectUriId
        in: path
        description: Unique key for each app redirect uri
        required: true
        style: simple
        schema:
          type: integer
          format: int32
        example: 1
      responses:
        '204':
          description: Indicates that the delete request was performed correctly.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                required:
                - ErrorCode
                - Message
                type: object
                properties:
                  ErrorCode:
                    enum:
                    - NoResultFound
                    type: string
                    example: None
                    x-enum-descriptions:
                      NoResultFound: Record cannot be found based on input crieterias
                  Message:
                    type: string
                  ModelState:
                    $ref: '#/components/schemas/ModelStateDictionary'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                required:
                - ErrorCode
                - Message
                type: object
                properties:
                  ErrorCode:
                    enum:
                    - NotAbleToIdentifyClientInfo
                    type: string
                    example: None
                    x-enum-descriptions:
                      NotAbleToIdentifyClientInfo: Not able to identify required client info
                  Message:
                    type: string
                  ModelState:
                    $ref: '#/components/schemas/ModelStateDictionary'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
      - OpenApiOAuthSecurityScheme: []
      - OpenApiJWTSecurityScheme: []
    patch:
      tags:
      - Apps
      description: Updates a redirect uri
      operationId: DeveloperRedirectUpdateRedirectUri
      parameters:
      - name: AppKey
        in: path
        description: Unique key for each application
        required: true
        style: simple
        schema:
          type: string
        example: 50fb26e9b4bc4e7ba78dc19f46bc84bf
      - name: RedirectUriId
        in: path
        description: Unique key for each redirect uri
        required: true
        style: simple
        schema:
          type: integer
          format: int32
        example: 1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RedirectUriUpdateRequest'
            example:
              Description: some description
              Uri: http://mycompany.com/myapp
      responses:
        '204':
          description: No Content
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppRedirectDto'
              example:
                Branding:
                  Description: stringValue
                  Id: 99
                  Name: stringValue
                Description: stringValue
                RedirectUriId: 99
                Uri: stringValue
        '200':
          description: Indicates that the request was performed correctly.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                required:
                - ErrorCode
                - Message
                type: object
                properties:
                  ErrorCode:
                    enum:
                    - NoResultFound
                    type: string
                    example: None
                    x-enum-descriptions:
                      NoResultFound: Record cannot be found based on input crieterias
                  Message:
                    type: string
                  ModelState:
                    $ref: '#/components/schemas/ModelStateDictionary'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                required:
                - ErrorCode
                - Message
                type: object
                properties:
                  ErrorCode:
                    enum:
                    - NotAbleToIdentifyUserId
                    type: string
                    example: None
                    x-enum-descriptions:
                      NotAbleToIdentifyUserId: Not able to identify user id
                  Message:
                    type: string
                  ModelState:
                    $ref: '#/components/schemas/ModelStateDictionary'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
      - OpenApiOAuthSecurityScheme: []
      - OpenApiJWTSecurityScheme: []
  /developer/apps/{AppKey}/redirecturis:
    get:
      tags:
      - Apps
      description: Gets redirect uris for a given app
      operationId: DeveloperRedirectGetRedirectUris
      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
        style: form
        explode: false
        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
        style: form
        explode: false
        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
        style: form
        explode: false
        schema:
          maximum: 1000
          minimum: 0
          type: integer
          format: int32
          default: 20
        example: 1
      - name: AppKey
        in: path
        description: Unique key for each application
        required: true
        style: simple
        schema:
          type: string
        example: 50fb26e9b4bc4e7ba78dc19f46bc84bf
      responses:
        '200':
          description: Indicates that the request was performed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppRedirectDtoListResult'
              example:
                Data:
                - Branding:
                    Description: stringValue
                    Id: 99
                    Name: stringValue
                  Description: stringValue
                  RedirectUriId: 99
                  Uri: stringValue
                MaxRows: 99
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                required:
                - ErrorCode
                - Message
                type: object
                properties:
                  ErrorCode:
                    enum:
                    - NoResultFound
                    type: string
                    example: None
                    x-enum-descriptions:
                      NoResultFound: Record cannot be found based on input crieterias
                  Message:
                    type: string
                  ModelState:
                    $ref: '#/components/schemas/ModelStateDictionary'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                required:
                - ErrorCode
                - Message
                type: object
                properties:
                  ErrorCode:
                    enum:
                    - NotAbleToIdentifyUserId
                    type: string
                    example: None
                    x-enum-descriptions:
                      NotAbleToIdentifyUserId: Not able to identify user id
                  Message:
                    type: string
                  ModelState:
                    $ref: '#/components/schemas/ModelStateDictionary'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
      - OpenApiOAuthSecurityScheme: []
      - OpenApiJWTSecurityScheme: []
    post:
      tags:
      - Apps
      description: Creates a redirect uri
      operationId: DeveloperRedirectCreateRedirectUri
      parameters:
      - name: AppKey
        in: path
        description: Unique key for each application
        required: true
        style: simple
        schema:
          type: string
        example: f0232f57-9d4a-40a7-adeb-82d347536d35
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppRedirectUriCreationRequest'
            example:
              Description: New App Description
              Uri: http://my.com/myapp
      responses:
        '201':
          description: Indicates that the request was performed correctly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppRedirectUriResponse'
              example:
                Data:
                  Branding:
                    Description: stringValue
                    Id: 99
                    Name: stringValue
            

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