{
  "openapi": "3.1.1",
  "info": {
    "title": "VIP API",
    "version": "1.0.0",
    "description": "Consolidated OpenAPI schema for vip-api.changenow.io endpoints."
  },
  "jsonSchemaDialect": "https://spec.openapis.org/oas/3.1/dialect/base",
  "servers": [
    {
      "url": "https://vip-api.changenow.io",
      "description": "Prod"
    }
  ],
  "tags": [
    {
      "name": "Exchange",
      "description": "Exchange estimation endpoint"
    },
    {
      "name": "Transactions",
      "description": "Transaction info and creation endpoints"
    }
  ],
  "paths": {
    "/v1.3/exchange/estimate": {
      "get": {
        "tags": [
          "Exchange"
        ],
        "operationId": "getExchangeEstimateV1_3",
        "summary": "Estimate exchange outcome across providers",
        "description": "Returns a summary and provider breakdown for exchange estimation using version 1.3. Authentication requires a valid JWT including two-factor verification. Auth is optional.",
        "security": [
          {
            "bearerAuth": []
          },
          {}
        ],
        "parameters": [
          {
            "name": "fromCurrency",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Lowercase ticker of the currency sent by the user."
          },
          {
            "name": "fromNetwork",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Network of the currency sent by the user."
          },
          {
            "name": "toCurrency",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Lowercase ticker of the currency the user wants to receive."
          },
          {
            "name": "toNetwork",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Network of the currency the user wants to receive."
          },
          {
            "name": "fromAmount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Amount the user sends. Required when type is direct (default)."
          },
          {
            "name": "toAmount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Target amount the user wants to receive. Required when type is reverse."
          },
          {
            "name": "flow",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/EstimateFlow"
            },
            "description": "Exchange flow. Defaults to standard."
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/EstimateDirection"
            },
            "description": "Direction of estimation. Defaults to direct."
          },
          {
            "name": "promoCode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional promo code hash applied to the estimation."
          },
          {
            "name": "linkId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Partner link identifier."
          },
          {
            "name": "useRateId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Use an existing fixed-rate identifier. Considered only when flow is fixed-rate."
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PartnerSource"
            },
            "description": "Partner source identifier."
          },
          {
            "name": "withoutFee",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "When true and eligible, estimation switches to a fee-less deposit flow."
          },
          {
            "name": "isBridge",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Marks the request as a bridge swap to adjust provider selection."
          }
        ],
        "responses": {
          "200": {
            "description": "Estimation calculated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EstimateResponseV1_3"
                },
                "examples": {
                  "direct": {
                    "summary": "Direct flow estimation with cashback",
                    "value": {
                      "summary": {
                        "estimatedAmount": 98.765432,
                        "minAmount": 20,
                        "maxAmount": 5000,
                        "providers": 2,
                        "estimationFrom": "default",
                        "estimationFromLabel": "Default",
                        "estimationId": "pr_default_1",
                        "error": null,
                        "isHighNetworkFee": false,
                        "cashback": "0.123456"
                      },
                      "providers": [
                        {
                          "id": "pr_default_1",
                          "isAllowed": true,
                          "type": "default",
                          "label": "Default",
                          "isConvertible": true,
                          "isAmountInRange": true,
                          "estimatedAmount": 98.765432,
                          "maxAmount": 5000,
                          "minAmount": 20,
                          "priority": 0,
                          "custom": {
                            "flow": "standard",
                            "type": "direct",
                            "rateId": "rate_abc123",
                            "transactionSpeedForecast": "10-60",
                            "warningMessage": null,
                            "validUntil": "2025-12-31T23:59:59Z",
                            "withdrawalFee": 0.01,
                            "depositFee": 0.001
                          },
                          "error": null,
                          "promoCode": {
                            "hash": "PROMO50",
                            "type": "key_50",
                            "uses": 0,
                            "maxUses": 1,
                            "usesLeft": 1,
                            "expiresAt": "2025-12-31T00:00:00Z",
                            "isExpired": false,
                            "isValid": true,
                            "txExternalId": null
                          },
                          "isHighNetworkFee": false,
                          "cashback": "0.123456"
                        },
                        {
                          "id": "pr_guardarian_1",
                          "isAllowed": true,
                          "type": "guardarian",
                          "label": "Guardarian",
                          "isConvertible": true,
                          "isAmountInRange": true,
                          "estimatedAmount": 97.5,
                          "maxAmount": 25000,
                          "minAmount": 10,
                          "priority": 0,
                          "custom": {
                            "flow": "standard",
                            "type": "direct",
                            "rateId": "gd_rate_789",
                            "transactionSpeedForecast": "15-45",
                            "warningMessage": null,
                            "validUntil": null,
                            "withdrawalFee": 0,
                            "depositFee": 0
                          },
                          "error": null,
                          "promoCode": null,
                          "isHighNetworkFee": false,
                          "cashback": "0.121000"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden or two-factor validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/transactions/{id}": {
      "get": {
        "tags": [
          "Transactions"
        ],
        "operationId": "getTransactionById",
        "summary": "Get transaction by id",
        "description": "Returns transaction details including amounts, addresses, provider, status, and related exchange metadata. Authentication is optional; authorized requests include user context where applicable. Auth is optional.",
        "security": [
          {
            "bearerAuth": []
          },
          {}
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Transaction identifier (external id)."
          },
          {
            "name": "subId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional sub-transaction identifier."
          }
        ],
        "responses": {
          "200": {
            "description": "Transaction found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TxInfoResponse"
                },
                "examples": {
                  "defaultProvider": {
                    "summary": "Default provider transaction",
                    "value": {
                      "id": "tx_123",
                      "subId": null,
                      "parentId": null,
                      "provider": "default",
                      "status": "exchanging",
                      "actionsAvailable": true,
                      "isPromoCodeAvailable": false,
                      "fromCurrency": "btc",
                      "fromNetwork": "btc",
                      "toCurrency": "eth",
                      "toNetwork": "eth",
                      "expectedAmountFrom": 0.1,
                      "expectedAmountTo": 1.98,
                      "amountFrom": 0.1,
                      "amountTo": 1.98,
                      "payinAddress": "bc1qpayin",
                      "payoutAddress": "0xabc123",
                      "payinExtraId": null,
                      "payoutExtraId": null,
                      "refundAddress": "bc1qrefund",
                      "refundExtraId": null,
                      "depositReceivedAt": null,
                      "payinHash": null,
                      "payoutHash": null,
                      "refundHash": null,
                      "refundAmount": null,
                      "validUntil": "2025-12-31T23:59:59Z",
                      "fromLegacyTicker": "btc",
                      "toLegacyTicker": "eth",
                      "updatedAt": "2025-12-05T09:00:00Z",
                      "createdAt": "2025-12-05T08:59:00Z",
                      "isDeposit": false,
                      "userId": "user_abc",
                      "fiat": {
                        "expectedSendAmount": null,
                        "fromCurrency": null
                      },
                      "originalExchangeInfo": null,
                      "relatedExchangesInfo": [],
                      "repeatedExchangesInfo": []
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Transaction not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1.1/transactions": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "operationId": "createTransactionV1_1",
        "summary": "Create a new exchange transaction",
        "description": "Creates a transaction using the provided exchange parameters. Authentication is optional; when supplied, user data augments the request and enables partner-specific flows. Auth is optional.",
        "security": [
          {
            "bearerAuth": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTransactionRequestV1_1"
              },
              "examples": {
                "directDefault": {
                  "summary": "Direct flow with default provider",
                  "value": {
                    "fromCurrency": "btc",
                    "fromNetwork": "btc",
                    "toCurrency": "eth",
                    "toNetwork": "eth",
                    "fromAmount": 0.1,
                    "address": "0xabc123ef456",
                    "flow": "standard",
                    "type": "direct",
                    "source": "widget",
                    "ga": "GA-123",
                    "info": {
                      "locale": "en",
                      "version": "1.0.0",
                      "platform": "web"
                    }
                  }
                },
                "reverseFixed": {
                  "summary": "Reverse flow fixed-rate with promo and swapzone provider",
                  "value": {
                    "fromCurrency": "eth",
                    "fromNetwork": "eth",
                    "toCurrency": "usdt",
                    "toNetwork": "tron",
                    "toAmount": 1000,
                    "address": "TABC1234DEF5678",
                    "flow": "fixed-rate",
                    "type": "reverse",
                    "provider": "swapzone",
                    "rateId": "rate_xyz",
                    "promoCode": "PROMO50",
                    "linkId": "partner123",
                    "info": {
                      "utmSource": "newsletter",
                      "utmCampaign": "spring"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Transaction created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateTransactionResponseV1_1"
                },
                "examples": {
                  "success": {
                    "summary": "Successful creation response",
                    "value": {
                      "id": "tx_123456",
                      "subId": null,
                      "parentId": null,
                      "provider": "default",
                      "status": "waiting",
                      "actionsAvailable": true,
                      "isPromoCodeAvailable": false,
                      "fromCurrency": "btc",
                      "fromNetwork": "btc",
                      "toCurrency": "eth",
                      "toNetwork": "eth",
                      "expectedAmountFrom": 0.1,
                      "expectedAmountTo": 1.984,
                      "amountFrom": 0.1,
                      "amountTo": 1.984,
                      "payinAddress": "bc1qpayinaddress",
                      "payoutAddress": "0xabc123ef456",
                      "payinExtraId": null,
                      "payoutExtraId": null,
                      "refundAddress": "bc1qrefundaddress",
                      "refundExtraId": null,
                      "depositReceivedAt": null,
                      "payinHash": null,
                      "payoutHash": null,
                      "refundHash": null,
                      "refundAmount": null,
                      "validUntil": "2025-12-31T23:59:59Z",
                      "fromLegacyTicker": "btc",
                      "toLegacyTicker": "eth",
                      "updatedAt": "2025-12-04T16:00:00Z",
                      "createdAt": "2025-12-04T15:59:00Z",
                      "isDeposit": false,
                      "userId": "user_abc",
                      "fiat": {
                        "expectedSendAmount": null,
                        "fromCurrency": null
                      },
                      "childExchanges": [],
                      "repeatedExchanges": [],
                      "originalExchangeInfo": null,
                      "relatedExchangesInfo": [],
                      "repeatedExchangesInfo": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters or provider not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "schemas": {
      "EstimateFlow": {
        "type": "string",
        "enum": [
          "standard",
          "fixed-rate"
        ],
        "default": "standard"
      },
      "EstimateDirection": {
        "type": "string",
        "enum": [
          "direct",
          "reverse"
        ],
        "default": "direct"
      },
      "PartnerSource": {
        "type": "string",
        "enum": [
          "widget",
          "wallet",
          "mobile_ios",
          "mobile_android",
          "mobile_huawei",
          "frost_wallet",
          "lyotradewallet",
          "site",
          "site_bestchange"
        ]
      },
      "ProviderType": {
        "type": "string",
        "enum": [
          "default",
          "simplex",
          "guardarian",
          "swapzone",
          "transak",
          "banxa",
          "third-party"
        ]
      },
      "ProviderKey": {
        "type": "string",
        "enum": [
          "default",
          "simplex",
          "guardarian",
          "swapzone",
          "transak",
          "pro",
          "banxa",
          "third-party"
        ],
        "default": "default"
      },
      "TxStatus": {
        "type": "string",
        "enum": [
          "new",
          "waiting",
          "confirming",
          "exchanging",
          "sending",
          "finished",
          "failed",
          "refunded",
          "verifying",
          "expired",
          "refunding",
          "rejected"
        ]
      },
      "ProviderStateError": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "error": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              },
              "message": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          {
            "type": "null"
          }
        ]
      },
      "PromoCode": {
        "type": "object",
        "required": [
          "hash",
          "type",
          "uses",
          "maxUses",
          "usesLeft",
          "expiresAt",
          "isExpired",
          "isValid"
        ],
        "properties": {
          "hash": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "key_50",
              "key_20"
            ]
          },
          "uses": {
            "type": "integer"
          },
          "maxUses": {
            "type": "integer"
          },
          "usesLeft": {
            "type": "integer"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "isExpired": {
            "type": "boolean"
          },
          "isValid": {
            "type": "boolean"
          },
          "txExternalId": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ProviderStateCustom": {
        "type": "object",
        "required": [
          "flow",
          "type",
          "rateId",
          "transactionSpeedForecast",
          "withdrawalFee",
          "depositFee"
        ],
        "properties": {
          "flow": {
            "$ref": "#/components/schemas/EstimateFlow"
          },
          "type": {
            "$ref": "#/components/schemas/EstimateDirection"
          },
          "rateId": {
            "type": [
              "string",
              "null"
            ]
          },
          "transactionSpeedForecast": {
            "type": "string",
            "description": "Estimated processing speed window in minutes."
          },
          "warningMessage": {
            "type": [
              "string",
              "null"
            ]
          },
          "validUntil": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "withdrawalFee": {
            "type": "number",
            "description": "Withdrawal fee applied by the provider."
          },
          "depositFee": {
            "type": "number",
            "description": "Deposit fee applied by the provider."
          }
        }
      },
      "ProviderState": {
        "type": "object",
        "required": [
          "id",
          "isAllowed",
          "type",
          "label",
          "isConvertible",
          "isAmountInRange",
          "estimatedAmount",
          "maxAmount",
          "minAmount",
          "priority",
          "custom"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier generated per provider response."
          },
          "isAllowed": {
            "type": "boolean",
            "description": "Whether the provider can serve the request."
          },
          "type": {
            "$ref": "#/components/schemas/ProviderType"
          },
          "label": {
            "type": "string",
            "description": "Display label for the provider."
          },
          "isConvertible": {
            "type": "boolean",
            "description": "Indicates that the provider returned a convertible quote."
          },
          "isAmountInRange": {
            "type": "boolean",
            "description": "Whether the requested amount is inside provider limits."
          },
          "estimatedAmount": {
            "type": [
              "number",
              "null"
            ],
            "description": "Estimated resulting amount for the chosen direction."
          },
          "maxAmount": {
            "type": [
              "number",
              "null"
            ],
            "description": "Maximum amount permitted by the provider."
          },
          "minAmount": {
            "type": [
              "number",
              "null"
            ],
            "description": "Minimum amount permitted by the provider."
          },
          "priority": {
            "type": "integer",
            "description": "Sorting priority applied before evaluation."
          },
          "custom": {
            "$ref": "#/components/schemas/ProviderStateCustom"
          },
          "error": {
            "$ref": "#/components/schemas/ProviderStateError"
          },
          "promoCode": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PromoCode"
              },
              {
                "type": "null"
              }
            ]
          },
          "isHighNetworkFee": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "cashback": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "EstimateSummaryV1_3": {
        "type": "object",
        "required": [
          "estimatedAmount",
          "minAmount",
          "maxAmount",
          "providers",
          "estimationFrom",
          "estimationFromLabel",
          "estimationId",
          "error",
          "isHighNetworkFee",
          "cashback"
        ],
        "properties": {
          "estimatedAmount": {
            "type": [
              "number",
              "null"
            ],
            "description": "Final calculated amount based on direction (to amount for direct, from amount for reverse)."
          },
          "minAmount": {
            "type": [
              "number",
              "null"
            ],
            "description": "Lowest amount accepted by the selected provider."
          },
          "maxAmount": {
            "type": [
              "number",
              "null"
            ],
            "description": "Highest amount accepted by the selected provider."
          },
          "providers": {
            "type": "integer",
            "description": "Number of providers evaluated."
          },
          "estimationFrom": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProviderType"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider key the summary estimation was taken from."
          },
          "estimationFromLabel": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human readable provider label."
          },
          "estimationId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Identifier of the provider entry used for the summary."
          },
          "error": {
            "$ref": "#/components/schemas/ProviderStateError"
          },
          "isHighNetworkFee": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Indicates if the chosen provider fee exceeds the alert threshold."
          },
          "cashback": {
            "type": [
              "string",
              "null"
            ],
            "description": "Estimated NOW cashback for the operation when applicable."
          }
        }
      },
      "EstimateResponseV1_3": {
        "type": "object",
        "required": [
          "summary",
          "providers"
        ],
        "properties": {
          "summary": {
            "$ref": "#/components/schemas/EstimateSummaryV1_3"
          },
          "providers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProviderState"
            }
          }
        }
      },
      "FiatInfo": {
        "type": "object",
        "properties": {
          "expectedSendAmount": {
            "type": [
              "number",
              "null"
            ]
          },
          "fromCurrency": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ChildExchangeInfo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "ArbitraryObjectOrNull": {
        "anyOf": [
          {
            "type": "object",
            "additionalProperties": true
          },
          {
            "type": "null"
          }
        ]
      },
      "TxInfoResponse": {
        "type": "object",
        "required": [
          "id",
          "provider",
          "status",
          "fromCurrency",
          "toCurrency",
          "payinAddress",
          "payoutAddress",
          "fromLegacyTicker",
          "toLegacyTicker",
          "updatedAt",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "subId": {
            "type": [
              "string",
              "null"
            ]
          },
          "parentId": {
            "type": [
              "string",
              "null"
            ]
          },
          "provider": {
            "$ref": "#/components/schemas/ProviderKey"
          },
          "status": {
            "$ref": "#/components/schemas/TxStatus"
          },
          "actionsAvailable": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "isPromoCodeAvailable": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "fromCurrency": {
            "type": "string"
          },
          "fromNetwork": {
            "type": [
              "string",
              "null"
            ]
          },
          "toCurrency": {
            "type": "string"
          },
          "toNetwork": {
            "type": [
              "string",
              "null"
            ]
          },
          "expectedAmountFrom": {
            "type": [
              "number",
              "null"
            ]
          },
          "expectedAmountTo": {
            "type": [
              "number",
              "null"
            ]
          },
          "amountFrom": {
            "type": [
              "number",
              "null"
            ]
          },
          "amountTo": {
            "type": [
              "number",
              "null"
            ]
          },
          "payinAddress": {
            "type": "string"
          },
          "payoutAddress": {
            "type": "string"
          },
          "payinExtraId": {
            "type": [
              "string",
              "null"
            ]
          },
          "payoutExtraId": {
            "type": [
              "string",
              "null"
            ]
          },
          "refundAddress": {
            "type": [
              "string",
              "null"
            ]
          },
          "refundExtraId": {
            "type": [
              "string",
              "null"
            ]
          },
          "depositReceivedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "payinHash": {
            "type": [
              "string",
              "null"
            ]
          },
          "payoutHash": {
            "type": [
              "string",
              "null"
            ]
          },
          "refundHash": {
            "type": [
              "string",
              "null"
            ]
          },
          "refundAmount": {
            "oneOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "validUntil": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "fromLegacyTicker": {
            "type": "string"
          },
          "toLegacyTicker": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "isDeposit": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "userId": {
            "type": [
              "string",
              "null"
            ]
          },
          "fiat": {
            "$ref": "#/components/schemas/FiatInfo"
          },
          "originalExchangeInfo": {
            "$ref": "#/components/schemas/ArbitraryObjectOrNull"
          },
          "relatedExchangesInfo": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChildExchangeInfo"
            }
          },
          "repeatedExchangesInfo": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChildExchangeInfo"
            }
          }
        }
      },
      "Flow": {
        "type": "string",
        "enum": [
          "standard",
          "fixed-rate"
        ],
        "default": "standard"
      },
      "InfoDto": {
        "type": "object",
        "properties": {
          "locale": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "platform": {
            "type": "string"
          },
          "utmSource": {
            "type": "string"
          },
          "utmMedium": {
            "type": "string"
          },
          "utmCampaign": {
            "type": "string"
          },
          "utmContent": {
            "type": "string"
          },
          "utmTerm": {
            "type": "string"
          },
          "landingPage": {
            "type": "string"
          },
          "exchangePage": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "sessionCount": {
            "type": "string"
          }
        }
      },
      "CreateTransactionRequestV1_1": {
        "type": "object",
        "required": [
          "fromCurrency",
          "fromNetwork",
          "toCurrency",
          "toNetwork",
          "address"
        ],
        "properties": {
          "fromCurrency": {
            "type": "string",
            "description": "Lowercase ticker of the currency sent by the user."
          },
          "fromNetwork": {
            "type": "string",
            "description": "Network of the currency sent by the user."
          },
          "toCurrency": {
            "type": "string",
            "description": "Lowercase ticker of the currency the user will receive."
          },
          "toNetwork": {
            "type": "string",
            "description": "Network of the currency the user will receive."
          },
          "fromAmount": {
            "oneOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "description": "Amount the user sends. Required when type is direct."
          },
          "toAmount": {
            "oneOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              }
            ],
            "description": "Target amount the user wants to receive. Required when type is reverse."
          },
          "address": {
            "type": "string",
            "description": "Recipient address for payout. Required unless provider is guardarian."
          },
          "refundAddress": {
            "type": "string"
          },
          "extraId": {
            "type": "string"
          },
          "refundExtraId": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "payload": {
            "type": "object",
            "properties": {
              "userKycLevel": {
                "type": "number"
              }
            }
          },
          "contactEmail": {
            "type": "string",
            "format": "email"
          },
          "flow": {
            "$ref": "#/components/schemas/Flow"
          },
          "type": {
            "$ref": "#/components/schemas/EstimateDirection"
          },
          "rateId": {
            "type": "string"
          },
          "provider": {
            "$ref": "#/components/schemas/ProviderKey"
          },
          "linkId": {
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/PartnerSource"
          },
          "ga": {
            "type": "string"
          },
          "promoCode": {
            "type": "string"
          },
          "info": {
            "$ref": "#/components/schemas/InfoDto"
          },
          "isDeposit": {
            "type": "boolean",
            "default": false
          },
          "brokerApiKey": {
            "type": "string"
          },
          "isBridge": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "CreateTransactionResponseV1_1": {
        "type": "object",
        "required": [
          "id",
          "provider",
          "status",
          "fromCurrency",
          "toCurrency",
          "payinAddress",
          "payoutAddress",
          "fromLegacyTicker",
          "toLegacyTicker",
          "updatedAt",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "subId": {
            "type": [
              "string",
              "null"
            ]
          },
          "parentId": {
            "type": [
              "string",
              "null"
            ]
          },
          "provider": {
            "$ref": "#/components/schemas/ProviderKey"
          },
          "status": {
            "$ref": "#/components/schemas/TxStatus"
          },
          "actionsAvailable": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "isPromoCodeAvailable": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "fromCurrency": {
            "type": "string"
          },
          "fromNetwork": {
            "type": [
              "string",
              "null"
            ]
          },
          "toCurrency": {
            "type": "string"
          },
          "toNetwork": {
            "type": [
              "string",
              "null"
            ]
          },
          "expectedAmountFrom": {
            "type": [
              "number",
              "null"
            ]
          },
          "expectedAmountTo": {
            "type": [
              "number",
              "null"
            ]
          },
          "amountFrom": {
            "type": [
              "number",
              "null"
            ]
          },
          "amountTo": {
            "type": [
              "number",
              "null"
            ]
          },
          "payinAddress": {
            "type": "string"
          },
          "payoutAddress": {
            "type": "string"
          },
          "payinExtraId": {
            "type": [
              "string",
              "null"
            ]
          },
          "payoutExtraId": {
            "type": [
              "string",
              "null"
            ]
          },
          "refundAddress": {
            "type": [
              "string",
              "null"
            ]
          },
          "refundExtraId": {
            "type": [
              "string",
              "null"
            ]
          },
          "depositReceivedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "payinHash": {
            "type": [
              "string",
              "null"
            ]
          },
          "payoutHash": {
            "type": [
              "string",
              "null"
            ]
          },
          "refundHash": {
            "type": [
              "string",
              "null"
            ]
          },
          "refundAmount": {
            "oneOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "validUntil": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "fromLegacyTicker": {
            "type": "string"
          },
          "toLegacyTicker": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "isDeposit": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "userId": {
            "type": [
              "string",
              "null"
            ]
          },
          "fiat": {
            "$ref": "#/components/schemas/FiatInfo"
          },
          "childExchanges": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "repeatedExchanges": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "originalExchangeInfo": {
            "$ref": "#/components/schemas/ArbitraryObjectOrNull"
          },
          "relatedExchangesInfo": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChildExchangeInfo"
            }
          },
          "repeatedExchangesInfo": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChildExchangeInfo"
            }
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "integer"
          },
          "message": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
