{
  "openapi": "3.0.4",
  "info": {
    "title": "Chainflip Broker as a Service",
    "description": "Run your own Chainflip Broker without any hassle.",
    "version": "v1"
  },
  "paths": {
    "/assets": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Get all assets.",
        "responses": {
          "200": {
            "description": "All available assets.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChainflipBaas.Assets.AssetsResponse"
                }
              }
            }
          },
          "500": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.6.1",
                  "title": "Internal Server Error",
                  "status": 500,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          }
        }
      }
    },
    "/assets/{network}": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Get all assets on a given network.",
        "parameters": [
          {
            "name": "network",
            "in": "path",
            "description": "The network id to filter on.",
            "required": true,
            "schema": {
              "enum": [
                "btc",
                "eth",
                "dot",
                "arb",
                "sol",
                "hub",
                "tron"
              ],
              "type": "string",
              "description": "Supported networks. Member names are lowercase on purpose: they are the wire-format network\nids used in asset identifiers (e.g. \"usdc.eth\") and API responses.",
              "x-ms-enum": {
                "name": "Network",
                "modelAsString": true
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "All available assets.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChainflipBaas.Assets.AssetsResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request has invalid information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
                  "title": "Bad Request",
                  "status": 400,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00",
                  "errors": {
                    "property1": [
                      "The property field is required"
                    ]
                  }
                }
              }
            }
          },
          "500": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.6.1",
                  "title": "Internal Server Error",
                  "status": 500,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          }
        }
      }
    },
    "/assets/{asset}/logo.svg": {
      "get": {
        "tags": [
          "Assets"
        ],
        "summary": "Get the logo for an asset.",
        "parameters": [
          {
            "name": "asset",
            "in": "path",
            "description": "Name of the asset.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The asset logo in SVG format.",
            "content": {
              "image/svg+xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "The request has invalid information.",
            "content": {
              "image/svg+xml": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "An error occurred.",
            "content": {
              "image/svg+xml": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/fees": {
      "get": {
        "tags": [
          "Fees"
        ],
        "summary": "Get earned broker fees.",
        "parameters": [
          {
            "name": "apiKey",
            "in": "query",
            "description": "The partner API key.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The earned broker fees.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChainflipBaas.Fees.FeesResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request has invalid information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
                  "title": "Bad Request",
                  "status": 400,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00",
                  "errors": {
                    "property1": [
                      "The property field is required"
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "The partner does not have access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7235#section-3.1",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          },
          "500": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.6.1",
                  "title": "Internal Server Error",
                  "status": 500,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          }
        }
      }
    },
    "/networks": {
      "get": {
        "tags": [
          "Networks"
        ],
        "summary": "Get all networks.",
        "responses": {
          "200": {
            "description": "All available networks.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChainflipBaas.Networks.NetworksResponse"
                }
              }
            }
          },
          "500": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.6.1",
                  "title": "Internal Server Error",
                  "status": 500,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          }
        }
      }
    },
    "/networks/{network}/logo.svg": {
      "get": {
        "tags": [
          "Networks"
        ],
        "summary": "Get the logo for a network.",
        "parameters": [
          {
            "name": "network",
            "in": "path",
            "description": "Name of the network.",
            "required": true,
            "schema": {
              "enum": [
                "btc",
                "eth",
                "dot",
                "arb",
                "sol",
                "hub",
                "tron"
              ],
              "type": "string",
              "description": "Supported networks. Member names are lowercase on purpose: they are the wire-format network\nids used in asset identifiers (e.g. \"usdc.eth\") and API responses.",
              "x-ms-enum": {
                "name": "Network",
                "modelAsString": true
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The network logo in SVG format.",
            "content": {
              "image/svg+xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "An error occurred.",
            "content": {
              "image/svg+xml": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/quote-native": {
      "get": {
        "tags": [
          "Quote"
        ],
        "summary": "Get a quote from native units.",
        "parameters": [
          {
            "name": "apiKey",
            "in": "query",
            "description": "The partner API key.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sourceAsset",
            "in": "query",
            "description": "The asset to swap from.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "btc.btc"
          },
          {
            "name": "destinationAsset",
            "in": "query",
            "description": "The asset to swap to.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "eth.eth"
          },
          {
            "name": "amount",
            "in": "query",
            "description": "The amount to swap in native units.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "100000000"
          },
          {
            "name": "commissionBps",
            "in": "query",
            "description": "An optional override to the charged commission bps.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "example": 15
          }
        ],
        "responses": {
          "200": {
            "description": "A quote for the given assets and amount.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChainflipBaas.Quote.Quote"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input (validation errors), or an upstream rejection of the request as sent (code).",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                    }
                  ]
                },
                "examples": {
                  "validation": {
                    "summary": "Input validation failed",
                    "value": {
                      "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
                      "title": "Bad Request",
                      "status": 400,
                      "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00",
                      "errors": {
                        "property1": [
                          "The property field is required"
                        ]
                      }
                    }
                  },
                  "upstream": {
                    "summary": "The upstream cannot fulfil this request",
                    "value": {
                      "type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
                      "title": "Bad Request",
                      "status": 400,
                      "detail": "There is currently no quote available for this amount, try a lower amount",
                      "code": "insufficient_liquidity"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The partner does not have access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7235#section-3.1",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          },
          "403": {
            "description": "Swaps between these assets are not enabled for the partner.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.3",
                  "title": "Forbidden",
                  "status": 403,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          },
          "503": {
            "description": "A temporary upstream condition, such as maintenance, a disabled asset or the network channel cap. Retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.6.4",
                  "title": "Service Unavailable",
                  "status": 503,
                  "detail": "One of the assets in this swap is currently disabled on Chainflip",
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00",
                  "code": "asset_disabled"
                }
              }
            }
          },
          "500": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.6.1",
                  "title": "Internal Server Error",
                  "status": 500,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/quotes-native": {
      "get": {
        "tags": [
          "Quote"
        ],
        "summary": "Get a list of quotes from native units.",
        "parameters": [
          {
            "name": "apiKey",
            "in": "query",
            "description": "The partner API key.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sourceAsset",
            "in": "query",
            "description": "The asset to swap from.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "btc.btc"
          },
          {
            "name": "destinationAsset",
            "in": "query",
            "description": "The asset to swap to.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "eth.eth"
          },
          {
            "name": "amount",
            "in": "query",
            "description": "The amount to swap in native units.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "100000000"
          },
          {
            "name": "commissionBps",
            "in": "query",
            "description": "An optional override to the charged commission bps.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "example": 15
          },
          {
            "name": "isVaultSwap",
            "in": "query",
            "description": "Flag for requesting a quote for a vault swap. Network related fees can be different for vault swaps compared to regular swaps.",
            "schema": {
              "type": "boolean"
            },
            "example": true
          }
        ],
        "responses": {
          "200": {
            "description": "A list of quotes for the given assets and amount.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ChainflipBaas.Quote.Quote"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input (validation errors), or an upstream rejection of the request as sent (code).",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                    }
                  ]
                },
                "examples": {
                  "validation": {
                    "summary": "Input validation failed",
                    "value": {
                      "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
                      "title": "Bad Request",
                      "status": 400,
                      "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00",
                      "errors": {
                        "property1": [
                          "The property field is required"
                        ]
                      }
                    }
                  },
                  "upstream": {
                    "summary": "The upstream cannot fulfil this request",
                    "value": {
                      "type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
                      "title": "Bad Request",
                      "status": 400,
                      "detail": "There is currently no quote available for this amount, try a lower amount",
                      "code": "insufficient_liquidity"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The partner does not have access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7235#section-3.1",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          },
          "403": {
            "description": "Swaps between these assets are not enabled for the partner.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.3",
                  "title": "Forbidden",
                  "status": 403,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          },
          "503": {
            "description": "A temporary upstream condition, such as maintenance, a disabled asset or the network channel cap. Retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.6.4",
                  "title": "Service Unavailable",
                  "status": 503,
                  "detail": "One of the assets in this swap is currently disabled on Chainflip",
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00",
                  "code": "asset_disabled"
                }
              }
            }
          },
          "500": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.6.1",
                  "title": "Internal Server Error",
                  "status": 500,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          }
        }
      }
    },
    "/quote": {
      "get": {
        "tags": [
          "Quote"
        ],
        "summary": "Get a quote.",
        "parameters": [
          {
            "name": "apiKey",
            "in": "query",
            "description": "The partner API key.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sourceAsset",
            "in": "query",
            "description": "The asset to swap from.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "btc.btc"
          },
          {
            "name": "destinationAsset",
            "in": "query",
            "description": "The asset to swap to.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "eth.eth"
          },
          {
            "name": "amount",
            "in": "query",
            "description": "The amount to swap.",
            "required": true,
            "schema": {
              "type": "number",
              "format": "double"
            },
            "example": 1
          },
          {
            "name": "commissionBps",
            "in": "query",
            "description": "An optional override to the charged commission bps.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "example": 15
          }
        ],
        "responses": {
          "200": {
            "description": "A quote for the given assets and amount.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChainflipBaas.Quote.Quote"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input (validation errors), or an upstream rejection of the request as sent (code).",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                    }
                  ]
                },
                "examples": {
                  "validation": {
                    "summary": "Input validation failed",
                    "value": {
                      "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
                      "title": "Bad Request",
                      "status": 400,
                      "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00",
                      "errors": {
                        "property1": [
                          "The property field is required"
                        ]
                      }
                    }
                  },
                  "upstream": {
                    "summary": "The upstream cannot fulfil this request",
                    "value": {
                      "type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
                      "title": "Bad Request",
                      "status": 400,
                      "detail": "There is currently no quote available for this amount, try a lower amount",
                      "code": "insufficient_liquidity"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The partner does not have access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7235#section-3.1",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          },
          "403": {
            "description": "Swaps between these assets are not enabled for the partner.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.3",
                  "title": "Forbidden",
                  "status": 403,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          },
          "503": {
            "description": "A temporary upstream condition, such as maintenance, a disabled asset or the network channel cap. Retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.6.4",
                  "title": "Service Unavailable",
                  "status": 503,
                  "detail": "One of the assets in this swap is currently disabled on Chainflip",
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00",
                  "code": "asset_disabled"
                }
              }
            }
          },
          "500": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.6.1",
                  "title": "Internal Server Error",
                  "status": 500,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/quotes": {
      "get": {
        "tags": [
          "Quote"
        ],
        "summary": "Get a list of quotes.",
        "parameters": [
          {
            "name": "apiKey",
            "in": "query",
            "description": "The partner API key.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sourceAsset",
            "in": "query",
            "description": "The asset to swap from.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "btc.btc"
          },
          {
            "name": "destinationAsset",
            "in": "query",
            "description": "The asset to swap to.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "eth.eth"
          },
          {
            "name": "amount",
            "in": "query",
            "description": "The amount to swap.",
            "required": true,
            "schema": {
              "type": "number",
              "format": "double"
            },
            "example": 50
          },
          {
            "name": "commissionBps",
            "in": "query",
            "description": "An optional override to the charged commission bps.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "example": 15
          },
          {
            "name": "isVaultSwap",
            "in": "query",
            "description": "Flag for requesting a quote for a vault swap. Network related fees can be different for vault swaps compared to regular swaps.",
            "schema": {
              "type": "boolean"
            },
            "example": true
          }
        ],
        "responses": {
          "200": {
            "description": "A list of quotes for the given assets and amount.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ChainflipBaas.Quote.Quote"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input (validation errors), or an upstream rejection of the request as sent (code).",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                    }
                  ]
                },
                "examples": {
                  "validation": {
                    "summary": "Input validation failed",
                    "value": {
                      "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
                      "title": "Bad Request",
                      "status": 400,
                      "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00",
                      "errors": {
                        "property1": [
                          "The property field is required"
                        ]
                      }
                    }
                  },
                  "upstream": {
                    "summary": "The upstream cannot fulfil this request",
                    "value": {
                      "type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
                      "title": "Bad Request",
                      "status": 400,
                      "detail": "There is currently no quote available for this amount, try a lower amount",
                      "code": "insufficient_liquidity"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The partner does not have access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7235#section-3.1",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          },
          "403": {
            "description": "Swaps between these assets are not enabled for the partner.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.3",
                  "title": "Forbidden",
                  "status": 403,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          },
          "503": {
            "description": "A temporary upstream condition, such as maintenance, a disabled asset or the network channel cap. Retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.6.4",
                  "title": "Service Unavailable",
                  "status": 503,
                  "detail": "One of the assets in this swap is currently disabled on Chainflip",
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00",
                  "code": "asset_disabled"
                }
              }
            }
          },
          "500": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.6.1",
                  "title": "Internal Server Error",
                  "status": 500,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          }
        }
      }
    },
    "/rpc/{apiKey}": {
      "post": {
        "tags": [
          "Rpc"
        ],
        "summary": "Make an RPC call.",
        "parameters": [
          {
            "name": "apiKey",
            "in": "path",
            "description": "The partner API key.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "An RPC request for the RPC call.",
          "content": {
            "application/json": {
              "schema": { }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "An RPC response for the RPC call.",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          },
          "400": {
            "description": "The request has invalid information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
                  "title": "Bad Request",
                  "status": 400,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00",
                  "errors": {
                    "property1": [
                      "The property field is required"
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "The partner does not have access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7235#section-3.1",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          },
          "403": {
            "description": "Swaps between these assets are not enabled for the partner.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.3",
                  "title": "Forbidden",
                  "status": 403,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          },
          "500": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.6.1",
                  "title": "Internal Server Error",
                  "status": 500,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          }
        }
      }
    },
    "/status-by-deposit-channel": {
      "get": {
        "tags": [
          "Status"
        ],
        "summary": "View status of a swap, by deposit channel.",
        "parameters": [
          {
            "name": "apiKey",
            "in": "query",
            "description": "The partner API key.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "issuedBlock",
            "in": "query",
            "description": "The block in which the swap deposit address was issued.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "network",
            "in": "query",
            "description": "The source network of the swap.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channelId",
            "in": "query",
            "description": "The channel id of the swap.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The swap status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChainflipBaas.Status.StatusResponse"
                }
              }
            }
          },
          "401": {
            "description": "The partner does not have access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7235#section-3.1",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          },
          "404": {
            "description": "The swap does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
                  "title": "Not Found",
                  "status": 404,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          },
          "500": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.6.1",
                  "title": "Internal Server Error",
                  "status": 500,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          }
        }
      }
    },
    "/status-by-id": {
      "get": {
        "tags": [
          "Status"
        ],
        "summary": "View status of a swap, by id.",
        "parameters": [
          {
            "name": "apiKey",
            "in": "query",
            "description": "The partner API key.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "swapId",
            "in": "query",
            "description": "The id of the swap.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The swap status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChainflipBaas.Status.StatusResponse"
                }
              }
            }
          },
          "401": {
            "description": "The partner does not have access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7235#section-3.1",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          },
          "404": {
            "description": "The swap does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
                  "title": "Not Found",
                  "status": 404,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          },
          "500": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.6.1",
                  "title": "Internal Server Error",
                  "status": 500,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          }
        }
      }
    },
    "/status-by-transaction-hash": {
      "get": {
        "tags": [
          "Status"
        ],
        "summary": "View status of a swap, by transaction hash.",
        "parameters": [
          {
            "name": "apiKey",
            "in": "query",
            "description": "The partner API key.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "transactionHash",
            "in": "query",
            "description": "The transaction hash of the deposit transaction.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The swap status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChainflipBaas.Status.StatusResponse"
                }
              }
            }
          },
          "401": {
            "description": "The partner does not have access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7235#section-3.1",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          },
          "404": {
            "description": "The swap does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
                  "title": "Not Found",
                  "status": 404,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          },
          "500": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.6.1",
                  "title": "Internal Server Error",
                  "status": 500,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          }
        }
      }
    },
    "/swap": {
      "get": {
        "tags": [
          "Swap"
        ],
        "summary": "Start a swap.",
        "parameters": [
          {
            "name": "apiKey",
            "in": "query",
            "description": "The partner API key.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sourceAsset",
            "in": "query",
            "description": "The asset to swap from.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "eth.eth"
          },
          {
            "name": "destinationAsset",
            "in": "query",
            "description": "The asset to swap to.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "btc.btc"
          },
          {
            "name": "destinationAddress",
            "in": "query",
            "description": "The address on the destination chain to swap to.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "bc1qujr7jlxeh4m20lldqh4fcsl63ff2ee6uk60g8r"
          },
          {
            "name": "commissionBps",
            "in": "query",
            "description": "An optional override to the charged commission bps.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "example": 15
          },
          {
            "name": "boostFee",
            "in": "query",
            "description": "Maximum accepted boost fee in basis points (100th of a percent).",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "example": 5
          },
          {
            "name": "minimumPrice",
            "in": "query",
            "description": "Minimum accepted human readable price.",
            "required": true,
            "schema": {
              "type": "number",
              "format": "double"
            },
            "example": 2768.95
          },
          {
            "name": "refundAddress",
            "in": "query",
            "description": "Address on the source chain to which the refund will be sent, if the minimum price cannot be met.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "0x2c1f0390f27740257de9f3772d9a6bb46ec13fe3"
          },
          {
            "name": "retryDurationInBlocks",
            "in": "query",
            "description": "Number of blocks after which a deposit is refunded if the minimum price cannot be met. One block corresponds to 6 seconds. Max 14400 = 24 hours. Recommended: 150.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "example": 100
          },
          {
            "name": "numberOfChunks",
            "in": "query",
            "description": "The number of \"sub-swaps\" to perform for a DCA swap.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "example": 32
          },
          {
            "name": "chunkIntervalBlocks",
            "in": "query",
            "description": "The delay between the \"sub-swaps\" of a DCA swap in number of blocks.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "example": 2
          },
          {
            "name": "affiliate1",
            "in": "query",
            "description": "First optional extra affiliate ss58 address to share commission with.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "affiliate1CommissionBps",
            "in": "query",
            "description": "First optional extra affiliate commission in basis points.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "affiliate2",
            "in": "query",
            "description": "Second optional extra affiliate ss58 address to share commission with.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "affiliate2CommissionBps",
            "in": "query",
            "description": "Second optional extra affiliate commission in basis points.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "affiliate3",
            "in": "query",
            "description": "Third optional extra affiliate ss58 address to share commission with.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "affiliate3CommissionBps",
            "in": "query",
            "description": "Third optional extra affiliate commission in basis points.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "affiliate4",
            "in": "query",
            "description": "Fourth optional extra affiliate ss58 address to share commission with.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "affiliate4CommissionBps",
            "in": "query",
            "description": "Fourth optional extra affiliate commission in basis points.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "platform",
            "in": "query",
            "description": "Optional provider to route the swap through. Defaults to chainflip.",
            "schema": {
              "type": "string"
            },
            "example": "chainflip"
          }
        ],
        "responses": {
          "200": {
            "description": "A deposit address for the given swap.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChainflipBaas.Swap.DepositAddress"
                }
              }
            }
          },
          "400": {
            "description": "The request has invalid information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
                  "title": "Bad Request",
                  "status": 400,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00",
                  "errors": {
                    "property1": [
                      "The property field is required"
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "The partner does not have access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7235#section-3.1",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          },
          "403": {
            "description": "Swaps between these assets are not enabled for the partner.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.3",
                  "title": "Forbidden",
                  "status": 403,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          },
          "503": {
            "description": "A temporary upstream condition, such as maintenance, a disabled asset or the network channel cap. Retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.6.4",
                  "title": "Service Unavailable",
                  "status": 503,
                  "detail": "One of the assets in this swap is currently disabled on Chainflip",
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00",
                  "code": "asset_disabled"
                }
              }
            }
          },
          "500": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.6.1",
                  "title": "Internal Server Error",
                  "status": 500,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Swap"
        ],
        "summary": "Start an advanced swap.",
        "parameters": [
          {
            "name": "apiKey",
            "in": "query",
            "description": "The partner API key.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sourceAsset",
            "in": "query",
            "description": "The asset to swap from.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "eth.eth"
          },
          {
            "name": "destinationAsset",
            "in": "query",
            "description": "The asset to swap to.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "btc.btc"
          },
          {
            "name": "destinationAddress",
            "in": "query",
            "description": "The address on the destination chain to swap to.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "bc1qujr7jlxeh4m20lldqh4fcsl63ff2ee6uk60g8r"
          },
          {
            "name": "commissionBps",
            "in": "query",
            "description": "An optional override to the charged commission bps.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "example": 15
          },
          {
            "name": "boostFee",
            "in": "query",
            "description": "Maximum accepted boost fee in basis points (100th of a percent).",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "example": 5
          },
          {
            "name": "minimumPrice",
            "in": "query",
            "description": "Minimum accepted human readable price.",
            "required": true,
            "schema": {
              "type": "number",
              "format": "double"
            },
            "example": 2768.95
          },
          {
            "name": "refundAddress",
            "in": "query",
            "description": "Address on the source chain to which the refund will be sent, if the minimum price cannot be met.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "0x2c1f0390f27740257de9f3772d9a6bb46ec13fe3"
          },
          {
            "name": "retryDurationInBlocks",
            "in": "query",
            "description": "Number of blocks after which a deposit is refunded if the minimum price cannot be met. One block corresponds to 6 seconds. Max 14400 = 24 hours. Recommended: 150.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "example": 100
          },
          {
            "name": "numberOfChunks",
            "in": "query",
            "description": "The number of \"sub-swaps\" to perform for a DCA swap.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "example": 32
          },
          {
            "name": "chunkIntervalBlocks",
            "in": "query",
            "description": "The delay between the \"sub-swaps\" of a DCA swap in number of blocks.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "example": 2
          },
          {
            "name": "affiliate1",
            "in": "query",
            "description": "First optional extra affiliate ss58 address to share commission with.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "affiliate1CommissionBps",
            "in": "query",
            "description": "First optional extra affiliate commission in basis points.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "affiliate2",
            "in": "query",
            "description": "Second optional extra affiliate ss58 address to share commission with.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "affiliate2CommissionBps",
            "in": "query",
            "description": "Second optional extra affiliate commission in basis points.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "affiliate3",
            "in": "query",
            "description": "Third optional extra affiliate ss58 address to share commission with.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "affiliate3CommissionBps",
            "in": "query",
            "description": "Third optional extra affiliate commission in basis points.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "affiliate4",
            "in": "query",
            "description": "Fourth optional extra affiliate ss58 address to share commission with.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "affiliate4CommissionBps",
            "in": "query",
            "description": "Fourth optional extra affiliate commission in basis points.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "platform",
            "in": "query",
            "description": "Optional provider to route the swap through. Defaults to chainflip.",
            "schema": {
              "type": "string"
            },
            "example": "chainflip"
          }
        ],
        "requestBody": {
          "description": "Advanced swap parameters which are not supported as query string parameters, e.g.: Cross-Chain Messaging payload.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChainflipBaas.Swap.AdvancedSwapRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A deposit address for the given swap.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChainflipBaas.Swap.DepositAddress"
                }
              }
            }
          },
          "400": {
            "description": "The request has invalid information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
                  "title": "Bad Request",
                  "status": 400,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00",
                  "errors": {
                    "property1": [
                      "The property field is required"
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "The partner does not have access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7235#section-3.1",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          },
          "403": {
            "description": "Swaps between these assets are not enabled for the partner.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.3",
                  "title": "Forbidden",
                  "status": 403,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          },
          "503": {
            "description": "A temporary upstream condition, such as maintenance, a disabled asset or the network channel cap. Retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.6.4",
                  "title": "Service Unavailable",
                  "status": 503,
                  "detail": "One of the assets in this swap is currently disabled on Chainflip",
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00",
                  "code": "asset_disabled"
                }
              }
            }
          },
          "500": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.6.1",
                  "title": "Internal Server Error",
                  "status": 500,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          }
        }
      }
    },
    "/feed": {
      "get": {
        "tags": [
          "Swaps"
        ],
        "summary": "View swaps feed, sorted oldest to newest.",
        "parameters": [
          {
            "name": "apiKey",
            "in": "query",
            "description": "The partner API key.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Feed id to return results from.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "example": 42
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of results to return, default 50, maximum 500.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "example": 50
          }
        ],
        "responses": {
          "200": {
            "description": "The swaps in completion order.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ChainflipBaas.SwapsFeed.FeedStatusResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request has invalid information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
                  "title": "Bad Request",
                  "status": 400,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00",
                  "errors": {
                    "property1": [
                      "The property field is required"
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "The partner does not have access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7235#section-3.1",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          },
          "500": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.6.1",
                  "title": "Internal Server Error",
                  "status": 500,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          }
        }
      }
    },
    "/swaps": {
      "get": {
        "tags": [
          "Swaps"
        ],
        "summary": "View swaps.",
        "parameters": [
          {
            "name": "apiKey",
            "in": "query",
            "description": "The partner API key.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Swap id to return results from, depends on sort.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "example": 42
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of results to return, default 50, maximum 500.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "example": 50
          },
          {
            "name": "status",
            "in": "query",
            "description": "Only return swaps which match these statuses. Defaults to completed only.",
            "schema": {
              "type": "array",
              "items": {
                "enum": [
                  "waiting",
                  "receiving",
                  "swapping",
                  "sending",
                  "sent",
                  "completed",
                  "failed"
                ],
                "type": "string",
                "x-ms-enum": {
                  "name": "SwapState",
                  "modelAsString": true
                }
              }
            },
            "example": "completed"
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sort order, default descending.",
            "schema": {
              "enum": [
                "ascending",
                "descending"
              ],
              "type": "string"
            },
            "example": "descending"
          },
          {
            "name": "platform",
            "in": "query",
            "description": "Optional provider to filter swaps by. Defaults to all platforms.",
            "schema": {
              "type": "string"
            },
            "example": "chainflip"
          }
        ],
        "responses": {
          "200": {
            "description": "The swaps.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ChainflipBaas.Status.StatusResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request has invalid information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
                  "title": "Bad Request",
                  "status": 400,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00",
                  "errors": {
                    "property1": [
                      "The property field is required"
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "The partner does not have access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7235#section-3.1",
                  "title": "Unauthorized",
                  "status": 401,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          },
          "500": {
            "description": "An error occurred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.6.1",
                  "title": "Internal Server Error",
                  "status": 500,
                  "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ChainflipBaas.Assets.AssetInfo": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Is the asset available for swapping or not?",
            "example": true
          },
          "id": {
            "type": "string",
            "description": "Unique id of the asset.",
            "example": "flip.eth"
          },
          "direction": {
            "enum": [
              "ingress",
              "egress",
              "both"
            ],
            "type": "string",
            "description": "Direction an asset can be used in. Ingress assets can only be used to swap from. Egress assets can only be used to swap to. Assets with both can be used to swap from and to.",
            "example": "both",
            "x-ms-enum": {
              "name": "AssetDirection",
              "modelAsString": true
            }
          },
          "ticker": {
            "type": "string",
            "description": "Display ticker of the asset.",
            "example": "FLIP"
          },
          "name": {
            "type": "string",
            "description": "Descriptive name of the asset.",
            "example": "Chainflip"
          },
          "network": {
            "type": "string",
            "description": "Name of the network where the asset is located.",
            "example": "Ethereum"
          },
          "contractAddress": {
            "type": "string",
            "description": "The contract address for tokens which have one.",
            "nullable": true,
            "example": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
          },
          "networkLogo": {
            "type": "string",
            "description": "A url to the logo for the network.",
            "readOnly": true,
            "example": "/networks/eth/logo.svg"
          },
          "assetLogo": {
            "type": "string",
            "description": "A url to the logo for the asset.",
            "readOnly": true,
            "example": "/assets/flip.eth/logo.svg"
          },
          "decimals": {
            "type": "integer",
            "description": "Number of decimals the asset native value contains.",
            "format": "int32",
            "example": 18
          },
          "minimalAmount": {
            "type": "number",
            "description": "Minimum amount required to swap the asset.",
            "format": "double",
            "nullable": true,
            "readOnly": true,
            "example": 4
          },
          "minimalAmountNative": {
            "type": "string",
            "description": "Minimum amount in native units required to swap the asset.",
            "nullable": true,
            "readOnly": true,
            "example": "4000000000000000000"
          },
          "usdPrice": {
            "type": "number",
            "description": "Current pool price of the asset in USDC.",
            "format": "double",
            "nullable": true,
            "readOnly": true,
            "example": 4
          },
          "usdPriceNative": {
            "type": "string",
            "description": "Current pool price of the asset in USDC native units.",
            "nullable": true,
            "readOnly": true,
            "example": "4000000000000000000"
          },
          "platforms": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The platform(s) that support this asset. Additive provider indication (FR31) - union of\nevery healthy provider that returned this asset, in registration order (Chainflip first).",
            "readOnly": true,
            "example": [
              "chainflip"
            ]
          }
        },
        "additionalProperties": false
      },
      "ChainflipBaas.Assets.AssetsResponse": {
        "type": "object",
        "properties": {
          "assets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChainflipBaas.Assets.AssetInfo"
            },
            "description": "All available assets.",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "ChainflipBaas.Fees.FeesResponse": {
        "type": "object",
        "properties": {
          "earnedFees": {
            "type": "object",
            "additionalProperties": {
              "type": "number",
              "format": "double"
            },
            "description": "Earned broker fees per asset.",
            "example": {
              "eth.eth": 0.0173436384794928,
              "flip.eth": 10.151732266480410979,
              "usdc.eth": 87.707768,
              "dot.dot": 0.696349455,
              "btc.btc": 0.00044002
            }
          },
          "earnedFeesNative": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Earned broker fees per asset in native units.",
            "example": {
              "eth.eth": "17343638479492800",
              "flip.eth": "10151732266480410979",
              "usdc.eth": "87707768",
              "dot.dot": "6963494550",
              "btc.btc": "44002"
            }
          },
          "byProvider": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ChainflipBaas.Fees.FeesResponse"
            },
            "description": "Additive per-provider breakdown, keyed by platform (see ChainflipBaas.Providers.Platforms).\nPopulated only on the aggregated `/fees` response; null (and omitted from JSON) on the\nper-provider responses returned by M:ChainflipBaas.Providers.ISwapProvider.GetFeesAsync(ChainflipBaas.Providers.FeesRequest,System.Threading.CancellationToken), so the\nbreakdown is exactly one level deep.",
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false,
        "description": "Canonical, provider-agnostic earned-fees response. Each provider maps its own upstream shape\ninto these two dictionaries (e.g. `ChainflipFeesMapper` for the Chainflip RPC payload)."
      },
      "ChainflipBaas.Networks.NetworkInfo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Network id.",
            "readOnly": true,
            "example": "eth"
          },
          "name": {
            "type": "string",
            "description": "Network name.",
            "readOnly": true,
            "example": "Ethereum"
          },
          "logo": {
            "type": "string",
            "description": "A url to the logo for the network.",
            "readOnly": true,
            "example": "/networks/eth/logo.svg"
          },
          "platforms": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The platform(s) that offer at least one asset on this network. Additive provider\nindication (FR40/FR31) - union of supporting platforms in registration order.",
            "example": [
              "chainflip"
            ]
          }
        },
        "additionalProperties": false
      },
      "ChainflipBaas.Networks.NetworksResponse": {
        "type": "object",
        "properties": {
          "networks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChainflipBaas.Networks.NetworkInfo"
            },
            "description": "All available networks.",
            "readOnly": true
          }
        },
        "additionalProperties": false,
        "description": "The /networks response: derives the network list from the merged asset list, so a network\nappears only when it carries at least one visible asset."
      },
      "ChainflipBaas.Quote.BoostQuote": {
        "required": [
          "egressAmount",
          "egressAmountNative",
          "egressAsset",
          "estimatedBoostFeeBps",
          "estimatedDurationSeconds",
          "estimatedDurationsSeconds",
          "estimatedPrice",
          "includedFees",
          "ingressAmount",
          "ingressAmountNative",
          "ingressAsset",
          "lowLiquidityWarning",
          "poolInfo"
        ],
        "type": "object",
        "properties": {
          "ingressAsset": {
            "type": "string",
            "description": "The asset to send.",
            "example": "usdc.eth"
          },
          "ingressAmount": {
            "type": "number",
            "description": "The amount to send.",
            "format": "double",
            "example": 57040
          },
          "ingressAmountNative": {
            "type": "string",
            "description": "The amount to send in native units.",
            "example": "57040000000"
          },
          "intermediateAsset": {
            "type": "string",
            "description": "The asset used as intermediary.",
            "nullable": true,
            "example": "usdc.eth"
          },
          "intermediateAmount": {
            "type": "number",
            "description": "The amount used as intermediary.",
            "format": "double",
            "nullable": true,
            "example": 57040
          },
          "intermediateAmountNative": {
            "type": "string",
            "description": "The amount used as intermediary in native units.",
            "nullable": true,
            "example": "57040000000"
          },
          "egressAsset": {
            "type": "string",
            "description": "The asset to receive.",
            "example": "usdt.eth"
          },
          "egressAmount": {
            "type": "number",
            "description": "The amount to receive.",
            "format": "double",
            "example": 56874.034088
          },
          "egressAmountNative": {
            "type": "string",
            "description": "The amount to receive in native units.",
            "example": "56874034088"
          },
          "includedFees": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChainflipBaas.Quote.QuoteFee"
            },
            "description": "The fee structure, this includes all fees."
          },
          "lowLiquidityWarning": {
            "type": "boolean",
            "description": "A warning in case liquidity is low and there is a risk of high slippage.",
            "example": false
          },
          "poolInfo": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChainflipBaas.Quote.PoolInfo"
            },
            "description": "Liquidity pools involved in the swap, as well as estimated liquidity provider fees."
          },
          "estimatedDurationSeconds": {
            "type": "number",
            "description": "The estimated time the swap will take.",
            "format": "double",
            "example": 114
          },
          "estimatedDurationsSeconds": {
            "$ref": "#/components/schemas/ChainflipBaas.Quote.EstimatedDurationsSeconds"
          },
          "estimatedBoostFeeBps": {
            "type": "number",
            "description": "The estimated fee (in bps) that the user has to pay (from the deposit amount) to get this swap boosted.",
            "format": "double",
            "example": 5
          },
          "estimatedPrice": {
            "type": "number",
            "description": "The estimated price in the destination asset for 1 unit of the source asset. Used for slippage calculations.",
            "format": "double",
            "example": 28.65190870821210905468
          },
          "chunkIntervalBlocks": {
            "type": "integer",
            "description": "The delay between the \"sub-swaps\" of a DCA swap in number of blocks.",
            "format": "int32",
            "nullable": true,
            "example": 2
          },
          "numberOfChunks": {
            "type": "integer",
            "description": "The number of \"sub-swaps\" to perform for a DCA swap.",
            "format": "int32",
            "nullable": true,
            "example": 32
          }
        },
        "additionalProperties": false,
        "description": "An optional quote to have the swap boosted. A plain provider-agnostic DTO built by the\nproducing provider's mapper."
      },
      "ChainflipBaas.Quote.EstimatedDurationsSeconds": {
        "required": [
          "deposit",
          "egress",
          "swap"
        ],
        "type": "object",
        "properties": {
          "deposit": {
            "type": "number",
            "description": "The estimated time for a deposit to be witnessed.",
            "format": "double",
            "example": 600
          },
          "swap": {
            "type": "number",
            "description": "The estimated time for a swap to be fully executed.",
            "format": "double",
            "example": 264
          },
          "egress": {
            "type": "number",
            "description": "The estimated time until the output transaction is included in a block.",
            "format": "double",
            "example": 12
          }
        },
        "additionalProperties": false,
        "description": "Per-stage breakdown of the estimated swap duration: deposit witnessing, swap execution, and\negress inclusion, in seconds. A plain provider-agnostic DTO built by the producing\nprovider's mapper."
      },
      "ChainflipBaas.Quote.PoolFee": {
        "required": [
          "amount",
          "amountNative",
          "asset"
        ],
        "type": "object",
        "properties": {
          "asset": {
            "type": "string",
            "description": "The asset the fee is processed in.",
            "example": "usdc.eth"
          },
          "amount": {
            "type": "number",
            "description": "The fee amount.",
            "format": "double",
            "example": 2.157473
          },
          "amountNative": {
            "type": "string",
            "description": "The fee amount in native units.",
            "example": "2157473"
          }
        },
        "additionalProperties": false,
        "description": "A pool's liquidity-provider fee in human-readable and native form."
      },
      "ChainflipBaas.Quote.PoolInfo": {
        "required": [
          "baseAsset",
          "fee",
          "quoteAsset"
        ],
        "type": "object",
        "properties": {
          "baseAsset": {
            "type": "string",
            "description": "The base asset of the pool involved.",
            "example": "btc.btc"
          },
          "quoteAsset": {
            "type": "string",
            "description": "The quote asset of the pool involved.",
            "example": "usdc.eth"
          },
          "fee": {
            "$ref": "#/components/schemas/ChainflipBaas.Quote.PoolFee"
          }
        },
        "additionalProperties": false,
        "description": "A liquidity pool involved in a quoted swap, with its estimated liquidity-provider fee.\nA plain provider-agnostic DTO built by the producing provider's mapper."
      },
      "ChainflipBaas.Quote.Quote": {
        "required": [
          "egressAmount",
          "egressAmountNative",
          "egressAsset",
          "estimatedDurationSeconds",
          "estimatedDurationsSeconds",
          "estimatedPrice",
          "includedFees",
          "ingressAmount",
          "ingressAmountNative",
          "ingressAsset",
          "lowLiquidityWarning",
          "poolInfo",
          "recommendedSlippageTolerancePercent",
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "enum": [
              "regular",
              "dca"
            ],
            "type": "string",
            "description": "The type of quote.",
            "example": "regular",
            "x-ms-enum": {
              "name": "QuoteType",
              "modelAsString": true
            }
          },
          "ingressAsset": {
            "type": "string",
            "description": "The asset to send.",
            "example": "usdc.eth"
          },
          "ingressAmount": {
            "type": "number",
            "description": "The amount to send.",
            "format": "double",
            "example": 57040
          },
          "ingressAmountNative": {
            "type": "string",
            "description": "The amount to send in native units.",
            "example": "57040000000"
          },
          "intermediateAsset": {
            "type": "string",
            "description": "The asset used as intermediary.",
            "nullable": true,
            "example": "usdc.eth"
          },
          "intermediateAmount": {
            "type": "number",
            "description": "The amount used as intermediary.",
            "format": "double",
            "nullable": true,
            "example": 57040
          },
          "intermediateAmountNative": {
            "type": "string",
            "description": "The amount used as intermediary in native units.",
            "nullable": true,
            "example": "57040000000"
          },
          "egressAsset": {
            "type": "string",
            "description": "The asset to receive.",
            "example": "usdt.eth"
          },
          "egressAmount": {
            "type": "number",
            "description": "The amount to receive.",
            "format": "double",
            "example": 56874.034088
          },
          "egressAmountNative": {
            "type": "string",
            "description": "The amount to receive in native units.",
            "example": "56874034088"
          },
          "includedFees": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChainflipBaas.Quote.QuoteFee"
            },
            "description": "The fee structure, this includes all fees."
          },
          "recommendedSlippageTolerancePercent": {
            "type": "number",
            "description": "Recommended slippage percentage to use when calculating minimum price.",
            "format": "double",
            "example": 2
          },
          "lowLiquidityWarning": {
            "type": "boolean",
            "description": "A warning in case liquidity is low and there is a risk of high slippage.",
            "example": false
          },
          "poolInfo": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChainflipBaas.Quote.PoolInfo"
            },
            "description": "Liquidity pools involved in the swap, as well as estimated liquidity provider fees."
          },
          "estimatedDurationSeconds": {
            "type": "number",
            "description": "The estimated time the swap will take.",
            "format": "double",
            "example": 876
          },
          "estimatedDurationsSeconds": {
            "$ref": "#/components/schemas/ChainflipBaas.Quote.EstimatedDurationsSeconds"
          },
          "estimatedPrice": {
            "type": "number",
            "description": "The estimated price in the destination asset for 1 unit of the source asset. Used for slippage calculations.",
            "format": "double",
            "example": 28.65190870821210905468
          },
          "chunkIntervalBlocks": {
            "type": "integer",
            "description": "The delay between the \"sub-swaps\" of a DCA swap in number of blocks.",
            "format": "int32",
            "nullable": true,
            "example": 2
          },
          "numberOfChunks": {
            "type": "integer",
            "description": "The number of \"sub-swaps\" to perform for a DCA swap.",
            "format": "int32",
            "nullable": true,
            "example": 32
          },
          "boostQuote": {
            "$ref": "#/components/schemas/ChainflipBaas.Quote.BoostQuote"
          },
          "platform": {
            "type": "string",
            "description": "The platform that produced this quote. Additive field (Story 1.3); the quote\naggregator stamps it with the producing provider's platform identifier.",
            "readOnly": true,
            "example": "chainflip"
          }
        },
        "additionalProperties": false,
        "description": "The canonical client-facing quote. A plain provider-agnostic DTO: each provider's mapper\n(e.g. ChainflipQuoteMapper) builds it from that provider's wire response, and the quote\naggregator stamps ChainflipBaas.Quote.Quote.Platform with the producing provider."
      },
      "ChainflipBaas.Quote.QuoteFee": {
        "required": [
          "amount",
          "amountNative",
          "asset",
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "enum": [
              "ingress",
              "broker",
              "network",
              "liquidity",
              "egress",
              "boost",
              "refund"
            ],
            "type": "string",
            "description": "The type of fee.",
            "example": "egress",
            "x-ms-enum": {
              "name": "FeeType",
              "modelAsString": true
            }
          },
          "asset": {
            "type": "string",
            "description": "The asset the fee is processed in.",
            "example": "usdc.eth"
          },
          "amount": {
            "type": "number",
            "description": "The fee amount.",
            "format": "double",
            "example": 2.157473
          },
          "amountNative": {
            "type": "string",
            "description": "The fee amount in native units.",
            "example": "2157473"
          }
        },
        "additionalProperties": false,
        "description": "A single fee line in a quote's includedFees. A plain provider-agnostic DTO built by the\nproducing provider's mapper."
      },
      "ChainflipBaas.Status.AffiliateBroker": {
        "type": "object",
        "properties": {
          "account": {
            "type": "string",
            "readOnly": true
          },
          "commissionBps": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "ChainflipBaas.Status.Boost": {
        "type": "object",
        "properties": {
          "maximumBoostFeeBps": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "effectiveBoostFeeBps": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "readOnly": true
          },
          "boostedAt": {
            "type": "integer",
            "format": "int64",
            "nullable": true,
            "readOnly": true
          },
          "boostedAtDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "readOnly": true
          },
          "boostedBlockIndex": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "skippedAt": {
            "type": "integer",
            "format": "int64",
            "nullable": true,
            "readOnly": true
          },
          "skippedAtDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "readOnly": true
          },
          "skippedBlockIndex": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "ChainflipBaas.Status.CcmParameters": {
        "type": "object",
        "properties": {
          "gasBudget": {
            "type": "string",
            "readOnly": true
          },
          "message": {
            "type": "string",
            "readOnly": true
          },
          "cfParameters": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "ChainflipBaas.Status.ChunkInfo": {
        "type": "object",
        "properties": {
          "inputAmountNative": {
            "type": "string",
            "readOnly": true
          },
          "inputAmount": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "intermediateAmountNative": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "intermediateAmount": {
            "type": "number",
            "format": "double",
            "nullable": true,
            "readOnly": true
          },
          "outputAmountNative": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "outputAmount": {
            "type": "number",
            "format": "double",
            "nullable": true,
            "readOnly": true
          },
          "scheduledAt": {
            "type": "integer",
            "format": "int64",
            "readOnly": true
          },
          "scheduledAtDate": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "scheduledBlockIndex": {
            "type": "string",
            "readOnly": true
          },
          "executedAt": {
            "type": "integer",
            "format": "int64",
            "nullable": true,
            "readOnly": true
          },
          "executedAtDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "readOnly": true
          },
          "executedBlockIndex": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "retryCount": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "ChainflipBaas.Status.Dca": {
        "type": "object",
        "properties": {
          "lastExecutedChunk": {
            "$ref": "#/components/schemas/ChainflipBaas.Status.ChunkInfo"
          },
          "currentChunk": {
            "$ref": "#/components/schemas/ChainflipBaas.Status.ChunkInfo"
          },
          "executedChunks": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "remainingChunks": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "ChainflipBaas.Status.DcaParameters": {
        "type": "object",
        "properties": {
          "numberOfChunks": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "chunkIntervalBlocks": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "ChainflipBaas.Status.Deposit": {
        "type": "object",
        "properties": {
          "amountNative": {
            "type": "string",
            "readOnly": true
          },
          "amount": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "transactionReference": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "transactionConfirmations": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "readOnly": true
          },
          "witnessedAt": {
            "type": "integer",
            "format": "int64",
            "nullable": true,
            "readOnly": true
          },
          "witnessedAtDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "readOnly": true
          },
          "witnessedBlockIndex": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "failure": {
            "$ref": "#/components/schemas/ChainflipBaas.Status.Failure"
          },
          "failedAt": {
            "type": "integer",
            "format": "int64",
            "nullable": true,
            "readOnly": true
          },
          "failedAtDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "readOnly": true
          },
          "failedBlockIndex": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "ChainflipBaas.Status.DepositChannel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true
          },
          "createdAt": {
            "type": "integer",
            "format": "int64",
            "readOnly": true
          },
          "createdAtDate": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "brokerCommissionBps": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "depositAddress": {
            "type": "string",
            "readOnly": true
          },
          "sourceChainExpiryBlock": {
            "type": "string",
            "readOnly": true
          },
          "estimatedExpiryTime": {
            "type": "integer",
            "format": "int64",
            "readOnly": true
          },
          "estimatedExpiryDate": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "expectedDepositAmount": {
            "type": "number",
            "format": "double",
            "nullable": true,
            "readOnly": true
          },
          "expectedDepositAmountNative": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "isExpired": {
            "type": "boolean",
            "readOnly": true
          },
          "openedThroughBackend": {
            "type": "boolean",
            "readOnly": true
          },
          "affiliateBrokers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChainflipBaas.Status.AffiliateBroker"
            },
            "nullable": true,
            "readOnly": true
          },
          "fillOrKillParams": {
            "$ref": "#/components/schemas/ChainflipBaas.Status.FillOrKillParameters"
          },
          "dcaParams": {
            "$ref": "#/components/schemas/ChainflipBaas.Status.DcaParameters"
          }
        },
        "additionalProperties": false
      },
      "ChainflipBaas.Status.Egress": {
        "type": "object",
        "properties": {
          "amountNative": {
            "type": "string",
            "readOnly": true
          },
          "amount": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "scheduledAt": {
            "type": "integer",
            "format": "int64",
            "nullable": true,
            "readOnly": true
          },
          "scheduledAtDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "readOnly": true
          },
          "scheduledBlockIndex": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "transactionReference": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "witnessedAt": {
            "type": "integer",
            "format": "int64",
            "nullable": true,
            "readOnly": true
          },
          "witnessedBlockIndex": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "failure": {
            "$ref": "#/components/schemas/ChainflipBaas.Status.Failure"
          },
          "failedAt": {
            "type": "integer",
            "format": "int64",
            "nullable": true,
            "readOnly": true
          },
          "failedAtDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "readOnly": true
          },
          "failedBlockIndex": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "ChainflipBaas.Status.Failure": {
        "type": "object",
        "properties": {
          "failedAt": {
            "type": "integer",
            "format": "int64",
            "readOnly": true
          },
          "failedAtDate": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "failedBlockIndex": {
            "type": "string",
            "readOnly": true
          },
          "mode": {
            "type": "string",
            "readOnly": true
          },
          "reason": {
            "$ref": "#/components/schemas/ChainflipBaas.Status.Reason"
          }
        },
        "additionalProperties": false
      },
      "ChainflipBaas.Status.FillOrKillParameters": {
        "type": "object",
        "properties": {
          "retryDurationBlocks": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "refundAddress": {
            "type": "string",
            "readOnly": true
          },
          "minimumPrice": {
            "type": "string",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "ChainflipBaas.Status.PaidFee": {
        "type": "object",
        "properties": {
          "type": {
            "enum": [
              "network",
              "ingress",
              "egress",
              "broker",
              "boost",
              "liquidity",
              "refund"
            ],
            "type": "string",
            "readOnly": true,
            "x-ms-enum": {
              "name": "FeeType",
              "modelAsString": true
            }
          },
          "asset": {
            "type": "string",
            "readOnly": true
          },
          "amountNative": {
            "type": "string",
            "readOnly": true
          },
          "amount": {
            "type": "number",
            "format": "double",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "ChainflipBaas.Status.Reason": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "readOnly": true
          },
          "message": {
            "type": "string",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "ChainflipBaas.Status.StatusResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "platform": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ChainflipBaas.Status.SwapStatus"
          }
        },
        "additionalProperties": false
      },
      "ChainflipBaas.Status.Swap": {
        "type": "object",
        "properties": {
          "originalInputAmountNative": {
            "type": "string"
          },
          "originalInputAmount": {
            "type": "number",
            "format": "double"
          },
          "remainingInputAmountNative": {
            "type": "string"
          },
          "remainingInputAmount": {
            "type": "number",
            "format": "double"
          },
          "swappedInputAmountNative": {
            "type": "string"
          },
          "swappedInputAmount": {
            "type": "number",
            "format": "double"
          },
          "swappedIntermediateAmountNative": {
            "type": "string"
          },
          "swappedIntermediateAmount": {
            "type": "number",
            "format": "double"
          },
          "swappedOutputAmountNative": {
            "type": "string"
          },
          "swappedOutputAmount": {
            "type": "number",
            "format": "double"
          },
          "regular": {
            "$ref": "#/components/schemas/ChainflipBaas.Status.ChunkInfo"
          },
          "dca": {
            "$ref": "#/components/schemas/ChainflipBaas.Status.Dca"
          }
        },
        "additionalProperties": false
      },
      "ChainflipBaas.Status.SwapStatus": {
        "type": "object",
        "properties": {
          "state": {
            "enum": [
              "waiting",
              "receiving",
              "swapping",
              "sending",
              "sent",
              "completed",
              "failed"
            ],
            "type": "string",
            "readOnly": true,
            "x-ms-enum": {
              "name": "SwapState",
              "modelAsString": true
            }
          },
          "swapId": {
            "type": "string",
            "readOnly": true
          },
          "sourceAsset": {
            "type": "string",
            "readOnly": true
          },
          "destinationAsset": {
            "type": "string",
            "readOnly": true
          },
          "destinationAddress": {
            "type": "string",
            "readOnly": true
          },
          "depositChannel": {
            "$ref": "#/components/schemas/ChainflipBaas.Status.DepositChannel"
          },
          "fillOrKillParams": {
            "$ref": "#/components/schemas/ChainflipBaas.Status.FillOrKillParameters"
          },
          "brokers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChainflipBaas.Status.AffiliateBroker"
            },
            "nullable": true,
            "readOnly": true
          },
          "dcaParams": {
            "$ref": "#/components/schemas/ChainflipBaas.Status.DcaParameters"
          },
          "fallbackEgress": {
            "$ref": "#/components/schemas/ChainflipBaas.Status.Egress"
          },
          "ccmParams": {
            "$ref": "#/components/schemas/ChainflipBaas.Status.CcmParameters"
          },
          "boost": {
            "$ref": "#/components/schemas/ChainflipBaas.Status.Boost"
          },
          "estimatedDurationSeconds": {
            "type": "number",
            "format": "double",
            "nullable": true,
            "readOnly": true
          },
          "sourceChainRequiredBlockConfirmations": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "readOnly": true
          },
          "fees": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChainflipBaas.Status.PaidFee"
            },
            "nullable": true,
            "readOnly": true
          },
          "deposit": {
            "$ref": "#/components/schemas/ChainflipBaas.Status.Deposit"
          },
          "swap": {
            "$ref": "#/components/schemas/ChainflipBaas.Status.Swap"
          },
          "swapEgress": {
            "$ref": "#/components/schemas/ChainflipBaas.Status.Egress"
          },
          "refundEgress": {
            "$ref": "#/components/schemas/ChainflipBaas.Status.Egress"
          },
          "lastStateChainUpdateAt": {
            "type": "integer",
            "format": "int64",
            "nullable": true,
            "readOnly": true
          },
          "lastStateChainUpdateAtDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "ChainflipBaas.Swap.AdvancedSwapRequest": {
        "type": "object",
        "properties": {
          "ccmPayload": {
            "$ref": "#/components/schemas/ChainflipBaas.Swap.CcmRequest"
          }
        },
        "additionalProperties": false
      },
      "ChainflipBaas.Swap.CcmRequest": {
        "required": [
          "gas_budget",
          "message"
        ],
        "type": "object",
        "properties": {
          "gas_budget": {
            "minLength": 1,
            "pattern": "^[0-9]+$",
            "type": "string",
            "description": "Gas budget for the call on the destination chain. This amount is based on the source asset and will be subtracted from the input amount and swapped to pay for gas.",
            "example": "100000"
          },
          "message": {
            "maxLength": 20002,
            "minLength": 0,
            "pattern": "^0x[0-9a-fA-F]*$",
            "type": "string",
            "description": "Hex-encoded message that is passed to the destination address on the destination chain. The message should be shorter than 10k bytes.",
            "example": "0xdeadc0de"
          }
        },
        "additionalProperties": false,
        "description": "Cross-Chain Messaging payload. More details can be found at https://docs.chainflip.io/swapping/integrations/advanced/cross-chain-messaging/cross-chain-messaging"
      },
      "ChainflipBaas.Swap.DepositAddress": {
        "required": [
          "address",
          "channelId",
          "channelOpeningFee",
          "channelOpeningFeeNative",
          "explorerUrl",
          "issuedBlock",
          "network",
          "sourceExpiryBlock"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The swap id used to follow up status. Set by the caller once the swap row is saved.",
            "format": "int32",
            "nullable": true,
            "example": 42
          },
          "address": {
            "type": "string",
            "description": "The deposit address to send source assets to.",
            "example": "0x8127c88e8b5a92917486bc68a4b481befab12534"
          },
          "issuedBlock": {
            "type": "integer",
            "description": "The block in which the deposit address was issued.",
            "format": "int64",
            "example": 1504251
          },
          "network": {
            "type": "string",
            "description": "The network to send the source assets over.",
            "example": "Ethereum"
          },
          "channelId": {
            "type": "integer",
            "description": "The channel id to monitor the deposit.",
            "format": "int64",
            "example": 107
          },
          "sourceExpiryBlock": {
            "type": "integer",
            "description": "The block (on the source network) in which the deposit address will expire.",
            "format": "int64",
            "example": 850819
          },
          "explorerUrl": {
            "type": "string",
            "description": "The explorer url to monitor the deposit.",
            "example": "https://scan.chainflip.io/channels/1504251-Ethereum-107"
          },
          "channelOpeningFee": {
            "type": "number",
            "description": "Fee in $FLIP to open the deposit channel.",
            "format": "double",
            "example": 0
          },
          "channelOpeningFeeNative": {
            "type": "string",
            "description": "Fee in $FLIP flipperinos to open the deposit channel.",
            "example": "0"
          }
        },
        "additionalProperties": false,
        "description": "Canonical deposit-address result returned by M:ChainflipBaas.Providers.ISwapProvider.InitiateSwapAsync(ChainflipBaas.Providers.SwapRequest,System.Threading.CancellationToken).\nA plain provider-agnostic DTO built by the producing provider's mapper (e.g.\nChainflipDepositAddressMapper); this is the public swap-initiation response type."
      },
      "ChainflipBaas.SwapsFeed.FeedStatusResponse": {
        "type": "object",
        "properties": {
          "feedId": {
            "type": "integer",
            "format": "int32"
          },
          "swapId": {
            "type": "integer",
            "format": "int32"
          },
          "platform": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ChainflipBaas.Status.SwapStatus"
          }
        },
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.Mvc.ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "A URI reference [RFC3986] that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028]). When this member is not present, its value is assumed to be \"about:blank\".",
            "nullable": true
          },
          "title": {
            "type": "string",
            "description": "A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization(e.g., using proactive content negotiation; see[RFC7231], Section 3.4).",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "description": "The HTTP status code([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "description": "A human-readable explanation specific to this occurrence of the problem.",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "description": "A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.",
            "nullable": true
          },
          "code": {
            "type": "string",
            "description": "A stable, machine-readable error code (lowercase snake_case, e.g. \"asset_disabled\") identifying why the request failed, so clients can branch without matching the human-readable `detail` text. The HTTP status follows the code: 400 when the request as sent cannot be fulfilled, 503 for a temporary upstream condition, 500 when unclassified. Omitted when the failure has no classification. Clients must tolerate both an omitted code and unrecognised future values. See the Error codes reference: https://docs.chainflip-broker.io/features/error-codes",
            "example": "asset_disabled"
          }
        },
        "additionalProperties": {
          "description": "Problem type definitions MAY extend the problem details object with additional members. Extension members appear in the same namespace as other members of a problem type."
        }
      },
      "Microsoft.AspNetCore.Mvc.ValidationProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "A URI reference [RFC3986] that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028]). When this member is not present, its value is assumed to be \"about:blank\".",
            "nullable": true
          },
          "title": {
            "type": "string",
            "description": "A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization(e.g., using proactive content negotiation; see[RFC7231], Section 3.4).",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "description": "The HTTP status code([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "description": "A human-readable explanation specific to this occurrence of the problem.",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "description": "A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.",
            "nullable": true
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "The validation errors associated with this problem details."
          }
        },
        "additionalProperties": {
          "description": "Problem type definitions MAY extend the problem details object with additional members. Extension members appear in the same namespace as other members of a problem type."
        }
      }
    }
  },
  "tags": [
    {
      "name": "Assets"
    },
    {
      "name": "Fees"
    },
    {
      "name": "Networks"
    },
    {
      "name": "Quote"
    },
    {
      "name": "Rpc"
    },
    {
      "name": "Status"
    },
    {
      "name": "Swap"
    },
    {
      "name": "Swaps"
    }
  ]
}