{
  "openapi": "3.1.0",
  "info": {
    "title": "Ospree Address Analytics API",
    "version": "2.0.0",
    "x-ospree-baseline": {
      "legacy_repo": "blockchain_analytics_address",
      "legacy_ref": "main",
      "legacy_sha": "5b43e39ad8595b149f4c830258285ae597877bec",
      "rendered_by": "scripts/export_openapi.py @ develop (blob 39b6455791e8f8e9d7367ed0ee79c99a6f55a072)",
      "api_prefix": "/api",
      "surface": "/api/v2/ only \u2014 see scripts/legacy_baseline.py",
      "adr": "ADR-0035"
    }
  },
  "paths": {
    "/api/v2/analytics/chains/{chain}/addresses/{address}/details": {
      "get": {
        "tags": [
          "v2"
        ],
        "summary": "Get Address Verification Details",
        "operationId": "Get_address_verification_details_api_v2_analytics_chains__chain__addresses__address__details_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Address"
            }
          },
          {
            "name": "chain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Chain"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/analytics/chains/{chain}/addresses/{address}": {
      "post": {
        "tags": [
          "v2"
        ],
        "summary": "Screen An Address",
        "description": "Screen address hashes to identify potential irregularities or suspicious activities within the \n        blockchain ecosystem, gaining detailed insights into associated entities and flagged risk indicators.",
        "operationId": "Screen_an_address_api_v2_analytics_chains__chain__addresses__address__post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "chain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "title": "Blockchain network name",
              "description": "Blockchain network name."
            },
            "description": "Blockchain network name.",
            "example": "bitcoin"
          },
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "description": "Unique blockchain identifier.",
              "title": "Address"
            },
            "description": "Unique blockchain identifier.",
            "example": "1JjYpRXfPntVEJqAjxsYmvFjjJBdJyaJ2k"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScreenAddressRequestCom"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "v2"
        ],
        "summary": "Retrieve An Address",
        "description": "Returns an screening result for the requesting address hash or referral id.",
        "operationId": "Retrieve_an_address_api_v2_analytics_chains__chain__addresses__address__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "chain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Blockchain network name.",
              "title": "Chain"
            },
            "description": "Blockchain network name.",
            "example": "bitcoin"
          },
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Unique blockchain identifier.",
              "title": "Address"
            },
            "description": "Unique blockchain identifier.",
            "example": "1JjYpRXfPntVEJqAjxsYmvFjjJBdJyaJ2k"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/analytics/chains/{chain}/addresses": {
      "get": {
        "tags": [
          "v2"
        ],
        "summary": "List All Addresses",
        "description": "Retrieve the paginated list of address screening results based on the requesting business identity",
        "operationId": "List_all_addresses_api_v2_analytics_chains__chain__addresses_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "chain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Blockchain network name.",
              "example": {
                "all": {
                  "summary": "All networks",
                  "description": "All networks",
                  "value": "all"
                },
                "bitcoin": {
                  "summary": "Bitcoin network",
                  "description": "Bitcoin network",
                  "value": "bitcoin"
                }
              },
              "title": "Chain"
            },
            "description": "Blockchain network name."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 30,
              "title": "Size"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Sort"
            }
          },
          {
            "name": "start_range",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Range"
            }
          },
          {
            "name": "end_range",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Range"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/analytics/verification/chains/{chain}/addresses/{address}": {
      "post": {
        "tags": [
          "v2"
        ],
        "summary": "Request For Wallet Verification",
        "operationId": "Request_for_wallet_verification_api_v2_analytics_verification_chains__chain__addresses__address__post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "title": "Address"
            }
          },
          {
            "name": "chain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "title": "Chain"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/RequestVerificationRequestCom"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Params"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "RequestVerificationRequestCom": {
        "properties": {
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "callback_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Callback Url"
          }
        },
        "type": "object",
        "title": "RequestVerificationRequestCom"
      },
      "ScreenAddressRequestCom": {
        "properties": {
          "scan_for_risk": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scan For Risk",
            "description": "Whether to scan for risk when creating new address",
            "default": false
          },
          "provider_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider Name",
            "description": "The name of the risk provider"
          },
          "is_self_hosted": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Self Hosted",
            "description": "Whether the wallet is self-hosted",
            "default": false
          },
          "account_ref_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Ref Id",
            "description": "The reference ID of the account"
          },
          "link_type": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Link Type",
            "description": "The type of link",
            "default": 1
          }
        },
        "type": "object",
        "title": "ScreenAddressRequestCom"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "HTTPBearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}
