openapi: 3.0.2
info:
  title: Foreign Exchange Confirmation API
  description: You can use this API to confirm a foreign exchange contract or foreign currency option that has been agreed by two parties. The equivalent to this process in the MT messaging standard would be the MT300 and MT305.
  contact:
    name: Developer Hub
    url: https://developer.swift.com
    email: developer-support@swift.com
  license:
    name: API Restricted License
    url: https://developer.swift.com/api-license
  version: 1.1.0
servers:
- url: https://api-test.swiftnet.sipn.swift.com/swift-fx-confirmation/v1
  description: URL for Apigee (SDK consumer) Pilot.
- url: https://api.swiftnet.sipn.swift.com/swift-fx-confirmation/v1
  description: URL for Apigee (SDK consumer) Live.
- url: https://sandbox.swift.com/swift-fx-confirmation/v1
  description: URL for Sandbox Environment.
security:
- oauthBearerToken: []
- oAuth2: []
tags:
- name: FX Trade Confirmation
  description: Concerning the creation and amendment of FX trade comfirmations.
- name: FX Option Trade Confirmation
  description: Concerning the creation and amendment of FX option trade comfirmations.
paths:
  /foreign-exchange-confirmation/{confirmation_reference}:
    get:
      tags:
      - FX Trade Confirmation
      summary: Get FX Confirmations.
      description: Get details of a specific agreement between two parties in which one party buys a currency and the other party sells a different currency. The endpoint will retrieve foreign exchange information based on a unique identifier.
      operationId: fetchForeignExchangeConfirmation
      parameters:
      - name: confirmation_reference
        in: path
        description: "Unique technical identification of the foreign exchange confirmation as created by the server. \r\n\r\nUsage: This element should only be populated when a PUT or GET operation is undertaken. The identifier is only created after the original POST."
        required: true
        style: simple
        explode: false
        schema:
          pattern: "[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}"
          type: string
          description: "Universally Unique IDentifier (UUID) version 4, as described in IETC RFC 4122 \"Universally Unique IDentifier (UUID) URN Namespace\"."
          x-MXComponent: UUIDv4Identifier
        example: 272ae3bd-e972-4047-9977-2fc1a624f6bf
      - $ref: "#/components/parameters/X-Request-ID"
      - $ref: "#/components/parameters/X-BIC"
      responses:
        "200":
          description: Foreign exchange confirmation.
          headers:
            X-Request-ID:
              $ref: "#/components/headers/X-Request-ID"
            Swift-Request-ID:
              $ref: "#/components/headers/Swift-Request-ID"              
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForeignExchangeConfirmation2"
              example:
                confirmation_reference: 272ae3bd-e972-4047-9977-2fc1a624f6bf
                trading_side_identification:
                  any_bic:
                    any_bic: TWIXNLNLXXX
                counterparty_side_identification:
                  any_bic:
                    any_bic: WPACAU2SXXX
                agreement_details:
                  agreement_code: ISDA
                definitions_year: "1998"
                trade_date: 2025-06-02
                settlement_date: 2025-06-04
                exchange_rate:
                  exchange_rate: "1.22164"
                buy_amount:
                  amount:
                    currency: USD
                    amount: "1832494.67"
                sell_amount:
                  amount:
                    currency: GBP
                    amount: "1500000.00"
                trading_side_settlement_instructions:
                  standing_settlement_instruction:
                  - role: IVAG
                    agent:
                      any_bic:
                        any_bic: BOFAUS3NXXX
                counterparty_side_settlement_instructions:
                  standing_settlement_instruction:
                  - role: IVAG
                    agent:
                      any_bic:
                        any_bic: MIDLGB22XXX
                contact_information:
                  name: John Doe
                  fax_number: +1-212-555-0199
                  telephone_number: +1-212-555-0100
                  email_address: jdoe@twix.com
                additional_information: FX trade confirmed per agreement terms
        "400":
          description: A 400 Bad Request response status is returned for validation or other business errors.
          headers:
            X-Request-ID:
              $ref: "#/components/headers/X-Request-ID"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage"
              examples:
                "400-SwAP510":
                  $ref: "#/components/examples/400-SwAP510"
                "400-SwAP509":
                  $ref: "#/components/examples/400-SwAP509"
                "400-SwAP504-txt":
                  $ref: "#/components/examples/400-SwAP504-txt"
                "400-SwAP504-bic":
                  $ref: "#/components/examples/400-SwAP504-bic"
                "400-SwAP504-svc":
                  $ref: "#/components/examples/400-SwAP504-svc"
                "400-SwAP522":
                  $ref: "#/components/examples/400-SwAP522"
                "400-SwAP504":
                  $ref: "#/components/examples/400-SwAP504"
                "400-SwAP505":
                  $ref: "#/components/examples/400-SwAP505"
                "400-SwAP501":
                  $ref: "#/components/examples/400-SwAP501"
        "401":
          $ref: "#/components/responses/401-Unauthorized"
        "403":
          $ref: "#/components/responses/403-Forbidden"
        "404":
          $ref: "#/components/responses/404-NotFound"
        "429":
          $ref: "#/components/responses/429-TooManyRequests"
        "500":
          $ref: "#/components/responses/500-InternalServerError"
        "503":
          $ref: "#/components/responses/503-ServiceUnavailable"
        "504":
          $ref: "#/components/responses/504-GatewayTimeout"
        default:
          $ref: "#/components/responses/500-InternalServerError"
    put:
      tags:
      - FX Trade Confirmation
      summary: Amend or cancel FX Confirmation.
      description: "Amend the details of, or cancel, an agreement between two parties in which one party buys a currency and the other party sells a different currency."
      operationId: updateForeignExchangeConfirmation
      parameters:
      - name: confirmation_reference
        in: path
        description: "Unique technical identification of the foreign exchange confirmation as created by the server. \r\n\r\nUsage: This element should only be populated when a PUT or GET operation is undertaken. The identifier is only created after the original POST."
        required: true
        style: simple
        explode: false
        schema:
          pattern: "[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}"
          type: string
          description: "Universally Unique IDentifier (UUID) version 4, as described in IETC RFC 4122 \"Universally Unique IDentifier (UUID) URN Namespace\"."
          x-MXComponent: UUIDv4Identifier
        example: 272ae3bd-e972-4047-9977-2fc1a624f6bf
      - $ref: "#/components/parameters/X-Request-ID"
      - $ref: "#/components/parameters/X-BIC"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ForeignExchangeConfirmation2"
            examples:
              AmendExample:
                summary: Amend the details of a FX trade confirmation
                value:
                  request_action: AMND
                  trading_side_identification:
                    any_bic:
                      any_bic: TWIXNLNLXXX
                  counterparty_side_identification:
                    any_bic:
                      any_bic: WPACAU2SXXX
                  agreement_details:
                    agreement_code: ISDA
                  definitions_year: "1998"
                  trade_date: 2025-06-02
                  settlement_date: 2025-06-04
                  exchange_rate:
                    exchange_rate: "1.22164"
                  buy_amount:
                    amount:
                      currency: USD
                      amount: "1832494.67"
                  sell_amount:
                    amount:
                      currency: GBP
                      amount: "1500000.00"
                  trading_side_settlement_instructions:
                    standing_settlement_instruction:
                    - role: IVAG
                      agent:
                        any_bic:
                          any_bic: CITIUS33XXX
                  counterparty_side_settlement_instructions:
                    standing_settlement_instruction:
                    - role: IVAG
                      agent:
                        any_bic:
                          any_bic: MIDLGB22XXX
                  contact_information:
                    name: John Doe
                    fax_number: +1-212-555-0199
                    telephone_number: +1-212-555-0100
                    email_address: jdoe@twix.com
                  additional_information: FX trade confirmed per agreement terms
              CancelExample:
                summary: Cancel a FX trade confirmation
                value:
                  request_action: CANC
                  trading_side_identification:
                    any_bic:
                      any_bic: TWIXNLNLXXX
                  counterparty_side_identification:
                    any_bic:
                      any_bic: WPACAU2SXXX
                  agreement_details:
                    agreement_code: ISDA
                  definitions_year: "1998"
                  trade_date: 2025-06-02
                  settlement_date: 2025-06-04
                  exchange_rate:
                    exchange_rate: "1.22164"
                  buy_amount:
                    amount:
                      currency: USD
                      amount: "1832494.67"
                  sell_amount:
                    amount:
                      currency: GBP
                      amount: "1500000.00"
                  trading_side_settlement_instructions:
                    standing_settlement_instruction:
                    - role: IVAG
                      agent:
                        any_bic:
                          any_bic: CITIUS33XXX
                  counterparty_side_settlement_instructions:
                    standing_settlement_instruction:
                    - role: IVAG
                      agent:
                        any_bic:
                          any_bic: MIDLGB22XXX
                  contact_information:
                    name: John Doe
                    fax_number: +1-212-555-0199
                    telephone_number: +1-212-555-0100
                    email_address: jdoe@twix.com
                  additional_information: FX trade confirmed per agreement terms
      responses:
        "200":
          description: Foreign exchange confirmation.
          headers:
            X-Request-ID:
              $ref: "#/components/headers/X-Request-ID"
            Swift-Request-ID:
              $ref: "#/components/headers/Swift-Request-ID"                
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForeignExchangeConfirmation2"
              example:
                confirmation_reference: 272ae3bd-e972-4047-9977-2fc1a624f6bf
                trading_side_identification:
                  any_bic:
                    any_bic: TWIXNLNLXXX
                counterparty_side_identification:
                  any_bic:
                    any_bic: WPACAU2SXXX
                agreement_details:
                  agreement_code: ISDA
                definitions_year: "1998"
                trade_date: 2025-06-02
                settlement_date: 2025-06-04
                exchange_rate:
                  exchange_rate: "1.22164"
                buy_amount:
                  amount:
                    currency: USD
                    amount: "1832494.67"
                sell_amount:
                  amount:
                    currency: GBP
                    amount: "1500000.00"
                trading_side_settlement_instructions:
                  standing_settlement_instruction:
                  - role: IVAG
                    agent:
                      any_bic:
                        any_bic: CITIUS33XXX
                counterparty_side_settlement_instructions:
                  standing_settlement_instruction:
                  - role: IVAG
                    agent:
                      any_bic:
                        any_bic: MIDLGB22XXX
                contact_information:
                  name: John Doe
                  fax_number: +1-212-555-0199
                  telephone_number: +1-212-555-0100
                  email_address: jdoe@twix.com
                additional_information: FX trade confirmed per agreement terms
        "400":
          description: A 400 Bad Request response status is returned for validation or other business errors.
          headers:
            X-Request-ID:
              $ref: "#/components/headers/X-Request-ID"
            Swift-Request-ID:
              $ref: "#/components/headers/Swift-Request-ID"                
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage"
              examples:
                "400-SwAP510":
                  $ref: "#/components/examples/400-SwAP510"
                "400-SwAP509":
                  $ref: "#/components/examples/400-SwAP509"
                "400-SwAP504-txt":
                  $ref: "#/components/examples/400-SwAP504-txt"
                "400-SwAP504-bic":
                  $ref: "#/components/examples/400-SwAP504-bic"
                "400-SwAP504-svc":
                  $ref: "#/components/examples/400-SwAP504-svc"
                "400-SwAP522":
                  $ref: "#/components/examples/400-SwAP522"
                "400-SwAP504":
                  $ref: "#/components/examples/400-SwAP504"
                "400-SwAP505":
                  $ref: "#/components/examples/400-SwAP505"
                "400-SwAP501":
                  $ref: "#/components/examples/400-SwAP501"
        "401":
          $ref: "#/components/responses/401-Unauthorized"
        "403":
          $ref: "#/components/responses/403-Forbidden"
        "404":
          $ref: "#/components/responses/404-NotFound"
        "429":
          $ref: "#/components/responses/429-TooManyRequests"
        "500":
          $ref: "#/components/responses/500-InternalServerError"
        "503":
          $ref: "#/components/responses/503-ServiceUnavailable"
        "504":
          $ref: "#/components/responses/504-GatewayTimeout"
        default:
          $ref: "#/components/responses/500-InternalServerError"
  /foreign-exchange-confirmation:
    post:
      tags:
      - FX Trade Confirmation
      summary: Generate FX Confirmation.
      description: Supply details of an agreement between two parties in which one party buys a currency and the other party sells a different currency.
      operationId: createForeignExchangeConfirmation
      parameters:
      - $ref: "#/components/parameters/X-Request-ID"
      - $ref: "#/components/parameters/X-BIC"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ForeignExchangeConfirmation2"
            example:
              trading_side_identification:
                any_bic:
                  any_bic: TWIXNLNLXXX
              counterparty_side_identification:
                any_bic:
                  any_bic: WPACAU2SXXX
              agreement_details:
                agreement_code: ISDA
              definitions_year: "1998"
              trade_date: 2025-06-02
              settlement_date: 2025-06-04
              exchange_rate:
                exchange_rate: "1.22164"
              buy_amount:
                amount:
                  currency: USD
                  amount: "1832494.67"
              sell_amount:
                amount:
                  currency: GBP
                  amount: "1500000.00"
              trading_side_settlement_instructions:
                standing_settlement_instruction:
                - role: IVAG
                  agent:
                    any_bic:
                      any_bic: BOFAUS3NXXX
              counterparty_side_settlement_instructions:
                standing_settlement_instruction:
                - role: IVAG
                  agent:
                    any_bic:
                      any_bic: MIDLGB22XXX
              contact_information:
                name: John Doe
                fax_number: +1-212-555-0199
                telephone_number: +1-212-555-0100
                email_address: jdoe@twix.com
              additional_information: FX trade confirmed per agreement terms
      responses:
        "201":
          description: Foreign exchange confirmation.
          headers:
            X-Request-ID:
              $ref: "#/components/headers/X-Request-ID"
            Swift-Request-ID:
              $ref: "#/components/headers/Swift-Request-ID"                
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForeignExchangeConfirmation2ConfirmationReference"
              example:
                confirmation_reference: 550e8400-e29b-41d4-a716-446655440000
        "400":
          description: A 400 Bad Request response status is returned for validation or other business errors.
          headers:
            X-Request-ID:
              $ref: "#/components/headers/X-Request-ID"
            Swift-Request-ID:
              $ref: "#/components/headers/Swift-Request-ID"                
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage"
              examples:
                "400-SwAP510":
                  $ref: "#/components/examples/400-SwAP510"
                "400-SwAP509":
                  $ref: "#/components/examples/400-SwAP509"
                "400-SwAP504-txt":
                  $ref: "#/components/examples/400-SwAP504-txt"
                "400-SwAP504-bic":
                  $ref: "#/components/examples/400-SwAP504-bic"
                "400-SwAP504-svc":
                  $ref: "#/components/examples/400-SwAP504-svc"
                "400-SwAP522":
                  $ref: "#/components/examples/400-SwAP522"
                "400-SwAP504":
                  $ref: "#/components/examples/400-SwAP504"
                "400-SwAP505":
                  $ref: "#/components/examples/400-SwAP505"
                "400-SwAP501":
                  $ref: "#/components/examples/400-SwAP501"
        "401":
          $ref: "#/components/responses/401-Unauthorized"
        "403":
          $ref: "#/components/responses/403-Forbidden"
        "404":
          $ref: "#/components/responses/404-NotFound"
        "429":
          $ref: "#/components/responses/429-TooManyRequests"
        "500":
          $ref: "#/components/responses/500-InternalServerError"
        "503":
          $ref: "#/components/responses/503-ServiceUnavailable"
        "504":
          $ref: "#/components/responses/504-GatewayTimeout"
        default:
          $ref: "#/components/responses/500-InternalServerError"
  /foreign-currency-option-confirmation/{option_reference}:
    get:
      tags:
      - FX Option Trade Confirmation
      summary: Get FX Options.
      description: Get details of a specific agreement for a foreign currency option between two parties. The endpoint will retrieve foreign currency option information based on a unique identifier.
      operationId: fetchForeignCurrencyOptionConfirmation
      parameters:
      - name: option_reference
        in: path
        description: "Unique technical identification of the foreign currency option as created by the server. \r\n\r\nUsage: This element should only be populated when a PUT or GET operation is undertaken. The identifier is only created after the original POST."
        required: true
        style: simple
        explode: false
        schema:
          pattern: "[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}"
          type: string
          description: "Universally Unique IDentifier (UUID) version 4, as described in IETC RFC 4122 \"Universally Unique IDentifier (UUID) URN Namespace\"."
          x-MXComponent: UUIDv4Identifier
        example: c172a92b-2ce4-476d-afc7-ee1693c214f8
      - $ref: "#/components/parameters/X-Request-ID"
      - $ref: "#/components/parameters/X-BIC"
      responses:
        "200":
          description: Foreign currency option confirmation.
          headers:
            X-Request-ID:
              $ref: "#/components/headers/X-Request-ID"
            Swift-Request-ID:
              $ref: "#/components/headers/Swift-Request-ID"                
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForeignCurrencyOptionConfirmation2"
              example:
                option_reference: c172a92b-2ce4-476d-afc7-ee1693c214f8
                option_bought_or_sold: BUYI
                exercise_style: AMER
                trading_side_identification:
                  any_bic:
                    any_bic: TWIXNLNLXXX
                counterparty_side_identification:
                  any_bic:
                    any_bic: WPACAU2SXXX
                trade_date: 2025-06-02
                earliest_exercise_date: 2025-06-04
                expiry_date_and_time: 2025-06-30T16:00:00+00:00
                final_settlement_date: 2025-07-02
                settlement_amount_type: PRIN
                strike_price:
                  exchange_rate: "1.22164"
                put_amount:
                  amount:
                    currency: USD
                    amount: "1832494.67"
                call_amount:
                  amount:
                    currency: GBP
                    amount: "1500000.00"
                premium:
                  premium_quote:
                    percentage_of_call_amount: "10"
                  premium_currency: GBP
                  amount:
                    currency: GBP
                    amount: "150000.00"
                  premium_settlement_date: 2025-06-04
                premium_settlement_instructions:
                  standing_settlement_instruction:
                  - role: IVAG
                    agent:
                      any_bic:
                        any_bic: MIDLGB22XXX
                agreement_details:
                  agreement_code: ISDA
                definitions_year: "1998"
                contact_information:
                  name: John Doe
                  fax_number: +1-212-555-0199
                  telephone_number: +1-212-555-0100
                  email_address: jdoe@twix.com
                additional_information: FX option confirmed per agreement terms
        "400":
          description: A 400 Bad Request response status is returned for validation or other business errors.
          headers:
            X-Request-ID:
              $ref: "#/components/headers/X-Request-ID"
            Swift-Request-ID:
              $ref: "#/components/headers/Swift-Request-ID"                
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage"
              examples:
                "400-SwAP510":
                  $ref: "#/components/examples/400-SwAP510"
                "400-SwAP509":
                  $ref: "#/components/examples/400-SwAP509"
                "400-SwAP504-txt":
                  $ref: "#/components/examples/400-SwAP504-txt"
                "400-SwAP504-bic":
                  $ref: "#/components/examples/400-SwAP504-bic"
                "400-SwAP504-svc":
                  $ref: "#/components/examples/400-SwAP504-svc"
                "400-SwAP522":
                  $ref: "#/components/examples/400-SwAP522"
                "400-SwAP504":
                  $ref: "#/components/examples/400-SwAP504"
                "400-SwAP505":
                  $ref: "#/components/examples/400-SwAP505"
                "400-SwAP501":
                  $ref: "#/components/examples/400-SwAP501"
        "401":
          $ref: "#/components/responses/401-Unauthorized"
        "403":
          $ref: "#/components/responses/403-Forbidden"
        "404":
          $ref: "#/components/responses/404-NotFound"
        "429":
          $ref: "#/components/responses/429-TooManyRequests"
        "500":
          $ref: "#/components/responses/500-InternalServerError"
        "503":
          $ref: "#/components/responses/503-ServiceUnavailable"
        "504":
          $ref: "#/components/responses/504-GatewayTimeout"
        default:
          $ref: "#/components/responses/500-InternalServerError"
    put:
      tags:
      - FX Option Trade Confirmation
      summary: Amend or cancel FX Option.
      description: "Amend the details of, or cancel, a specific agreement for a foreign currency option between two parties."
      operationId: updateForeignCurrencyOptionConfirmation
      parameters:
      - name: option_reference
        in: path
        description: "Unique technical identification of the foreign currency option as created by the server. \r\n\r\nUsage: This element should only be populated when a PUT or GET operation is undertaken. The identifier is only created after the original POST."
        required: true
        style: simple
        explode: false
        schema:
          pattern: "[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}"
          type: string
          description: "Universally Unique IDentifier (UUID) version 4, as described in IETC RFC 4122 \"Universally Unique IDentifier (UUID) URN Namespace\"."
          x-MXComponent: UUIDv4Identifier
        example: c172a92b-2ce4-476d-afc7-ee1693c214f8
      - $ref: "#/components/parameters/X-Request-ID"
      - $ref: "#/components/parameters/X-BIC"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ForeignCurrencyOptionConfirmation2"
            examples:
              AmendExample:
                summary: Amend the details of a FX option trade confirmation
                value:
                  request_action: AMND
                  option_bought_or_sold: BUYI
                  exercise_style: AMER
                  trading_side_identification:
                    any_bic:
                      any_bic: TWIXNLNLXXX
                  counterparty_side_identification:
                    any_bic:
                      any_bic: WPACAU2SXXX
                  trade_date: 2025-06-02
                  earliest_exercise_date: 2025-06-04
                  expiry_date_and_time: 2025-06-30T16:00:00+00:00
                  final_settlement_date: 2025-07-02
                  settlement_amount_type: PRIN
                  strike_price:
                    exchange_rate: "1.22164"
                  put_amount:
                    amount:
                      currency: USD
                      amount: "1832494.67"
                  call_amount:
                    amount:
                      currency: GBP
                      amount: "1500000.00"
                  premium:
                    premium_quote:
                      percentage_of_call_amount: "10"
                    premium_currency: GBP
                    amount:
                      currency: GBP
                      amount: "150000.00"
                    premium_settlement_date: 2025-06-04
                  premium_settlement_instructions:
                    standing_settlement_instruction:
                    - role: IVAG
                      agent:
                        any_bic:
                          any_bic: BARCGB22XXX
                  agreement_details:
                    agreement_code: ISDA
                  definitions_year: "1998"
                  contact_information:
                    name: John Doe
                    fax_number: +1-212-555-0199
                    telephone_number: +1-212-555-0100
                    email_address: jdoe@twix.com
                  additional_information: FX option confirmed per agreement terms
              CancelExample:
                summary: Cancel a FX option trade confirmation
                value:
                  request_action: CANC
                  option_bought_or_sold: BUYI
                  exercise_style: AMER
                  trading_side_identification:
                    any_bic:
                      any_bic: TWIXNLNLXXX
                  counterparty_side_identification:
                    any_bic:
                      any_bic: WPACAU2SXXX
                  trade_date: 2025-06-02
                  earliest_exercise_date: 2025-06-04
                  expiry_date_and_time: 2025-06-30T16:00:00+00:00
                  final_settlement_date: 2025-07-02
                  settlement_amount_type: PRIN
                  strike_price:
                    exchange_rate: "1.22164"
                  put_amount:
                    amount:
                      currency: USD
                      amount: "1832494.67"
                  call_amount:
                    amount:
                      currency: GBP
                      amount: "1500000.00"
                  premium:
                    premium_quote:
                      percentage_of_call_amount: "10"
                    premium_currency: GBP
                    amount:
                      currency: GBP
                      amount: "150000.00"
                    premium_settlement_date: 2025-06-04
                  premium_settlement_instructions:
                    standing_settlement_instruction:
                    - role: IVAG
                      agent:
                        any_bic:
                          any_bic: BARCGB22XXX
                  agreement_details:
                    agreement_code: ISDA
                  definitions_year: "1998"
                  contact_information:
                    name: John Doe
                    fax_number: +1-212-555-0199
                    telephone_number: +1-212-555-0100
                    email_address: jdoe@twix.com
                  additional_information: FX option confirmed per agreement terms
      responses:
        "200":
          description: Foreign currency option confirmation.
          headers:
            X-Request-ID:
              $ref: "#/components/headers/X-Request-ID"
            Swift-Request-ID:
              $ref: "#/components/headers/Swift-Request-ID"                
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForeignCurrencyOptionConfirmation2"
              example:
                option_reference: c172a92b-2ce4-476d-afc7-ee1693c214f8
                option_bought_or_sold: BUYI
                exercise_style: AMER
                trading_side_identification:
                  any_bic:
                    any_bic: TWIXNLNLXXX
                counterparty_side_identification:
                  any_bic:
                    any_bic: WPACAU2SXXX
                trade_date: 2025-06-02
                earliest_exercise_date: 2025-06-04
                expiry_date_and_time: 2025-06-30T16:00:00+00:00
                final_settlement_date: 2025-07-02
                settlement_amount_type: PRIN
                strike_price:
                  exchange_rate: "1.22164"
                put_amount:
                  amount:
                    currency: USD
                    amount: "1832494.67"
                call_amount:
                  amount:
                    currency: GBP
                    amount: "1500000.00"
                premium:
                  premium_quote:
                    percentage_of_call_amount: "10"
                  premium_currency: GBP
                  amount:
                    currency: GBP
                    amount: "150000.00"
                  premium_settlement_date: 2025-06-04
                premium_settlement_instructions:
                  standing_settlement_instruction:
                  - role: IVAG
                    agent:
                      any_bic:
                        any_bic: BARCGB22XXX
                agreement_details:
                  agreement_code: ISDA
                definitions_year: "1998"
                contact_information:
                  name: John Doe
                  fax_number: +1-212-555-0199
                  telephone_number: +1-212-555-0100
                  email_address: jdoe@twix.com
                additional_information: FX option confirmed per agreement terms
        "400":
          description: A 400 Bad Request response status is returned for validation or other business errors.
          headers:
            X-Request-ID:
              $ref: "#/components/headers/X-Request-ID"
            Swift-Request-ID:
              $ref: "#/components/headers/Swift-Request-ID"                
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage"
              examples:
                "400-SwAP510":
                  $ref: "#/components/examples/400-SwAP510"
                "400-SwAP509":
                  $ref: "#/components/examples/400-SwAP509"
                "400-SwAP504-txt":
                  $ref: "#/components/examples/400-SwAP504-txt"
                "400-SwAP504-bic":
                  $ref: "#/components/examples/400-SwAP504-bic"
                "400-SwAP504-svc":
                  $ref: "#/components/examples/400-SwAP504-svc"
                "400-SwAP522":
                  $ref: "#/components/examples/400-SwAP522"
                "400-SwAP504":
                  $ref: "#/components/examples/400-SwAP504"
                "400-SwAP505":
                  $ref: "#/components/examples/400-SwAP505"
                "400-SwAP501":
                  $ref: "#/components/examples/400-SwAP501"
        "401":
          $ref: "#/components/responses/401-Unauthorized"
        "403":
          $ref: "#/components/responses/403-Forbidden"
        "404":
          $ref: "#/components/responses/404-NotFound"
        "429":
          $ref: "#/components/responses/429-TooManyRequests"
        "500":
          $ref: "#/components/responses/500-InternalServerError"
        "503":
          $ref: "#/components/responses/503-ServiceUnavailable"
        "504":
          $ref: "#/components/responses/504-GatewayTimeout"
        default:
          $ref: "#/components/responses/500-InternalServerError"
  /foreign-currency-option-confirmation:
    post:
      tags:
      - FX Option Trade Confirmation
      summary: Create FX Option.
      description: Supply details of a specific agreement for a foreign currency option between two parties.
      operationId: createForeignCurrencyOptionConfirmation
      parameters:
      - $ref: "#/components/parameters/X-Request-ID"
      - $ref: "#/components/parameters/X-BIC"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ForeignCurrencyOptionConfirmation2"
            example:
              option_bought_or_sold: BUYI
              exercise_style: AMER
              trading_side_identification:
                any_bic:
                  any_bic: TWIXNLNLXXX
              counterparty_side_identification:
                any_bic:
                  any_bic: WPACAU2SXXX
              trade_date: 2025-06-02
              earliest_exercise_date: 2025-06-04
              expiry_date_and_time: 2025-06-30T16:00:00+00:00
              final_settlement_date: 2025-07-02
              settlement_amount_type: PRIN
              strike_price:
                exchange_rate: "1.22164"
              put_amount:
                amount:
                  currency: USD
                  amount: "1832494.67"
              call_amount:
                amount:
                  currency: GBP
                  amount: "1500000.00"
              premium:
                premium_quote:
                  percentage_of_call_amount: "10"
                premium_currency: GBP
                amount:
                  currency: GBP
                  amount: "150000.00"
                premium_settlement_date: 2025-06-04
              premium_settlement_instructions:
                standing_settlement_instruction:
                - role: IVAG
                  agent:
                    any_bic:
                      any_bic: BARCGB22XXX
              agreement_details:
                agreement_code: ISDA
              definitions_year: "1998"
              contact_information:
                name: John Doe
                fax_number: +1-212-555-0199
                telephone_number: +1-212-555-0100
                email_address: jdoe@twix.com
              additional_information: FX option confirmed per agreement terms
      responses:
        "201":
          description: Foreign currency option confirmation.
          headers:
            X-Request-ID:
              $ref: "#/components/headers/X-Request-ID"
            Swift-Request-ID:
              $ref: "#/components/headers/Swift-Request-ID"                
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForeignCurrencyOptionConfirmation2OptionReference"
              example:
                option_reference: c172a92b-2ce4-476d-afc7-ee1693c214f8
        "400":
          description: A 400 Bad Request response status is returned for validation or other business errors.
          headers:
            X-Request-ID:
              $ref: "#/components/headers/X-Request-ID"
            Swift-Request-ID:
              $ref: "#/components/headers/Swift-Request-ID"                
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorMessage"
              examples:
                "400-SwAP510":
                  $ref: "#/components/examples/400-SwAP510"
                "400-SwAP509":
                  $ref: "#/components/examples/400-SwAP509"
                "400-SwAP504-txt":
                  $ref: "#/components/examples/400-SwAP504-txt"
                "400-SwAP504-bic":
                  $ref: "#/components/examples/400-SwAP504-bic"
                "400-SwAP504-svc":
                  $ref: "#/components/examples/400-SwAP504-svc"
                "400-SwAP522":
                  $ref: "#/components/examples/400-SwAP522"
                "400-SwAP504":
                  $ref: "#/components/examples/400-SwAP504"
                "400-SwAP505":
                  $ref: "#/components/examples/400-SwAP505"
                "400-SwAP501":
                  $ref: "#/components/examples/400-SwAP501"
        "401":
          $ref: "#/components/responses/401-Unauthorized"
        "403":
          $ref: "#/components/responses/403-Forbidden"
        "404":
          $ref: "#/components/responses/404-NotFound"
        "429":
          $ref: "#/components/responses/429-TooManyRequests"
        "500":
          $ref: "#/components/responses/500-InternalServerError"
        "503":
          $ref: "#/components/responses/503-ServiceUnavailable"
        "504":
          $ref: "#/components/responses/504-GatewayTimeout"
        default:
          $ref: "#/components/responses/500-InternalServerError"
