{
  "openapi": "3.0.3",
  "info": {
    "title": "Mintmark API",
    "version": "1.0.0",
    "description": "Exact-contract identities for tokenized stocks on BNB Smart Chain (Ondo, bStocks, xStocks). Read-only, no key needed. Within v1, fields may be added but are never renamed or removed. Limit: 120 requests a minute per client; use POST /v1/tokens/lookup for many addresses. Terms: https://mintmark.nuvixes.studio/terms"
  },
  "servers": [
    {
      "url": "https://mintmark.nuvixes.studio"
    }
  ],
  "paths": {
    "/v1/tokens/{chainId}/{address}": {
      "get": {
        "summary": "One token by exact contract",
        "parameters": [
          {
            "name": "chainId",
            "in": "path",
            "required": true,
            "description": "Only 56 (BNB Smart Chain) in v1.",
            "schema": {
              "type": "string",
              "enum": [
                "56"
              ]
            }
          },
          {
            "name": "address",
            "in": "path",
            "required": true,
            "description": "Exact contract address, any letter case.",
            "schema": {
              "type": "string",
              "pattern": "^0x[0-9a-fA-F]{40}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The registered token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "apiVersion": {
                          "type": "string"
                        },
                        "catalogSnapshotAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "token": {
                      "$ref": "#/components/schemas/Token"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "unsupported_chain or invalid_address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_registered, or pending_review when a provider published it after the last registry review",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tokens/lookup": {
      "post": {
        "summary": "Many tokens by exact contract (up to 100)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "addresses"
                ],
                "properties": {
                  "addresses": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "example": {
                "addresses": [
                  "0xa9ee28c80f960b889dfbd1902055218cba016f75"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "One result per address, in the order sent",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "apiVersion": {
                          "type": "string"
                        },
                        "catalogSnapshotAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/LookupResult"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "invalid_body, invalid_json or too_many_addresses",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "body_too_large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tokens": {
      "get": {
        "summary": "Search or list tokens",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 120
            },
            "description": "Company, ticker, symbol, keyword or contract"
          },
          {
            "name": "provider",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "ondo",
                "bstock",
                "xstock"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of tokens",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "apiVersion": {
                          "type": "string"
                        },
                        "catalogSnapshotAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "tokens": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Token"
                      }
                    },
                    "total": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "nextOffset": {
                      "type": "integer",
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "invalid query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/companies/{ticker}": {
      "get": {
        "summary": "Every product for one underlying stock",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "NVDA"
          }
        ],
        "responses": {
          "200": {
            "description": "The company and its token products",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "apiVersion": {
                          "type": "string"
                        },
                        "catalogSnapshotAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "company": {
                      "type": "object",
                      "properties": {
                        "ticker": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "products": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Token"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "company_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/check/{chainId}/{address}": {
      "get": {
        "summary": "Check any contract, including ones not in the registry",
        "description": "Reads an unregistered contract onchain and lists registered products it could be mistaken for.",
        "parameters": [
          {
            "name": "chainId",
            "in": "path",
            "required": true,
            "description": "Only 56 (BNB Smart Chain) in v1.",
            "schema": {
              "type": "string",
              "enum": [
                "56"
              ]
            }
          },
          {
            "name": "address",
            "in": "path",
            "required": true,
            "description": "Exact contract address, any letter case.",
            "schema": {
              "type": "string",
              "pattern": "^0x[0-9a-fA-F]{40}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A verdict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Check"
                }
              }
            }
          },
          "400": {
            "description": "unsupported_chain or invalid_address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "chain_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports": {
      "get": {
        "summary": "Daily change reports, newest first",
        "responses": {
          "200": {
            "description": "Report index",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "apiVersion": {
                          "type": "string"
                        },
                        "catalogSnapshotAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "reports": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports/{date}": {
      "get": {
        "summary": "One daily report",
        "parameters": [
          {
            "name": "date",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "YYYY-MM-DD, or latest"
          }
        ],
        "responses": {
          "200": {
            "description": "The report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {
                        "apiVersion": {
                          "type": "string"
                        },
                        "catalogSnapshotAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "docs": {
                          "type": "string"
                        }
                      }
                    },
                    "report": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "invalid_date",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "report_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/health": {
      "get": {
        "summary": "Service status and data freshness per provider",
        "responses": {
          "200": {
            "description": "Status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Token": {
        "type": "object",
        "required": [
          "id",
          "chainId",
          "address",
          "symbol",
          "provider",
          "underlying"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "56:0xa9ee28c80f960b889dfbd1902055218cba016f75"
          },
          "chainId": {
            "type": "integer",
            "example": 56
          },
          "address": {
            "type": "string"
          },
          "symbol": {
            "type": "string",
            "example": "NVDAon"
          },
          "name": {
            "type": "string",
            "description": "Name the contract reports onchain"
          },
          "provider": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "enum": [
                  "ondo",
                  "bstock",
                  "xstock"
                ]
              },
              "name": {
                "type": "string"
              },
              "issuer": {
                "type": "string"
              },
              "publishedName": {
                "type": "string",
                "nullable": true
              }
            }
          },
          "underlying": {
            "type": "object",
            "properties": {
              "ticker": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "assetType": {
                "type": "string",
                "nullable": true
              }
            }
          },
          "tradingStatus": {
            "type": "object",
            "description": "Provider-published halt status; xStocks only today",
            "properties": {
              "halted": {
                "type": "boolean"
              },
              "checkedAt": {
                "type": "string",
                "format": "date-time"
              },
              "source": {
                "type": "string"
              }
            },
            "nullable": true
          },
          "venues": {
            "type": "object",
            "properties": {
              "binanceSpotPair": {
                "type": "string",
                "nullable": true
              }
            }
          },
          "sourceNameDifference": {
            "type": "string",
            "nullable": true
          },
          "links": {
            "type": "object",
            "properties": {
              "record": {
                "type": "string"
              },
              "explorer": {
                "type": "string"
              },
              "issuerTerms": {
                "type": "string",
                "nullable": true
              },
              "source": {
                "type": "string",
                "nullable": true
              }
            }
          },
          "observedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "recordVersion": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "LookupResult": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "registered",
              "pending_review",
              "not_registered",
              "invalid_address"
            ]
          },
          "token": {
            "$ref": "#/components/schemas/Token",
            "nullable": true
          },
          "published": {
            "type": "object"
          }
        }
      },
      "Check": {
        "type": "object",
        "properties": {
          "verdict": {
            "type": "string",
            "enum": [
              "registered",
              "pending_review",
              "impersonation_risk",
              "related_unregistered",
              "unknown",
              "no_contract"
            ]
          },
          "address": {
            "type": "string"
          },
          "token": {
            "$ref": "#/components/schemas/Token"
          },
          "onchain": {
            "type": "object"
          },
          "lookalikes": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