components:
  schemas:
    ForeignExchangeConfirmation2ConfirmationReference:
      type: object
      properties:
        confirmation_reference:
          pattern: "^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$"
          type: string
          description: "Unique technical identification of the foreign exchange confirmation as created by the server. \n\nUsage: This element should only be populated when a PUT or GET operation is undertaken. The identifier is only created after the original POST.\n\nBased on datatype UUIDv4Identifier: Universally Unique IDentifier (UUID) version 4, as described in IETC RFC 4122 \"Universally Unique IDentifier (UUID) URN Namespace\".\n"
          x-MXComponent: UUIDv4Identifier
      additionalProperties: false
      description: Foreign exchange confirmation.
      x-MXComponent: ForeignExchangeConfirmation2ConfirmationReference
    ForeignCurrencyOptionConfirmation2OptionReference:
      type: object
      properties:
        option_reference:
          pattern: "^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$"
          type: string
          description: "Unique technical identification of the foreign currency option as created by the server. \n\nUsage: This element should only be populated when a PUT or GET operation is undertaken. The identifier is only created after the original POST.\n\nBased on datatype UUIDv4Identifier: Universally Unique IDentifier (UUID) version 4, as described in IETC RFC 4122 \"Universally Unique IDentifier (UUID) URN Namespace\".\n"
          x-MXComponent: UUIDv4Identifier
      additionalProperties: false
      description: Foreign currency option confirmation.
      x-MXComponent: ForeignCurrencyOptionConfirmation2OptionReference
    AgentIdentification1:
      required:
      - agent
      - role
      type: object
      properties:
        role:
          maxLength: 4
          minLength: 1
          type: string
          description: "Role of agent.\n\nCODES: \nDLVR - Delivery\nITAG - Intermediary\nIVAG - Receiving\nCRED - Creditor\n \n\n\n\nBased on datatype Max4Text: Specifies a character string with a maximum length of 4 characters.\n"
          x-MXComponent: Max4Text
        agent:
          $ref: "#/components/schemas/PartyIdentification242Choice"
      additionalProperties: false
      description: Identification of an agent involved in the settlement.
      x-MXComponent: AgentIdentification1
    AgreedRate3:
      required:
      - exchange_rate
      type: object
      properties:
        exchange_rate:
          maxLength: 12
          type: string
          description: |
            The value of one currency expressed in relation to another currency. ExchangeRate expresses the ratio between UnitCurrency and QuotedCurrency (ExchangeRate = UnitCurrency/QuotedCurrency).

            Based on datatype BaseOneRate: Rate expressed as a decimal, for example, 0.7 is 7/10 and 70%.
          x-MXComponent: BaseOneRate
        unit_currency:
          pattern: "^[A-Z]{3,3}$"
          type: string
          description: |
            Currency in which the rate of exchange is expressed in a currency exchange. In the example 1GBP = xxxCUR, the unit currency is GBP.

            A code allocated to a currency by a Maintenance Agency under an international identification scheme as described in the latest edition of the international standard ISO 4217 "Codes for the representation of currencies and funds".
          x-MXComponent: ActiveCurrencyCode
        quoted_currency:
          pattern: "^[A-Z]{3,3}$"
          type: string
          description: |
            Currency into which the base currency is converted, in a currency exchange.

            A code allocated to a currency by a Maintenance Agency under an international identification scheme as described in the latest edition of the international standard ISO 4217 "Codes for the representation of currencies and funds".
          x-MXComponent: ActiveCurrencyCode
      additionalProperties: false
      description: Information needed to process a currency exchange or conversion.
      x-MXComponent: AgreedRate3
    AgreementConditions2:
      required:
      - agreement_code
      type: object
      properties:
        agreement_code:
          pattern: "^[a-zA-Z]{1,6}$"
          type: string
          description: "Specifies the type of agreement.\n\nCODES:\t\nAFB - AFB Master Agreement \nDERV - Deutscher Rahmenvertrag für Finanztermingeschäfte\nFBF - Fédération Bancaire Française Master Agreement\nFEOMA - FEOMA Master Agreement\nICOM - ICOM Master Agreement\nIFEMA - IFEMA Master Agreement\nISDA - ISDA Master Agreement\nISDACN - ISDA Master Agreement plus Additional Disruption Event Provisions for an Offshore Deliverable CNY Transaction\nISDACS - ISDA Master Agreement Plus Additional Provisions for Cash-Settled Forwards and Options (CSF, CSO) in Deliverable Currencies\nOTHER - Another type of bilateral agreement signed up front between party A and party B. The agreement must be specified in the Additional Information element.\n\nMT Mapping: Sequence A, field 77H\n\nBased on datatype Max6AlphaText: Specifies an alpha string between 1 and 6 characters.\n"
          x-MXComponent: Max6AlphaText
        date:
          pattern: "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)(?:Z|[+-][01]\\d:[0-5]\\d)?$"
          type: string
          description: |
            Specifies the date of the agreement.

            MT Mapping: Sequence A, field 77H

            Based on datatype ISODate: A particular point in the progression of time in a calendar year expressed in the YYYY-MM-DD format. This representation is defined in "XML Schema Part 2: Datatypes Second Edition - W3C Recommendation 28 October 2004" which is aligned with ISO 8601.
          x-MXComponent: ISODate
        version:
          pattern: "^[0-9]{4}$"
          type: string
          description: |
            Specifies the version of the agreement.

            MT Mapping: Sequence A, field 77H

            Based on datatype Exact4NumericText: Specifies a numeric string with an exact length of 4 digits.
          x-MXComponent: Exact4NumericText
        additional_information:
          maxLength: 210
          minLength: 1
          type: string
          description: |
            Specifies the underlying legal agreement where code OTHER has been used in the AgreementCode element.

            MT Mapping: Sequence A, field 77D or field 72

            Based on datatype Max210Text: Specifies a character string with a maximum length of 210 characters.
          x-MXComponent: Max210Text
      additionalProperties: false
      description: "Specifies the type, date and version of the agreement."
      x-MXComponent: AgreementConditions2
    ClearingSystemIdentification2Choice:
      type: object
      additionalProperties: true
      description: Choice of a clearing system identifier.
      x-MXComponent: ClearingSystemIdentification2Choice
      oneOf:
      - required:
        - code
        type: object
        properties:
          code:
            maxLength: 5
            minLength: 1
            type: string
            description: |
              Identification of a clearing system, in a coded form as published in an external list.

              Specifies the clearing system identification code, as published in an external clearing system identification code list.
              External code sets can be downloaded from www.iso20022.org.
            x-MXComponent: ExternalClearingSystemIdentification1Code
        additionalProperties: false
      - required:
        - proprietary
        type: object
        properties:
          proprietary:
            maxLength: 35
            minLength: 1
            type: string
            description: |
              Identification code for a clearing system, that has not yet been identified in the list of clearing systems.

              Based on datatype Max35Text: Specifies a character string with a maximum length of 35 characters.
            x-MXComponent: Max35Text
        additionalProperties: false
    ContactInformation1:
      type: object
      properties:
        name:
          maxLength: 350
          minLength: 1
          type: string
          description: |
            Name by which a party is known and which is usually used to identify that party.

            Based on datatype Max350Text: Specifies a character string with a maximum length of 350 characters.
          x-MXComponent: Max350Text
        fax_number:
          pattern: "^\\+[0-9]{1,3}-[0-9()+\\-]{1,30}$"
          type: string
          description: |
            Collection of information that identifies a FAX number, as defined by telecom services.

            Based on datatype PhoneNumber: The collection of information which identifies a specific phone or FAX number as defined by telecom services.
            It consists of a "+" followed by the country code (from 1 to 3 characters) then a "-" and finally, any combination of numbers, "(", ")", "+" and "-" (up to 30 characters).
          x-MXComponent: PhoneNumber
        telephone_number:
          pattern: "^\\+[0-9]{1,3}-[0-9()+\\-]{1,30}$"
          type: string
          description: |
            Collection of information that identifies a phone number, as defined by telecom services.

            Based on datatype PhoneNumber: The collection of information which identifies a specific phone or FAX number as defined by telecom services.
            It consists of a "+" followed by the country code (from 1 to 3 characters) then a "-" and finally, any combination of numbers, "(", ")", "+" and "-" (up to 30 characters).
          x-MXComponent: PhoneNumber
        email_address:
          maxLength: 256
          minLength: 1
          type: string
          description: |
            Address for electronic mail (e-mail).

            Based on datatype Max256Text: Specifies a character string with a maximum length of 256 characters.
          x-MXComponent: Max256Text
      additionalProperties: false
      description: Communication device number or electronic address used for communication.
      x-MXComponent: ContactInformation1
    CurrencyOrDigitalTokenAmount3Choice:
      type: object
      additionalProperties: true
      description: Provides an amount choice between currency or digital token.
      x-MXComponent: CurrencyOrDigitalTokenAmount3Choice
      oneOf:
      - required:
        - amount
        type: object
        properties:
          amount:
            $ref: "#/components/schemas/CurrencyOrDigitalTokenAmount3Choice_amount"
        additionalProperties: false
      - required:
        - digital_token_amount
        type: object
        properties:
          digital_token_amount:
            $ref: "#/components/schemas/DigitalTokenAmount4"
        additionalProperties: false
    DateAndDateTime2Choice:
      type: object
      additionalProperties: true
      description: Choice between a date or a date and time format.
      x-MXComponent: DateAndDateTime2Choice
      oneOf:
      - required:
        - date
        type: object
        properties:
          date:
            pattern: "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)(?:Z|[+-][01]\\d:[0-5]\\d)?$"
            type: string
            description: |
              Specified date.

              Based on datatype ISODate: A particular point in the progression of time in a calendar year expressed in the YYYY-MM-DD format. This representation is defined in "XML Schema Part 2: Datatypes Second Edition - W3C Recommendation 28 October 2004" which is aligned with ISO 8601.
            x-MXComponent: ISODate
        additionalProperties: false
      - required:
        - date_time
        type: object
        properties:
          date_time:
            pattern: "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.[0-9]+)?(?:Z|[+-][01]\\d:[0-5]\\d)?$"
            type: string
            description: |
              Specified date and time.

              Based on datatype ISODateTime: A particular point in the progression of time defined by a mandatory date and a mandatory time component, expressed in either UTC time format (YYYY-MM-DDThh:mm:ss.sssZ), local time with UTC offset format (YYYY-MM-DDThh:mm:ss.sss+/-hh:mm), or local time format (YYYY-MM-DDThh:mm:ss.sss). These representations are defined in "XML Schema Part 2: Datatypes Second Edition - W3C Recommendation 28 October 2004" which is aligned with ISO 8601.
              Note on the time format:
              1) beginning / end of calendar day
              00:00:00 = the beginning of a calendar day
              24:00:00 = the end of a calendar day
              2) fractions of second in time format
              Decimal fractions of seconds may be included. In this case, the involved parties shall agree on the maximum number of digits that are allowed.
            x-MXComponent: ISODateTime
        additionalProperties: false
    DigitalTokenAmount4:
      required:
      - unit
      type: object
      properties:
        identifier:
          pattern: "^[1-9B-DF-HJ-NP-TV-XZ][0-9B-DF-HJ-NP-TV-XZ]{8,8}$"
          type: string
          description: |
            Specifies the digital token identifier (DTI).

            Based on datatype DTI2024Identifier: The Digital Token Identifier (DTI) is an 8 character code assigned to fungible digital assets which uses distributed ledger technology for its issuance, storage, exchange, record of ownership or transaction validation and is not a currency (ISO 4217) as described in ISO 24165 - DTI. A check character, using the same character set as the base number, shall be calculated and added.
          x-MXComponent: DTI2024Identifier
        unit:
          maxLength: 31
          type: string
          description: |
            Quantity of digital tokens expressed as a number, for example, a number of blockchain tokens.

            Based on datatype Max30DecimalNumber: Number of objects represented as a decimal number, for example 0.75 or 45.6 with a maximum of 30 digits and 29 fraction digits.
          x-MXComponent: Max30DecimalNumber
        description:
          maxLength: 30
          type: string
          description: |
            Provides a description of the digital token identifier.

            Based on datatype Max30Text: Specifies a character string with a maximum length of 30 characters.
          x-MXComponent: Max30Text
      additionalProperties: false
      description: Specifies the amount for a digital token identifier.
      x-MXComponent: DigitalTokenAmount4
    ForeignCurrencyOptionConfirmation2:
      required:
      - call_amount
      - counterparty_side_identification
      - exercise_style
      - expiry_date_and_time
      - final_settlement_date
      - option_bought_or_sold
      - premium
      - premium_settlement_instructions
      - put_amount
      - settlement_amount_type
      - strike_price
      - trade_date
      - trading_side_identification
      type: object
      properties:
        option_reference:
          pattern: "^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$"
          type: string
          description: "Unique technical identification of the foreign currency option as created by the server. \n\nUsage: This element should only be populated when a PUT or GET operation is undertaken. The identifier is only created after the original POST.\n\nBased on datatype UUIDv4Identifier: Universally Unique IDentifier (UUID) version 4, as described in IETC RFC 4122 \"Universally Unique IDentifier (UUID) URN Namespace\".\n"
          x-MXComponent: UUIDv4Identifier
        related_document_reference:
          maxItems: 2
          type: array
          description: |
            Reference of related documents that may have been provided as a seperate resource.

            Based on datatype UUIDv4Identifier: Universally Unique IDentifier (UUID) version 4, as described in IETC RFC 4122 "Universally Unique IDentifier (UUID) URN Namespace".
          items:
            pattern: "^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$"
            type: string
            x-MXComponent: UUIDv4Identifier
        option_bought_or_sold:
          type: string
          description: "Specifies if the option is bought or sold from the perspective of the sender.\n\nMT305 Mapping: Sequence A, field 23\n\nIndicates whether the order is to buy or sell. \n\nCode Name Definition:\n*`BUYI` - Buy - Order is buy driven.\n*`SELL` - Sell - Order is sell driven.\n"
          x-MXComponent: Side6Code
          enum:
          - BUYI
          - SELL
        exercise_style:
          type: string
          description: |
            Defines how an option can be exercised.

            MT305 Mapping: Sequence A, field 23

            Defines how an option can be exercised.

            Code Name Definition:
            *`AMER` - American - Option can be exercised before or on expiry date.
            *`EURO` - European - Option that can be exercised on expiry date only.
          x-MXComponent: OptionStyle2Code
          enum:
          - AMER
          - EURO
        trading_side_identification:
          $ref: "#/components/schemas/PartyIdentification242Choice"
        counterparty_side_identification:
          $ref: "#/components/schemas/PartyIdentification242Choice"
        trade_date:
          pattern: "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)(?:Z|[+-][01]\\d:[0-5]\\d)?$"
          type: string
          description: "Date on which the two parties agreed on the trade.\n\nMT305 Mapping: Sequence A, field 30 \n\nBased on datatype ISODate: A particular point in the progression of time in a calendar year expressed in the YYYY-MM-DD format. This representation is defined in \"XML Schema Part 2: Datatypes Second Edition - W3C Recommendation 28 October 2004\" which is aligned with ISO 8601.\n"
          x-MXComponent: ISODate
        earliest_exercise_date:
          pattern: "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)(?:Z|[+-][01]\\d:[0-5]\\d)?$"
          type: string
          description: |
            First date on which the call option or the put option can be exercised.

            Usage: This element must be present when Exercise Style element is set to AMER.

            MT305 Mapping: Sequence A, field 31C

            Based on datatype ISODate: A particular point in the progression of time in a calendar year expressed in the YYYY-MM-DD format. This representation is defined in "XML Schema Part 2: Datatypes Second Edition - W3C Recommendation 28 October 2004" which is aligned with ISO 8601.
          x-MXComponent: ISODate
        expiry_date_and_time:
          pattern: "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.[0-9]+)?(?:Z|[+-][01]\\d:[0-5]\\d)?$"
          type: string
          description: |
            Date and time on which an option expires. If it is an European option, the option holder can only exercise the right on expiry date. If it is an American option, the option holder can exercise the right up to the expiry date.

            Usage: UTC format must be used.

            MT305 Mapping: Sequence A, field 31G

            Based on datatype ISODateTime: A particular point in the progression of time defined by a mandatory date and a mandatory time component, expressed in either UTC time format (YYYY-MM-DDThh:mm:ss.sssZ), local time with UTC offset format (YYYY-MM-DDThh:mm:ss.sss+/-hh:mm), or local time format (YYYY-MM-DDThh:mm:ss.sss). These representations are defined in "XML Schema Part 2: Datatypes Second Edition - W3C Recommendation 28 October 2004" which is aligned with ISO 8601.
            Note on the time format:
            1) beginning / end of calendar day
            00:00:00 = the beginning of a calendar day
            24:00:00 = the end of a calendar day
            2) fractions of second in time format
            Decimal fractions of seconds may be included. In this case, the involved parties shall agree on the maximum number of digits that are allowed.
          x-MXComponent: ISODateTime
        final_settlement_date:
          pattern: "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)(?:Z|[+-][01]\\d:[0-5]\\d)?$"
          type: string
          description: |
            Latest value date of the foreign exchange deal in which the option may result.

            MT305 Mapping: Sequence A, field 31E

            Based on datatype ISODate: A particular point in the progression of time in a calendar year expressed in the YYYY-MM-DD format. This representation is defined in "XML Schema Part 2: Datatypes Second Edition - W3C Recommendation 28 October 2004" which is aligned with ISO 8601.
          x-MXComponent: ISODate
        settlement_amount_type:
          type: string
          description: |
            Indicates whether the trade is to be settled as principal or netted off against another trade.

            MT305 Mapping: Sequence A, field 26F

            Indicates how an option trade is settled.

            Code Name Definition:
            *`NETO` - NettedOff - Option trade is netted off against another trade.
            *`PRIN` - Principal - Option trade is settled as principal.
          x-MXComponent: SettlementType1Code
          enum:
          - NETO
          - PRIN
        non_deliverable_option_conditions:
          $ref: "#/components/schemas/ValuationConditions1"
        strike_price:
          $ref: "#/components/schemas/AgreedRate3"
        put_amount:
          $ref: "#/components/schemas/CurrencyOrDigitalTokenAmount3Choice"
        call_amount:
          $ref: "#/components/schemas/CurrencyOrDigitalTokenAmount3Choice"
        premium:
          $ref: "#/components/schemas/PremiumAmount4"
        premium_settlement_instructions:
          $ref: "#/components/schemas/StandingSettlementInstruction21Choice"
        agreement_details:
          $ref: "#/components/schemas/AgreementConditions2"
        definitions_year:
          pattern: "^[1-9]\\d{3}$"
          type: string
          description: |
            Specifies the year of definitions of the agreement.

            MT305 Mapping: Sequence A, field 14C

            Based on datatype ISOYear: Year represented by YYYY (ISO 8601).
          x-MXComponent: ISOYear
        contact_information:
          $ref: "#/components/schemas/ContactInformation1"
        additional_information:
          maxLength: 1000
          minLength: 1
          type: string
          description: |
            Specifies additional information for the Receiver and applies to the whole message.

            MT305 Mapping: Sequence A, field 72

            Based on datatype Max1000Text: Specifies a character string with a maximum length of 1000 characters.
          x-MXComponent: Max1000Text
        profit_or_loss_settlement_date:
          pattern: "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)(?:Z|[+-][01]\\d:[0-5]\\d)?$"
          type: string
          description: |
            Date on which any profit or loss arising from the close-out event will be settled.

            Based on datatype ISODate: A particular point in the progression of time in a calendar year expressed in the YYYY-MM-DD format. This representation is defined in "XML Schema Part 2: Datatypes Second Edition - W3C Recommendation 28 October 2004" which is aligned with ISO 8601.
          x-MXComponent: ISODate
        profit_or_loss:
          $ref: "#/components/schemas/ProfitAndLossAmount1"
        underlying_exposure_type:
          maxLength: 4
          minLength: 1
          type: string
          description: "Specifies the underlying exposure type.\n\nCODES: \nANTP - Anticipated\nCONT - Contractual\n \n\n\n\nBased on datatype Max4Text: Specifies a character string with a maximum length of 4 characters.\n"
          x-MXComponent: Max4Text
        underlying_liability_reference:
          maxLength: 35
          minLength: 1
          type: string
          description: |
            Related underlying liability, for example a commercial trade.

            Based on datatype Max35Text: Specifies a character string with a maximum length of 35 characters.
          x-MXComponent: Max35Text
        delta_hedge_reference:
          maxLength: 35
          minLength: 1
          type: string
          description: |
            Reference of the delta hedge.

            Based on datatype Max35Text: Specifies a character string with a maximum length of 35 characters.
          x-MXComponent: Max35Text
        pool_reference:
          maxLength: 35
          minLength: 1
          type: string
          description: |
            Reference used to link multiple legs.

            Based on datatype Max35Text: Specifies a character string with a maximum length of 35 characters.
          x-MXComponent: Max35Text
        spot_rate:
          maxLength: 12
          type: string
          description: |
            Specifies a spot rate that must be provided in some local markets.

            Based on datatype BaseOneRate: Rate expressed as a decimal, for example, 0.7 is 7/10 and 70%.
          x-MXComponent: BaseOneRate
        wash_rate:
          maxLength: 12
          type: string
          description: |
            Specifies a wash rate that must be provided in some local markets.

            Based on datatype BaseOneRate: Rate expressed as a decimal, for example, 0.7 is 7/10 and 70%.
          x-MXComponent: BaseOneRate
        mid_market_rate:
          maxLength: 12
          type: string
          description: |
            Specifies a mid-market rate that must be provided in some local markets.

            Based on datatype BaseOneRate: Rate expressed as a decimal, for example, 0.7 is 7/10 and 70%.
          x-MXComponent: BaseOneRate
        stamp_duty_paid_indicator:
          type: boolean
          description: |
            Indicates whether stamp duty has already been paid.

            YES - Stamp duty paid.
            NO - Stamp duty to be paid.

            Based on datatype YesNoIndicator: Indicates a "Yes" or "No" type of answer for an element.
          x-MXComponent: YesNoIndicator
        reporting_jurisdiction:
          maxLength: 35
          minLength: 1
          type: string
          description: |
            Specifies the supervisory party to which the trade needs to be reported.

            MT305 Mapping: Sequence B1, field 22L

            Based on datatype Max35Text: Specifies a character string with a maximum length of 35 characters.
          x-MXComponent: Max35Text
        reporting_jurisdiction_member_identification:
          maxLength: 35
          minLength: 1
          type: string
          description: |
            Specifies an identification for the sender at the supervisory party.

            Based on datatype Max35Text: Specifies a character string with a maximum length of 35 characters.
          x-MXComponent: Max35Text
        execution_timestamp:
          $ref: "#/components/schemas/DateAndDateTime2Choice"
        request_action:
          maxLength: 4
          minLength: 1
          type: string
          description: "Specifies the action requested as part of the PUT operation.\n\nCODES: \nAMND - Amendment\nCANC - Cancellation\n\nUsage: This element should only be populated when a PUT operation is undertaken.\n \n\n\n\nBased on datatype Max4Text: Specifies a character string with a maximum length of 4 characters.\n"
          x-MXComponent: Max4Text
      additionalProperties: false
      description: Foreign currency option confirmation.
      x-MXComponent: ForeignCurrencyOptionConfirmation2
    ForeignExchangeConfirmation2:
      required:
      - buy_amount
      - counterparty_side_identification
      - counterparty_side_settlement_instructions
      - exchange_rate
      - sell_amount
      - settlement_date
      - trade_date
      - trading_side_identification
      - trading_side_settlement_instructions
      type: object
      properties:
        confirmation_reference:
          pattern: "^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$"
          type: string
          description: "Unique technical identification of the foreign exchange confirmation as created by the server. \n\nUsage: This element should only be populated when a PUT or GET operation is undertaken. The identifier is only created after the original POST.\n\nBased on datatype UUIDv4Identifier: Universally Unique IDentifier (UUID) version 4, as described in IETC RFC 4122 \"Universally Unique IDentifier (UUID) URN Namespace\".\n"
          x-MXComponent: UUIDv4Identifier
        related_trade_reference:
          $ref: "#/components/schemas/RelatedTradeReference1Choice"
        related_document_reference:
          maxItems: 2
          type: array
          description: |
            Reference of related documents that may have been provided as a seperate resource.

            Based on datatype UUIDv4Identifier: Universally Unique IDentifier (UUID) version 4, as described in IETC RFC 4122 "Universally Unique IDentifier (UUID) URN Namespace".
          items:
            pattern: "^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$"
            type: string
            x-MXComponent: UUIDv4Identifier
        trading_side_identification:
          $ref: "#/components/schemas/PartyIdentification242Choice"
        counterparty_side_identification:
          $ref: "#/components/schemas/PartyIdentification242Choice"
        agreement_details:
          $ref: "#/components/schemas/AgreementConditions2"
        definitions_year:
          pattern: "^[1-9]\\d{3}$"
          type: string
          description: |
            Specifies the year of definitions of the agreement.

            MT300 Mapping: Sequence A, field 14C

            Based on datatype ISOYear: Year represented by YYYY (ISO 8601).
          x-MXComponent: ISOYear
        non_deliverable_forward_conditions:
          $ref: "#/components/schemas/NonDeliverableForwardConditions3"
        trade_date:
          pattern: "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)(?:Z|[+-][01]\\d:[0-5]\\d)?$"
          type: string
          description: "Date on which the two parties agreed on the trade.\n\nMT300 Mapping: Sequence B, field 30T \n\nBased on datatype ISODate: A particular point in the progression of time in a calendar year expressed in the YYYY-MM-DD format. This representation is defined in \"XML Schema Part 2: Datatypes Second Edition - W3C Recommendation 28 October 2004\" which is aligned with ISO 8601.\n"
          x-MXComponent: ISODate
        settlement_date:
          pattern: "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)(?:Z|[+-][01]\\d:[0-5]\\d)?$"
          type: string
          description: |
            Date on which the trade is settled, for example, the amounts are due.

            MT300 Mapping: Sequence B, field 30V



            Based on datatype ISODate: A particular point in the progression of time in a calendar year expressed in the YYYY-MM-DD format. This representation is defined in "XML Schema Part 2: Datatypes Second Edition - W3C Recommendation 28 October 2004" which is aligned with ISO 8601.
          x-MXComponent: ISODate
        exchange_rate:
          $ref: "#/components/schemas/AgreedRate3"
        buy_amount:
          $ref: "#/components/schemas/CurrencyOrDigitalTokenAmount3Choice"
        sell_amount:
          $ref: "#/components/schemas/CurrencyOrDigitalTokenAmount3Choice"
        trading_side_settlement_instructions:
          $ref: "#/components/schemas/StandingSettlementInstruction20Choice"
        counterparty_side_settlement_instructions:
          $ref: "#/components/schemas/StandingSettlementInstruction20Choice"
        contact_information:
          $ref: "#/components/schemas/ContactInformation1"
        additional_information:
          maxLength: 1000
          minLength: 1
          type: string
          description: |
            Specifies additional information for the Receiver and applies to the whole message.

            MT300 Mapping: Sequence E, field 77a

            Based on datatype Max1000Text: Specifies a character string with a maximum length of 1000 characters.
          x-MXComponent: Max1000Text
        post_trade_event_type:
          $ref: "#/components/schemas/PostTradeEventType1Choice"
        underlying_liability_reference:
          maxLength: 35
          minLength: 1
          type: string
          description: |
            Related underlying liability, for example a commercial trade.

            MT300 Mapping: Sequence F, field 21F

            Based on datatype Max35Text: Specifies a character string with a maximum length of 35 characters.
          x-MXComponent: Max35Text
        profit_or_loss_settlement_date:
          pattern: "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)(?:Z|[+-][01]\\d:[0-5]\\d)?$"
          type: string
          description: |
            Date on which any profit or loss arising from the post-trade event will be settled.

            MT300 Mapping: Sequence F, field 30F

            Based on datatype ISODate: A particular point in the progression of time in a calendar year expressed in the YYYY-MM-DD format. This representation is defined in "XML Schema Part 2: Datatypes Second Edition - W3C Recommendation 28 October 2004" which is aligned with ISO 8601.
          x-MXComponent: ISODate
        profit_or_loss:
          $ref: "#/components/schemas/ProfitAndLossAmount1"
        outstanding_settlement_amount:
          $ref: "#/components/schemas/ForeignExchangeConfirmation2_outstanding_settlement_amount"
        underlying_exposure_type:
          maxLength: 4
          minLength: 1
          type: string
          description: "Specifies the underlying exposure type.\n\nCODES: \nANTP - Anticipated\nCONT - Contractual\n \n\n\n\nBased on datatype Max4Text: Specifies a character string with a maximum length of 4 characters.\n"
          x-MXComponent: Max4Text
        stamp_duty_certificate_reference:
          maxLength: 35
          minLength: 1
          type: string
          description: |
            Reference of the stamp duty certificate.

            Based on datatype Max35Text: Specifies a character string with a maximum length of 35 characters.
          x-MXComponent: Max35Text
        stamp_duty_settlement_date:
          pattern: "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)(?:Z|[+-][01]\\d:[0-5]\\d)?$"
          type: string
          description: |
            Date on which stamp duty will be settled.

            Based on datatype ISODate: A particular point in the progression of time in a calendar year expressed in the YYYY-MM-DD format. This representation is defined in "XML Schema Part 2: Datatypes Second Edition - W3C Recommendation 28 October 2004" which is aligned with ISO 8601.
          x-MXComponent: ISODate
        stamp_duty_amount:
          $ref: "#/components/schemas/ForeignExchangeConfirmation2_stamp_duty_amount"
        option_exercise_indicator:
          type: boolean
          description: |
            Indicates whether the foreign exchange is as a result of an exercised option.

            YES - Option has been exercised.
            NO - Foreign exchange is unrelated to an option.

            Based on datatype YesNoIndicator: Indicates a "Yes" or "No" type of answer for an element.
          x-MXComponent: YesNoIndicator
        spot_rate:
          maxLength: 12
          type: string
          description: |
            Specifies a spot rate that must be provided in some local markets.

            Based on datatype BaseOneRate: Rate expressed as a decimal, for example, 0.7 is 7/10 and 70%.
          x-MXComponent: BaseOneRate
        wash_rate:
          maxLength: 12
          type: string
          description: |
            Specifies a wash rate that must be provided in some local markets.

            Based on datatype BaseOneRate: Rate expressed as a decimal, for example, 0.7 is 7/10 and 70%.
          x-MXComponent: BaseOneRate
        outstanding_settlement_amount_base:
          $ref: "#/components/schemas/ForeignExchangeConfirmation2_outstanding_settlement_amount_base"
        clause_information:
          maxLength: 210
          minLength: 1
          type: string
          description: |
            Additional clauses outlined by the sender.

            Based on datatype Max210Text: Specifies a character string with a maximum length of 210 characters.
          x-MXComponent: Max210Text
        reporting_jurisdiction:
          maxLength: 35
          minLength: 1
          type: string
          description: |
            Specifies the supervisory party to which the trade needs to be reported.

            MT300 Mapping: Sequence B1, field 22L

            Based on datatype Max35Text: Specifies a character string with a maximum length of 35 characters.
          x-MXComponent: Max35Text
        reporting_jurisdiction_member_identification:
          maxLength: 35
          minLength: 1
          type: string
          description: |
            Specifies an identification for the sender at the supervisory party.

            Based on datatype Max35Text: Specifies a character string with a maximum length of 35 characters.
          x-MXComponent: Max35Text
        execution_timestamp:
          $ref: "#/components/schemas/DateAndDateTime2Choice"
        request_action:
          maxLength: 4
          minLength: 1
          type: string
          description: "Specifies the action requested as part of the PUT operation.\n\nCODES: \nAMND - Amendment\nCANC - Cancellation\n\nUsage: This element should only be populated when a PUT operation is undertaken.\n \n\n\n\nBased on datatype Max4Text: Specifies a character string with a maximum length of 4 characters.\n"
          x-MXComponent: Max4Text
      additionalProperties: false
      description: Foreign exchange confirmation.
      x-MXComponent: ForeignExchangeConfirmation2
    NDFOpeningFixing2Choice:
      type: object
      additionalProperties: true
      description: Choice of providing the opening conditions or fixing conditions for an NDF instruction.
      x-MXComponent: NDFOpeningFixing2Choice
      oneOf:
      - required:
        - opening_conditions
        type: object
        properties:
          opening_conditions:
            $ref: "#/components/schemas/OpeningConditions2"
        additionalProperties: false
      - required:
        - opening_confirmation_reference
        type: object
        properties:
          opening_confirmation_reference:
            maxLength: 35
            minLength: 1
            type: string
            description: |
              Reference of the opening confirmation provided on an NDF fixing instruction to link back to the original NDF opening confirmation.

              MT300 Mapping: Sequence A, field 21A

              Based on datatype Max35Text: Specifies a character string with a maximum length of 35 characters.
            x-MXComponent: Max35Text
        additionalProperties: false
    NameAndAddress8:
      required:
      - name
      type: object
      properties:
        name:
          maxLength: 350
          minLength: 1
          type: string
          description: |
            Name by which a party is known and which is usually used to identify that party.

            Based on datatype Max350Text: Specifies a character string with a maximum length of 350 characters.
          x-MXComponent: Max350Text
        address:
          $ref: "#/components/schemas/PostalAddress1"
        alternative_identifier:
          maxItems: 10
          type: array
          description: |
            Unique and unambiguous identifier, as assigned to a financial institution using a proprietary identification scheme.

            Based on datatype Max35Text: Specifies a character string with a maximum length of 35 characters.
          items:
            maxLength: 35
            minLength: 1
            type: string
            x-MXComponent: Max35Text
      additionalProperties: false
      description: Information that locates and identifies a party.
      x-MXComponent: NameAndAddress8
    NonDeliverableForwardConditions3:
      required:
      - opening_fixing_conditions
      - opening_indicator
      type: object
      properties:
        opening_indicator:
          type: boolean
          description: |
            Specifies whether the instruction is an NDF opening or fixing.

            Yes: Opening
            No: Fixing

            MT300 Mapping: Sequence A, field 17O



            Based on datatype YesNoIndicator: Indicates a "Yes" or "No" type of answer for an element.
          x-MXComponent: YesNoIndicator
        opening_fixing_conditions:
          $ref: "#/components/schemas/NDFOpeningFixing2Choice"
      additionalProperties: false
      description: Specifies the opening and valuation conditions for the non deliverable forward.
      x-MXComponent: NonDeliverableForwardConditions3
    OpeningConditions2:
      required:
      - settlement_currency
      - settlement_rate_source
      - valuation_date
      type: object
      properties:
        settlement_currency:
          pattern: "^[A-Z]{3,3}$"
          type: string
          description: |
            Specifies the settlement currency of the non deliverable trade.

            MT300 Mapping: Sequence A, field 32E

            A code allocated to a currency by a Maintenance Agency under an international identification scheme as described in the latest edition of the international standard ISO 4217 "Codes for the representation of currencies and funds".
          x-MXComponent: ActiveCurrencyCode
        valuation_date:
          pattern: "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)(?:Z|[+-][01]\\d:[0-5]\\d)?$"
          type: string
          description: |
            Specifies the valuation date for a non deliverable trade.

            MT300 Mapping: Sequence A, field 30U

            Based on datatype ISODate: A particular point in the progression of time in a calendar year expressed in the YYYY-MM-DD format. This representation is defined in "XML Schema Part 2: Datatypes Second Edition - W3C Recommendation 28 October 2004" which is aligned with ISO 8601.
          x-MXComponent: ISODate
        settlement_rate_source:
          maxItems: 2
          type: array
          description: |
            Specifies the rate source associated with the non deliverable trade.

            MT300 Mapping: Sequence A, field 14S
          items:
            $ref: "#/components/schemas/SettlementRateSource1"
      additionalProperties: false
      description: Specifies the conditions for the NDF opening.
      x-MXComponent: OpeningConditions2
    PartyIdentification242Choice:
      type: object
      additionalProperties: true
      description: "Choice between a BIC, name and address or a LEI to identify a party."
      x-MXComponent: PartyIdentification242Choice
      oneOf:
      - required:
        - name_and_address
        type: object
        properties:
          name_and_address:
            $ref: "#/components/schemas/NameAndAddress8"
        additionalProperties: false
      - required:
        - any_bic
        type: object
        properties:
          any_bic:
            $ref: "#/components/schemas/PartyIdentification265"
        additionalProperties: false
      - required:
        - party_identification
        type: object
        properties:
          party_identification:
            $ref: "#/components/schemas/PartyIdentification266"
        additionalProperties: false
    PartyIdentification265:
      required:
      - any_bic
      type: object
      properties:
        any_bic:
          pattern: "^[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}$"
          type: string
          description: |
            Code allocated to a financial or non-financial institution by the ISO 9362 Registration Authority, as described in ISO 9362 "Banking - Banking telecommunication messages - Business identifier code (BIC)".

            Based on datatype AnyBICDec2014Identifier: Code allocated to a financial or non-financial institution by the ISO 9362 Registration Authority, as described in ISO 9362: 2014 - "Banking - Banking telecommunication messages - Business identifier code (BIC)".
          x-MXComponent: AnyBICDec2014Identifier
        alternative_identifier:
          maxItems: 10
          type: array
          description: |
            Unique and unambiguous identifier, as assigned to a financial institution using a proprietary identification scheme.

            Based on datatype Max35Text: Specifies a character string with a maximum length of 35 characters.
          items:
            maxLength: 35
            minLength: 1
            type: string
            x-MXComponent: Max35Text
      additionalProperties: false
      description: Unique and unambiguous way to identify an organisation.
      x-MXComponent: PartyIdentification265
    PartyIdentification266:
      type: object
      properties:
        party_name:
          maxLength: 34
          minLength: 1
          type: string
          description: |
            Identification of the party expressed as the party's name.

            Based on datatype Max34Text: Specifies a character string with a maximum length of 34 characters.
          x-MXComponent: Max34Text
        any_bic:
          $ref: "#/components/schemas/PartyIdentification265"
        account_number:
          maxLength: 34
          minLength: 1
          type: string
          description: |
            Provides the party's account number.

            Based on datatype Max34Text: Specifies a character string with a maximum length of 34 characters.
          x-MXComponent: Max34Text
        address:
          maxLength: 105
          minLength: 1
          type: string
          description: |
            Provides the party's address.

            Based on datatype Max105Text: Specifies a character string with a maximum length of 105 characters.
          x-MXComponent: Max105Text
        clearing_system_identification:
          $ref: "#/components/schemas/ClearingSystemIdentification2Choice"
        legal_entity_identifier:
          pattern: "^[A-Z0-9]{18,18}[0-9]{2,2}$"
          type: string
          description: |
            Provides the Legal Entity Identifier. This is a code allocated to a party as described in ISO 17442 "Financial Services - Legal Entity Identifier (LEI)".

            Based on datatype LEIIdentifier: Legal Entity Identifier is a code allocated to a party as described in ISO 17442 "Financial Services - Legal Entity Identifier (LEI)".
          x-MXComponent: LEIIdentifier
      additionalProperties: false
      description: "Identification of a party. The party can be identified by providing the party's name and optionally, the BIC, account number, address, clearing system identification or LEI can also be provided."
      x-MXComponent: PartyIdentification266
    PostTradeEventType1Choice:
      type: object
      additionalProperties: true
      description: Specifies the post trade event type.
      x-MXComponent: PostTradeEventType1Choice
      oneOf:
      - required:
        - code
        type: object
        properties:
          code:
            maxLength: 4
            minLength: 1
            type: string
            description: "Specifies the post trade event type, as published in an external post trade event code set.\n\nCODES:\t\nEAMT - Early delivery - The trade will be settled early.\nPEAM - Partial early delivery - The trade will be partially settled early.\nPRUR - Partial unwind rollover - Part of the trade will be settled on its original date and the remainder will rollover.\nPRUW - Partial unwind - Part of the trade will not be settled.\nROLL - Rollover - This is a rollover of a previous trade.\nUNWD - Unwind - The trade will not be settled.\nUNWR - Unwind rollover - The original trade will not settle on its original date, but will be rolled over.\n\nMT300 Mapping: Sequence F, field 21H\n\nSpecifies the type of post trade event, as published in an external post trade event type code set.\nExternal code sets can be downloaded from www.iso20022.org.\n"
            x-MXComponent: ExternalPostTradeEventType1Code
        additionalProperties: false
      - required:
        - proprietary
        type: object
        properties:
          proprietary:
            maxLength: 35
            minLength: 1
            type: string
            description: |
              Specifies the post trade event type, in a free-text form.

              Based on datatype Max35Text: Specifies a character string with a maximum length of 35 characters.
            x-MXComponent: Max35Text
        additionalProperties: false
    PostalAddress1:
      required:
      - country
      type: object
      properties:
        address_type:
          type: string
          description: |
            Identifies the nature of the postal address.

            Specifies the type of address.

            Code Name Definition:
            *`ADDR` - Postal - Address is the complete postal address.
            *`BIZZ` - Business - Address is the business address.
            *`DLVY` - DeliveryTo - Address is the address to which delivery is to take place.
            *`HOME` - Residential - Address is the home address.
            *`MLTO` - MailTo - Address is the address to which mail is sent.
            *`PBOX` - POBox - Address is a postal office (PO) box.
          x-MXComponent: AddressType2Code
          enum:
          - ADDR
          - BIZZ
          - DLVY
          - HOME
          - MLTO
          - PBOX
        address_line:
          maxItems: 5
          type: array
          description: |
            Information that locates and identifies a specific address, as defined by postal services, that is presented in free format text.

            Based on datatype Max70Text: Specifies a character string with a maximum length of 70characters.
          items:
            maxLength: 70
            minLength: 1
            type: string
            x-MXComponent: Max70Text
        street_name:
          maxLength: 70
          minLength: 1
          type: string
          description: |
            Name of a street or thoroughfare.

            Based on datatype Max70Text: Specifies a character string with a maximum length of 70characters.
          x-MXComponent: Max70Text
        building_number:
          maxLength: 16
          minLength: 1
          type: string
          description: |
            Number that identifies the position of a building on a street.

            Based on datatype Max16Text: Specifies a character string with a maximum length of 16 characters.
          x-MXComponent: Max16Text
        post_code:
          maxLength: 16
          minLength: 1
          type: string
          description: |
            Identifier consisting of a group of letters and/or numbers that is added to a postal address to assist the sorting of mail.

            Based on datatype Max16Text: Specifies a character string with a maximum length of 16 characters.
          x-MXComponent: Max16Text
        town_name:
          maxLength: 35
          minLength: 1
          type: string
          description: |
            Name of a built-up area, with defined boundaries, and a local government.

            Based on datatype Max35Text: Specifies a character string with a maximum length of 35 characters.
          x-MXComponent: Max35Text
        country_sub_division:
          maxLength: 35
          minLength: 1
          type: string
          description: |
            Identifies a subdivision of a country for example, state, region, county.

            Based on datatype Max35Text: Specifies a character string with a maximum length of 35 characters.
          x-MXComponent: Max35Text
        country:
          pattern: "^[A-Z]{2,2}$"
          type: string
          description: |
            Nation with its own government.

            Code to identify a country, a dependency, or another area of particular geopolitical interest, on the basis of country names obtained from the United Nations (ISO 3166, Alpha-2 code).
          x-MXComponent: CountryCode
      additionalProperties: false
      description: "Information that locates and identifies a specific address, as defined by postal services."
      x-MXComponent: PostalAddress1
    PremiumAmount4:
      required:
      - amount
      - premium_currency
      - premium_quote
      - premium_settlement_date
      type: object
      properties:
        premium_quote:
          $ref: "#/components/schemas/PremiumQuote1Choice"
        premium_currency:
          pattern: "^[A-Z]{3,3}$"
          type: string
          description: "Identification of the premium currency in which the option is held. \n\nMT305 Mapping: Sequence A, field 37K\n\nA code allocated to a currency by a Maintenance Agency under an international identification scheme, as described in the latest edition of the international standard ISO 4217 \"Codes for the representation of currencies and funds\".\n"
          x-MXComponent: ActiveOrHistoricCurrencyCode
        amount:
          $ref: "#/components/schemas/PremiumAmount4_amount"
        decimal_places:
          maxLength: 19
          type: string
          description: |
            Number of decimal places to which quantities of units/shares are rounded.

            Based on datatype Number: Number of objects represented as an integer.
          x-MXComponent: Number
        premium_settlement_date:
          pattern: "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)(?:Z|[+-][01]\\d:[0-5]\\d)?$"
          type: string
          description: |
            Date on which the premium must be settled.

            MT305 Mapping: Sequence A, field 34a

            Based on datatype ISODate: A particular point in the progression of time in a calendar year expressed in the YYYY-MM-DD format. This representation is defined in "XML Schema Part 2: Datatypes Second Edition - W3C Recommendation 28 October 2004" which is aligned with ISO 8601.
          x-MXComponent: ISODate
        payer_party_reference:
          maxLength: 35
          minLength: 1
          type: string
          description: |
            Premium fee payer related information.

            Based on datatype Max35Text: Specifies a character string with a maximum length of 35 characters.
          x-MXComponent: Max35Text
        receiver_party_reference:
          maxLength: 35
          minLength: 1
          type: string
          description: |
            Premium fee receiver related information.

            Based on datatype Max35Text: Specifies a character string with a maximum length of 35 characters.
          x-MXComponent: Max35Text
      additionalProperties: false
      description: "Commercial agreement in which the buyer agrees to pay the seller an amount of cash. Some aspects of the payment may be defined in the agreement, for example, the method of the payment."
      x-MXComponent: PremiumAmount4
    PremiumQuote1Choice:
      type: object
      additionalProperties: true
      description: Specifies the amount of a premium on a currency option together with its calculation method.
      x-MXComponent: PremiumQuote1Choice
      oneOf:
      - required:
        - percentage_of_call_amount
        type: object
        properties:
          percentage_of_call_amount:
            maxLength: 12
            type: string
            description: |
              Premium calculation is based on a percentage of the call amount.

              Based on datatype PercentageRate: Rate expressed as a percentage, that is, in hundredths, for example, 0.7 is 7/10 of a percent, and 7.0 is 7%.
            x-MXComponent: PercentageRate
        additionalProperties: false
      - required:
        - percentage_of_put_amount
        type: object
        properties:
          percentage_of_put_amount:
            maxLength: 12
            type: string
            description: |
              Premium calculation is based on a percentage of the put amount.

              Based on datatype PercentageRate: Rate expressed as a percentage, that is, in hundredths, for example, 0.7 is 7/10 of a percent, and 7.0 is 7%.
            x-MXComponent: PercentageRate
        additionalProperties: false
      - required:
        - points_of_call_amount
        type: object
        properties:
          points_of_call_amount:
            maxLength: 12
            type: string
            description: |
              Premium calculation is based on points of the call amount.

              Based on datatype BaseOneRate: Rate expressed as a decimal, for example, 0.7 is 7/10 and 70%.
            x-MXComponent: BaseOneRate
        additionalProperties: false
      - required:
        - points_of_put_amount
        type: object
        properties:
          points_of_put_amount:
            maxLength: 12
            type: string
            description: |
              Premium calculation is based on points of the put amount.

              Based on datatype BaseOneRate: Rate expressed as a decimal, for example, 0.7 is 7/10 and 70%.
            x-MXComponent: BaseOneRate
        additionalProperties: false
    ProfitAndLossAmount1:
      required:
      - amount
      - sign
      type: object
      properties:
        sign:
          type: boolean
          description: |
            Indicates that the value is positive or negative.

            Based on datatype PlusOrMinusIndicator: Indicates a positive or negative value.
          x-MXComponent: PlusOrMinusIndicator
        amount:
          $ref: "#/components/schemas/ProfitAndLossAmount1_amount"
      additionalProperties: false
      description: Profit and loss amount.
      x-MXComponent: ProfitAndLossAmount1
    RelatedTradeReference1Choice:
      type: object
      additionalProperties: true
      description: "Reference of the related trade, such as an option or swap."
      x-MXComponent: RelatedTradeReference1Choice
      oneOf:
      - required:
        - uuid
        type: object
        properties:
          uuid:
            pattern: "^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$"
            type: string
            description: |
              Related trade reference in UUID format.

              Based on datatype UUIDv4Identifier: Universally Unique IDentifier (UUID) version 4, as described in IETC RFC 4122 "Universally Unique IDentifier (UUID) URN Namespace".
            x-MXComponent: UUIDv4Identifier
        additionalProperties: false
      - required:
        - text
        type: object
        properties:
          text:
            maxLength: 35
            minLength: 1
            type: string
            description: |
              Related trade reference in text format.

              Based on datatype Max35Text: Specifies a character string with a maximum length of 35 characters.
            x-MXComponent: Max35Text
        additionalProperties: false
    SettlementRateSource1:
      required:
      - rate_source
      type: object
      properties:
        rate_source:
          pattern: "^[a-zA-Z]{3}[0-9]{1,2}$"
          type: string
          description: |
            Specifies the rate source for the non deliverable trade.

            Based on datatype RateSourceText: Specifies a rate source.

            The values to be used for the settlement rate source are published in Annex A of the 1998 FX and Currency
            Option Definitions (the FX definitions, as published by the International Swaps and Derivatives Association,
            Inc., the Emerging Markets Traders Association and the Foreign Exchange Committee) as amended and
            supplemented from time to time.
          x-MXComponent: RateSourceText
        time:
          pattern: "^[0-9]{4}$"
          type: string
          description: |
            Specifies the time "HHMM" associated with the rate source.

            Based on datatype Exact4NumericText: Specifies a numeric string with an exact length of 4 digits.
          x-MXComponent: Exact4NumericText
        country_code:
          pattern: "^[A-Z]{2,2}$"
          type: string
          description: |
            Specifies the country code for the quoted rate source.

            Code to identify a country, a dependency, or another area of particular geopolitical interest, on the basis of country names obtained from the United Nations (ISO 3166, Alpha-2 code).
          x-MXComponent: CountryCode
        location_code:
          pattern: "^[a-zA-Z0-9]{2}$"
          type: string
          description: |
            The location expressed as a 2 character code.

            Based on datatype Exact2AlphaNumericText: Specifies an alphanumeric string with an exact length of 2 characters.
          x-MXComponent: Exact2AlphaNumericText
      additionalProperties: false
      description: Specifies the components of a settlement rate source for a non delvierable trade.
      x-MXComponent: SettlementRateSource1
    StandingSettlementInstruction20Choice:
      type: object
      additionalProperties: true
      description: Standing settlement instruction identified as an agent or a code where there is none.
      x-MXComponent: StandingSettlementInstruction20Choice
      oneOf:
      - required:
        - standing_settlement_instruction
        type: object
        properties:
          standing_settlement_instruction:
            maxItems: 4
            type: array
            description: Standing settlement instruction expressed as an agent.
            items:
              $ref: "#/components/schemas/AgentIdentification1"
        additionalProperties: false
      - required:
        - no_standing_settlement_instruction
        type: object
        properties:
          no_standing_settlement_instruction:
            maxLength: 8
            minLength: 1
            type: string
            description: "Reason for no standing settlement instruction this expressed as a code.\n\nCODES:\t\nNOSICLRD - The trade will be cleared through a CCP.\nNOSINDFS - The currency is the non-settled leg of an NDF or other cash-settled trade.\nNOSINETS - Payment flows are netted based on a bilateral or other agreement.\nNOSINONE - The trade will not be settled.\nNOSISSIS - Standing settlement instructions are to be used.\nNOSIUKWN - Settlement details are unknown.\n\nBased on datatype Max8Text: Specifies a character string with a maximum length of 8 characters.\n"
            x-MXComponent: Max8Text
        additionalProperties: false
    StandingSettlementInstruction21Choice:
      type: object
      additionalProperties: true
      description: Standing settlement instruction identified as an agent or a code where there is none.
      x-MXComponent: StandingSettlementInstruction21Choice
      oneOf:
      - required:
        - standing_settlement_instruction
        type: object
        properties:
          standing_settlement_instruction:
            maxItems: 4
            type: array
            description: Standing settlement instruction expressed as an agent.
            items:
              $ref: "#/components/schemas/AgentIdentification1"
        additionalProperties: false
      - required:
        - no_standing_settlement_instruction
        type: object
        properties:
          no_standing_settlement_instruction:
            maxLength: 8
            minLength: 1
            type: string
            description: "Reason for no standing settlement instruction this expressed as a code.\n\nCODES:\t\nNOSICLRD - The trade will be cleared through a CCP.\nNOSINETS - Payment flows are netted based on a bilateral or other agreement.\nNOSINONE - The trade will not be settled.\nNOSISSIS - Standing settlement instructions are to be used.\nNOSIUKWN - Settlement details are unknown.\n\nBased on datatype Max8Text: Specifies a character string with a maximum length of 8 characters.\n"
            x-MXComponent: Max8Text
        additionalProperties: false
    ValuationConditions1:
      required:
      - settlement_currency
      - settlement_rate_source
      type: object
      properties:
        settlement_currency:
          pattern: "^[A-Z]{3,3}$"
          type: string
          description: |
            Specifies the settlement currency of the non deliverable trade.

            MT305 Mapping: Sequence A, field 32E

            A code allocated to a currency by a Maintenance Agency under an international identification scheme as described in the latest edition of the international standard ISO 4217 "Codes for the representation of currencies and funds".
          x-MXComponent: ActiveCurrencyCode
        settlement_rate_source:
          maxItems: 2
          type: array
          description: |
            Specifies the rate source associated with the non deliverable trade.

            MT305 Mapping: Sequence A, field 14S
          items:
            $ref: "#/components/schemas/SettlementRateSource1"
      additionalProperties: false
      description: Specifies the conditions for the non deliverable option.
      x-MXComponent: ValuationConditions1
    ErrorMessage:
      required:
      - code
      - severity
      - text
      type: object
      properties:
        severity:
          type: string
          description: "The category of error.\n  * Fatal means the failure is permanent and the request should not be retried.\n  * Transient means the failure is temporary and the request can be retried after a suitable interval.\n  * Logic is a legacy code and should not be used. \n"
          enum:
          - Fatal
          - Transient
          - Logic
        code:
          maxLength: 50
          type: string
          description: A unique string which should identify the error and the system or service where it originated.
        text:
          maxLength: 1000
          type: string
          description: free-text field which should describe the problem and any recovery or remediation steps which can be taken.
        user_message:
          maxLength: 100
          type: string
          description: A message to display to an active user if there is one.
        more_info:
          type: string
          description: "A URL pointing to a resource which contains further information about the error, if one exists."
          format: uri
      additionalProperties: false
    CurrencyOrDigitalTokenAmount3Choice_amount:
      required:
      - amount
      - currency
      type: object
      properties:
        currency:
          pattern: "^[A-Z]{3,3}$"
          type: string
          x-MXComponent: ActiveOrHistoricCurrencyCode
        amount:
          maxLength: 19
          pattern: "^0*(([0-9]{0,13}\\.[0-9]{1,5})|([0-9]{0,14}\\.[0-9]{1,4})|([0-9]{0,15}\\.[0-9]{1,3})|([0-9]{0,16}\\.[0-9]{1,2})|([0-9]{0,17}\\.[0-9]{1,1})|([0-9]{0,18}\\.)|0*|([0-9]{0,18}))$"
          type: string
      additionalProperties: false
      description: |
        Amount specified as an ISO currency (ISO 4217).

        Based on datatype ActiveOrHistoricCurrencyAndAmount: A number of monetary units specified in an active or a historic currency where the unit of currency is explicit and compliant with ISO 4217.
    ForeignExchangeConfirmation2_outstanding_settlement_amount:
      required:
      - amount
      - currency
      type: object
      properties:
        currency:
          pattern: "^[A-Z]{3,3}$"
          type: string
          x-MXComponent: ActiveOrHistoricCurrencyCode
        amount:
          maxLength: 19
          pattern: "^0*(([0-9]{0,13}\\.[0-9]{1,5})|([0-9]{0,14}\\.[0-9]{1,4})|([0-9]{0,15}\\.[0-9]{1,3})|([0-9]{0,16}\\.[0-9]{1,2})|([0-9]{0,17}\\.[0-9]{1,1})|([0-9]{0,18}\\.)|0*|([0-9]{0,18}))$"
          type: string
      additionalProperties: false
      description: |
        Amount that remains to be settled, in the specified currency if a trade is partially delivered early or partially unwound.

        MT300 Mapping: Sequence F, field 33E

        Based on datatype ActiveOrHistoricCurrencyAndAmount: A number of monetary units specified in an active or a historic currency where the unit of currency is explicit and compliant with ISO 4217.
    ForeignExchangeConfirmation2_stamp_duty_amount:
      required:
      - amount
      - currency
      type: object
      properties:
        currency:
          pattern: "^[A-Z]{3,3}$"
          type: string
          x-MXComponent: ActiveCurrencyCode
        amount:
          maxLength: 19
          pattern: "^0*(([0-9]{0,13}\\.[0-9]{1,5})|([0-9]{0,14}\\.[0-9]{1,4})|([0-9]{0,15}\\.[0-9]{1,3})|([0-9]{0,16}\\.[0-9]{1,2})|([0-9]{0,17}\\.[0-9]{1,1})|([0-9]{0,18}\\.)|0*|([0-9]{0,18}))$"
          type: string
      additionalProperties: false
      description: |
        Amount of stamp duty.

        Based on datatype ActiveCurrencyAndAmount: A number of monetary units specified in an active currency where the unit of currency is explicit and compliant with ISO 4217.
    ForeignExchangeConfirmation2_outstanding_settlement_amount_base:
      required:
      - amount
      - currency
      type: object
      properties:
        currency:
          pattern: "^[A-Z]{3,3}$"
          type: string
          x-MXComponent: ActiveOrHistoricCurrencyCode
        amount:
          maxLength: 19
          pattern: "^0*(([0-9]{0,13}\\.[0-9]{1,5})|([0-9]{0,14}\\.[0-9]{1,4})|([0-9]{0,15}\\.[0-9]{1,3})|([0-9]{0,16}\\.[0-9]{1,2})|([0-9]{0,17}\\.[0-9]{1,1})|([0-9]{0,18}\\.)|0*|([0-9]{0,18}))$"
          type: string
      additionalProperties: false
      description: |
        Amount that remains to be settled, in the base currency if a trade is partially delivered early or partially unwound.

        Based on datatype ActiveOrHistoricCurrencyAndAmount: A number of monetary units specified in an active or a historic currency where the unit of currency is explicit and compliant with ISO 4217.
    PremiumAmount4_amount:
      required:
      - amount
      - currency
      type: object
      properties:
        currency:
          pattern: "^[A-Z]{3,3}$"
          type: string
          x-MXComponent: ActiveCurrencyCode
        amount:
          maxLength: 19
          pattern: "^0*(([0-9]{0,13}\\.[0-9]{1,5})|([0-9]{0,14}\\.[0-9]{1,4})|([0-9]{0,15}\\.[0-9]{1,3})|([0-9]{0,16}\\.[0-9]{1,2})|([0-9]{0,17}\\.[0-9]{1,1})|([0-9]{0,18}\\.)|0*|([0-9]{0,18}))$"
          type: string
      additionalProperties: false
      description: |
        Result of the calculation of the premium amount on the basis of the premium quote and one of the amounts of the underlying foreign exchange trade.

        MT305 Mapping: Sequence A, field 34a

        Based on datatype ActiveCurrencyAndAmount: A number of monetary units specified in an active currency where the unit of currency is explicit and compliant with ISO 4217.
    ProfitAndLossAmount1_amount:
      required:
      - amount
      - currency
      type: object
      properties:
        currency:
          pattern: "^[A-Z]{3,3}$"
          type: string
          x-MXComponent: ActiveCurrencyCode
        amount:
          maxLength: 19
          pattern: "^0*(([0-9]{0,13}\\.[0-9]{1,5})|([0-9]{0,14}\\.[0-9]{1,4})|([0-9]{0,15}\\.[0-9]{1,3})|([0-9]{0,16}\\.[0-9]{1,2})|([0-9]{0,17}\\.[0-9]{1,1})|([0-9]{0,18}\\.)|0*|([0-9]{0,18}))$"
          type: string
      additionalProperties: false
      description: |
        Amount of profit or loss.

        Based on datatype ActiveCurrencyAndAmount: A number of monetary units specified in an active currency where the unit of currency is explicit and compliant with ISO 4217.
  responses:
    "401-Unauthorized":
      description: |-
        Covers the following scenarios:
        * SwAP502 - Invalid Signing Certificate. The certificate cannot be used for doing the API transaction.
        * SwAP502 - Invalid OAuth access token.
        * SwAP508 - OAuth access token not provided.
        * SwAP509 - Customer number not defined.
      headers:
        X-Request-ID:
          $ref: "#/components/headers/X-Request-ID"
        Swift-Request-ID:
          $ref: "#/components/headers/Swift-Request-ID"          
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ErrorMessage"
          examples:
            "401-SwAP502-cert":
              $ref: "#/components/examples/401-SwAP502-cert"
            "401-SwAP502-token":
              $ref: "#/components/examples/401-SwAP502-token"
            "401-SwAP508":
              $ref: "#/components/examples/401-SwAP508"
            "401-SwAP509":
              $ref: "#/components/examples/401-SwAP509"
    "403-Forbidden":
      description: "Covers the following scenarios:\n- SwAP503 - OAuth access token has insufficient scope for the requested service. "
      headers:
        X-Request-ID:
          $ref: "#/components/headers/X-Request-ID"
        Swift-Request-ID:
          $ref: "#/components/headers/Swift-Request-ID"             
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ErrorMessage"
          examples:
            "403-SwAP503":
              $ref: "#/components/examples/403-SwAP503"
    "404-NotFound":
      description: |-
        Covers the following scenarios:
        - SwAP506 - Resource does not exist.
      headers:
        X-Request-ID:
          $ref: "#/components/headers/X-Request-ID"
        Swift-Request-ID:
          $ref: "#/components/headers/Swift-Request-ID"             
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ErrorMessage"
          examples:
            "404-SwAP506":
              $ref: "#/components/examples/404-SwAP506"
    "429-TooManyRequests":
      description: |-
        Covers the following scenarios:
        - SwAP507 - Request cannot be processed at this time. Please try again..
      headers:
        X-Request-ID:
          $ref: "#/components/headers/X-Request-ID"
        Swift-Request-ID:
          $ref: "#/components/headers/Swift-Request-ID"             
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ErrorMessage"
          examples:
            "429-SwAP507":
              $ref: "#/components/examples/429-SwAP507"
    "503-ServiceUnavailable":
      description: |-
        Covers the following scenarios:
        - SwAP590 - Service is temporarily unavailable.
      headers:
        X-Request-ID:
          $ref: "#/components/headers/X-Request-ID"
        Swift-Request-ID:
          $ref: "#/components/headers/Swift-Request-ID"             
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ErrorMessage"
          examples:
            "503-SwAP590":
              $ref: "#/components/examples/503-SwAP590"
    "504-GatewayTimeout":
      description: |-
        Covers the following scenarios:
        - SwAP591 - Service Provider time out.
      headers:
        X-Request-ID:
          $ref: "#/components/headers/X-Request-ID"
        Swift-Request-ID:
          $ref: "#/components/headers/Swift-Request-ID"             
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ErrorMessage"
          examples:
            "504-SwAP591":
              $ref: "#/components/examples/504-SwAP591"
    "500-InternalServerError":
      description: Internal Server Error
      headers:
        X-Request-ID:
          $ref: "#/components/headers/X-Request-ID"
        Swift-Request-ID:
          $ref: "#/components/headers/Swift-Request-ID"             
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ErrorMessage"
          examples:
            "500-InternalServerError":
              $ref: "#/components/examples/500-InternalServerError"
  parameters:
    X-Request-ID:
      name: X-Request-ID
      in: header
      description: End to end tracking ID. This value will be returned to the caller as a response header of the same name. If no header is assigned by the caller, then one will be assigned by Swift.
      required: false
      schema:
        maxLength: 270
        type: string
      example: rrt-1130311210763048898-c-geu2-21394-2055157-17
    X-BIC:
      name: X-BIC
      in: header
      description: The BIC code of the downstream provider which should recieve and process this request, in situations where there are multiple downstream providers. If Swift API Platform should recieve and process this request, the value of this header should be set to SWHQBEBB.
      required: true
      schema:
        maxLength: 255
        pattern: "^[a-zA-Z]{6,6}[a-zA-Z2-9][a-nA-Np-zP-Z0-9]$"
        type: string
      example: DEUTDEFZ

  examples:
    "400-SwAP510":
      summary: "SwAP510: The API method does not support non-repudiation."
      value:
        severity: Fatal
        code: SwAP510
        text: The API method does not support non-repudiation.
    "400-SwAP509":
      summary: "SwAP509: Missing mandatory signature on the non-repudiation API transaction."
      value:
        severity: Fatal
        code: SwAP509
        text: Missing mandatory signature on the non-repudiation API transaction.
    "400-SwAP504-txt":
      summary: "SwAP504: Text is custom to the schema error"
      value:
        severity: Fatal
        code: SwAP504
        text: Text is custom to the schema error
    "400-SwAP504-bic":
      summary: "SwAP504: Invalid Bic."
      value:
        severity: Fatal
        code: SwAP504
        text: Invalid Bic.
    "400-SwAP504-svc":
      summary: "SwAP504: Invalid Service."
      value:
        severity: Fatal
        code: SwAP504
        text: Invalid Service.
    "400-SwAP522":
      summary: "SwAP522: The request cannot processed. The x-bic value provided is not valid."
      value:
        severity: Fatal
        code: SwAP522
        text: The request cannot processed. The x-bic value provided is not valid.
    "400-SwAP504":
      summary: "SwAP504: JSON request body does not conform to policy."
      value:
        severity: Fatal
        code: SwAP504
        text: JSON request body does not conform to policy.
    "400-SwAP505":
      summary: "SwAP505: XML request body does not conform to policy."
      value:
        severity: Fatal
        code: SwAP505
        text: XML request body does not conform to policy.
    "400-SwAP501":
      summary: "SwAP501: API request is malformed."
      value:
        severity: Fatal
        code: SwAP501
        text: API request is malformed.
    "401-SwAP502-cert":
      summary: "SwAP502: Invalid Signing Certificate. The certificate cannot be used for doing the API transaction."
      value:
        severity: Fatal
        code: SwAP502
        text: Invalid Signing Certificate. The certificate cannot be used for doing the API transaction.
    "401-SwAP502-token":
      summary: "SwAP502: Invalid OAuth access token."
      value:
        severity: Fatal
        code: SwAP502
        text: Invalid OAuth access token.
    "401-SwAP508":
      summary: "SwAP508: OAuth access token not provided."
      value:
        severity: Fatal
        code: SwAP508
        text: OAuth access token not provided.
    "401-SwAP509":
      summary: "SwAP509: Customer number not defined."
      value:
        severity: Fatal
        code: SwAP509
        text: Customer number not defined.
    "403-SwAP503":
      summary: "SwAP503: OAuth access token has insufficient scope for the requested service. "
      value:
        severity: Fatal
        code: SwAP503
        text: OAuth access token has insufficient scope for the requested service.
    "404-SwAP506":
      summary: "SwAP506: Resource does not exist."
      value:
        severity: Fatal
        code: SwAP506
        text: Resource does not exist.
    "429-SwAP507":
      summary: "SwAP507: Request cannot be processed at this time. Please try again.."
      value:
        severity: Transient
        code: SwAP507
        text: Request cannot be processed at this time. Please try again..
    "503-SwAP590":
      summary: "SwAP590: Service is temporarily unavailable."
      value:
        severity: Transient
        code: SwAP590
        text: Service is temporarily unavailable.
    "504-SwAP591":
      summary: "SwAP591: Service Provider time out."
      value:
        severity: Transient
        code: SwAP591
        text: Service Provider time out.
    "500-InternalServerError":
      summary: Internal Server Error
      value:
        severity: Transient
        code: <error code>
        text: Server encountered an unexpected condition and cannot fulfill the request.
  headers:
    X-Request-ID:
      description: Specify an unique end to end tracking request ID. The element will be populated by the SWIFT API gateway
      schema:
        type: string
        maxLength: 270
      required: true    
    Swift-Request-ID:
      required: false
      schema:
        type: string
        format: uuid
      examples:
        SwiftIdResponseHeader:
          value: ce480d68-2612-4aef-867a-e91566a1e012
      description: |-
        A Universally Unique Identifier (UUID) generated by the API Gateway for tracking and support purposes.
        This Swift-Request-ID response header must always be returned to the API consumer, even when the response is an error message
  securitySchemes:
    oauthBearerToken:
      type: http
      description: "The access token obtained as a result of OAuth 2.0 flows. SWIFT supports two OAuth grant types for consumption depending on the environment where the API is exposed. \n\n* MV-SIPN - jwt-bearer grant type [RFC 7523](https://tools.ietf.org/html/rfc7523) with Signed JWT assertion\n* Internet - Password grant type with license credentials.\n\nThis API uses JWT-Bearer grant type.\n\nPlease visit [SWIFT OAuth Token API](https://developer.swift.com/swift-oauth-token-api) page for more information and examples on how to generate an OAuth token.\n\nIn this declaration only the basic security element to transport the bearer token of an OAuth2 process is declared.\n"
      scheme: bearer
      bearerFormat: opaque OAuth 2.0
    oAuth2:
      type: oauth2
      description: |
        This API uses OAuth2 with the client credentials grant type for service provider API gateway integration. Used between an end SWIFT API gateway and service provider API gateway.

        Please visit [SWIFT OAuth Token API](https://developer.swift.com/swift-oauth-token-api) for more information and examples.
      flows:
        clientCredentials:
          tokenUrl: /v1/oauth2/token
          scopes: {}