{
  "openapi": "3.1.0",
  "info": {
    "title": "USDT.Lawyer USDT blacklist and OFAC SDN screening API",
    "version": "2026-11-09",
    "summary": "Free Tether USDT blacklist and OFAC SDN address screening. No key, no sign-up.",
    "description": "The free, public endpoints of https://usdt.lawyer, described as the server runs them.\n\n- **Blacklist lookup** (`POST /api/check/lookup`): whether Tether's USDT contract on TRON or Ethereum lists the address as blacklisted (`getBlackListStatus`, read when you call; a reading is reused for up to 2 minutes), and the freeze, unfreeze and burn events the USDT.Lawyer index holds for it.\n- **OFAC SDN check** (`GET /api/sanctions/ofac/check`): an exact match against the crypto addresses on the OFAC SDN list, read from OFAC's Sanctions List Service export SDN.XML; the server checks for a new file every 24 hours.\n\n**Not provided:** no risk score, no tracing or counterparty exposure, no network other than TRON and Ethereum for the blacklist, no sanctions list other than OFAC SDN. An answer is not a compliance decision, a certificate or legal advice.\n\n**Access:** no authentication of any kind; no version prefix; no CORS headers (call it from a server); no SLA and no published quota. The lookup reads the contract for at most about 30 TRON or Ethereum lookups a minute per caller (a lookup answered from the 2-minute cache counts too), and all callers share one budget per network: over either, the lookup still answers, from the index, with `onchain: \"unknown\"`. Treat `unknown` as not checked, never as clean.\n\nOther paths under `/api/` serve the site's own pages and forms; they are not part of this API and can change without notice.\n\nUSDT.Lawyer is not affiliated with Tether or OFAC. Human-readable reference: https://usdt.lawyer/docs.",
    "contact": {
      "name": "USDT.Lawyer",
      "url": "https://usdt.lawyer/api"
    }
  },
  "externalDocs": {
    "description": "API reference",
    "url": "https://usdt.lawyer/docs"
  },
  "servers": [
    {
      "url": "https://usdt.lawyer"
    }
  ],
  "security": [],
  "tags": [
    {
      "name": "USDT screening",
      "description": "Tether USDT blacklist status and history, OFAC SDN address match."
    },
    {
      "name": "Sanctions list",
      "description": "The crypto addresses on the OFAC SDN list."
    },
    {
      "name": "Wallet",
      "description": "Balances read from the chain. Not a screening check."
    },
    {
      "name": "Data exports",
      "description": "The USDT blacklist event index as CSV."
    }
  ],
  "paths": {
    "/api/check/lookup": {
      "post": {
        "tags": [
          "USDT screening"
        ],
        "operationId": "lookupBlacklist",
        "summary": "Tether USDT blacklist status and freeze history of one address",
        "description": "The current status comes from `getBlackListStatus` on Tether's USDT contract (TRON TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t, Ethereum 0xdAC17F958D2ee523a2206206994597C13D831ec7); the history, dates and amounts from the USDT.Lawyer index of blacklist events, which has known gaps (https://usdt.lawyer/methodology). For an address whose indexed events are all Circle USDC (Blacklisted/UnBlacklisted), `status` and `token` are the index's USDC record: Circle's contract is not read, and `onchain` is still Tether's USDT reading. When `onchain` is \"unknown\", `status` is the index's USDT state if it shows a freeze in force, otherwise \"unknown\". Send the body as JSON with `Content-Type: application/json`; without it the body is not read and the answer is 400. When the index holds no event for the address, a `not_found` or `unknown` answer carries only `status`, `events` (empty) and the five on-chain fields. An `unknown` answer for an address the index does hold events for (the contract was not read and the index shows no freeze in force) carries the full record: address, network, token, firstSeen, lastSeen, frozenBalance, burnedAmount, eventCount and events.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LookupRequest"
              },
              "example": {
                "network": "TRC20",
                "address": "TNXoiAJ3dct8Fjg4M9fkLFh9S2v9TXc32G"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The verdict. Live answers of 9 November 2026.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LookupResponse"
                },
                "examples": {
                  "notBlacklisted": {
                    "summary": "TNXoiAJ3dct8Fjg4M9fkLFh9S2v9TXc32G: not blacklisted, no event",
                    "value": {
                      "status": "not_found",
                      "events": [],
                      "onchain": false,
                      "checkedOnChainAt": "2026-11-09T17:56:23.758Z",
                      "indexStatus": "not_found",
                      "mismatch": null,
                      "explorerUrl": "https://tronscan.org/#/address/TNXoiAJ3dct8Fjg4M9fkLFh9S2v9TXc32G"
                    }
                  },
                  "frozenNotInIndex": {
                    "summary": "TJCBpxZ3yC7C7oegSRZMFxBcscmUVeSA36: blacklisted by the contract, the freeze is in a gap of the index",
                    "value": {
                      "status": "frozen",
                      "address": "TJCBpxZ3yC7C7oegSRZMFxBcscmUVeSA36",
                      "network": "TRX",
                      "token": "USDT",
                      "frozenBalance": 0,
                      "burnedAmount": 0,
                      "eventCount": 0,
                      "events": [],
                      "onchain": true,
                      "checkedOnChainAt": "2026-11-09T17:56:27.532Z",
                      "indexStatus": "not_found",
                      "mismatch": "not_in_index",
                      "explorerUrl": "https://tronscan.org/#/address/TJCBpxZ3yC7C7oegSRZMFxBcscmUVeSA36"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/LookupInvalidAddress"
          },
          "500": {
            "$ref": "#/components/responses/LookupInternalError"
          }
        }
      }
    },
    "/api/sanctions/ofac/check": {
      "get": {
        "tags": [
          "USDT screening"
        ],
        "operationId": "checkOfacSdn",
        "summary": "One address against the OFAC SDN list",
        "description": "Exact match, as on OFAC's own search: `0x` hex and bech32 addresses are compared in lower case, base58 addresses (TRON, Bitcoin legacy) as written. Every currency tag on the list is matched. `listed: false` is not a clearance: OFAC says its address listings are not likely to be exhaustive. An OFAC listing is the U.S. government's action, not a finding of USDT.Lawyer. Answered from the copy in memory, with no per-caller cap.",
        "parameters": [
          {
            "name": "address",
            "in": "query",
            "required": true,
            "description": "Any crypto address, at most 128 characters; trimmed, not format-checked.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "example": "TJCBpxZ3yC7C7oegSRZMFxBcscmUVeSA36"
          }
        ],
        "responses": {
          "200": {
            "description": "The verdict against the copy of the list the server holds. Sent with `Cache-Control: no-cache`. Live answers of 9 November 2026.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfacScreen"
                },
                "examples": {
                  "notListed": {
                    "summary": "TNXoiAJ3dct8Fjg4M9fkLFh9S2v9TXc32G",
                    "value": {
                      "ok": true,
                      "listed": false,
                      "hits": [],
                      "publishDate": "2026-11-06",
                      "checkedAt": "2026-11-09T17:32:39.912Z",
                      "baselineDate": "2026-11-06"
                    }
                  },
                  "listed": {
                    "summary": "TJCBpxZ3yC7C7oegSRZMFxBcscmUVeSA36",
                    "value": {
                      "ok": true,
                      "listed": true,
                      "hits": [
                        {
                          "list": "OFAC SDN",
                          "address": "TJCBpxZ3yC7C7oegSRZMFxBcscmUVeSA36",
                          "currency": "USDT",
                          "uid": 58409,
                          "entity": null,
                          "type": "Individual",
                          "programs": [
                            "IRAN-EO13902"
                          ],
                          "firstSeen": null,
                          "entryUrl": "https://sanctionssearch.ofac.treas.gov/Details.aspx?id=58409"
                        }
                      ],
                      "publishDate": "2026-11-06",
                      "checkedAt": "2026-11-09T17:32:39.912Z",
                      "baselineDate": "2026-11-06"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/OfacInvalidAddress"
          },
          "503": {
            "$ref": "#/components/responses/OfacUnavailable"
          }
        }
      }
    },
    "/api/sanctions/ofac": {
      "get": {
        "tags": [
          "Sanctions list"
        ],
        "operationId": "listOfacSdn",
        "summary": "Every crypto address on the OFAC SDN list",
        "parameters": [
          {
            "$ref": "#/components/parameters/Currency"
          }
        ],
        "responses": {
          "200": {
            "description": "The reading of OFAC's file, its summary and its rows. `Cache-Control: public, max-age=3600`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfacList"
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/OfacUnavailable"
          }
        }
      }
    },
    "/api/sanctions/ofac.csv": {
      "get": {
        "tags": [
          "Sanctions list"
        ],
        "operationId": "listOfacSdnCsv",
        "summary": "The OFAC SDN crypto addresses as CSV",
        "parameters": [
          {
            "$ref": "#/components/parameters/Currency"
          }
        ],
        "responses": {
          "200": {
            "description": "Columns: address, currency, match_key, sdn_uid, sdn_name, sdn_type, programs (separated by `;`), first_seen_file_date, wallet_page, list_publish_date. CRLF line ends. `Cache-Control: public, max-age=3600`.",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "No copy of the list is loaded yet. Plain text; wait 600 seconds before retrying.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/wallet/info": {
      "get": {
        "tags": [
          "Wallet"
        ],
        "operationId": "walletInfo",
        "summary": "Current USDT and native-coin balance of an address",
        "description": "Read from the chain on TRON, Ethereum, Solana or TON and cached for 60 seconds. Answers HTTP 200 even when it fails, with `ok: false` and a `reason`. Not a screening check.",
        "parameters": [
          {
            "name": "network",
            "in": "query",
            "required": true,
            "description": "TRC20, ERC20, SOL or TON; also TRX, TRON, ETH, ETHEREUM and SOLANA, in any case.",
            "schema": {
              "type": "string"
            },
            "example": "TRC20"
          },
          {
            "name": "address",
            "in": "query",
            "required": true,
            "description": "The address in that network's format.",
            "schema": {
              "type": "string"
            },
            "example": "TNXoiAJ3dct8Fjg4M9fkLFh9S2v9TXc32G"
          }
        ],
        "responses": {
          "200": {
            "description": "The balances, or the reason there are none. Live answer of 9 November 2026 for the example.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletInfoResponse"
                },
                "examples": {
                  "ok": {
                    "value": {
                      "ok": true,
                      "info": {
                        "network": "TRC20",
                        "address": "TNXoiAJ3dct8Fjg4M9fkLFh9S2v9TXc32G",
                        "usdtBalance": 1456.420546,
                        "nativeBalance": 143.91021,
                        "totalTxCount": 52959066,
                        "lastActivity": "2026-11-05T20:29:09.000Z",
                        "nativeSymbol": "TRX",
                        "explorerUrl": "https://tronscan.org/#/address/TNXoiAJ3dct8Fjg4M9fkLFh9S2v9TXc32G"
                      }
                    }
                  },
                  "unsupported": {
                    "value": {
                      "ok": false,
                      "info": null,
                      "reason": "unsupported"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/export/events.csv": {
      "get": {
        "tags": [
          "Data exports"
        ],
        "operationId": "exportEvents",
        "summary": "Every indexed USDT freeze, unfreeze and burn event",
        "description": "USDT only (Tether's contracts on TRON and Ethereum), oldest first. Columns: time_utc, network, event, address, amount_usdt, tx_hash, block_time_utc.",
        "parameters": [
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The ETag of a copy you hold."
          }
        ],
        "responses": {
          "200": {
            "description": "The file.",
            "headers": {
              "Cache-Control": {
                "description": "public, max-age=600",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Send it back in If-None-Match: an unchanged file answers 304 with no body.",
                "schema": {
                  "type": "string"
                }
              },
              "Last-Modified": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Data-As-Of": {
                "description": "The time of the newest event in the index when the file was built (the index's latest event time, ISO 8601 UTC); Last-Modified carries the same moment. It is not the time of your request or of the read.",
                "schema": {
                  "type": "string"
                }
              },
              "Content-Disposition": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the If-None-Match ETag is the current file's."
          },
          "500": {
            "$ref": "#/components/responses/ExportInternalError"
          }
        }
      }
    },
    "/api/export/unfreezes.csv": {
      "get": {
        "tags": [
          "Data exports"
        ],
        "operationId": "exportUnfreezes",
        "summary": "Every USDT unfreeze paired with the freeze it lifted",
        "description": "Columns: unfrozen_at_utc, network, address, usdt_at_unfreeze, frozen_at_utc, days_frozen, usdt_at_freeze, unfreeze_tx, freeze_tx.",
        "parameters": [
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The ETag of a copy you hold."
          }
        ],
        "responses": {
          "200": {
            "description": "The file.",
            "headers": {
              "Cache-Control": {
                "description": "public, max-age=600",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Send it back in If-None-Match: an unchanged file answers 304 with no body.",
                "schema": {
                  "type": "string"
                }
              },
              "Last-Modified": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Data-As-Of": {
                "description": "The time of the newest event in the index when the file was built (the index's latest event time, ISO 8601 UTC); Last-Modified carries the same moment. It is not the time of your request or of the read.",
                "schema": {
                  "type": "string"
                }
              },
              "Content-Disposition": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the If-None-Match ETag is the current file's."
          },
          "500": {
            "$ref": "#/components/responses/ExportInternalError"
          }
        }
      }
    },
    "/api/export/reports/{file}": {
      "get": {
        "tags": [
          "Data exports"
        ],
        "operationId": "exportReportPeriod",
        "summary": "The USDT blacklist events of one published report day or month",
        "description": "Same columns as /api/export/events.csv. Only periods that have a published report page (https://usdt.lawyer/reports) have a file.",
        "parameters": [
          {
            "name": "file",
            "in": "path",
            "required": true,
            "description": "`<yyyy-mm>.csv` or `<yyyy-mm-dd>.csv`.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}(-\\d{2})?\\.csv$"
            },
            "example": "2026-10.csv"
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The ETag of a copy you hold."
          }
        ],
        "responses": {
          "200": {
            "description": "The file.",
            "headers": {
              "Cache-Control": {
                "description": "public, max-age=600",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "Send it back in If-None-Match: an unchanged file answers 304 with no body.",
                "schema": {
                  "type": "string"
                }
              },
              "Last-Modified": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Data-As-Of": {
                "description": "The time of the newest event in the index when the file was built (the index's latest event time, ISO 8601 UTC); Last-Modified carries the same moment. It is not the time of your request or of the read.",
                "schema": {
                  "type": "string"
                }
              },
              "Content-Disposition": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the If-None-Match ETag is the current file's."
          },
          "404": {
            "description": "No published report for that period.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportNotFound"
                },
                "example": {
                  "error": "not_found"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ExportInternalError"
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "Currency": {
        "name": "currency",
        "in": "query",
        "required": false,
        "description": "Comma-separated currency tags (USDT, TRX, ETH, XBT…), any case. Filters the rows, not the summary.",
        "schema": {
          "type": "string"
        },
        "example": "USDT,TRX"
      }
    },
    "responses": {
      "ExportInternalError": {
        "description": "The index could not be read. Try again later.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LookupError"
            },
            "example": {
              "error": "internal_error"
            }
          }
        }
      },
      "LookupInvalidAddress": {
        "description": "The address is missing, shorter than 10 characters, malformed or not in the format of the network sent, or the body was sent without `Content-Type: application/json`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LookupError"
            },
            "example": {
              "error": "invalid_address"
            }
          }
        }
      },
      "LookupInternalError": {
        "description": "The server could not answer, for example the index could not be read or the body was not valid JSON. Try again later.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LookupError"
            },
            "example": {
              "error": "internal_error"
            }
          }
        }
      },
      "OfacInvalidAddress": {
        "description": "The address is missing or longer than 128 characters.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/OfacError"
            },
            "example": {
              "ok": false,
              "error": "invalid_address"
            }
          }
        }
      },
      "OfacUnavailable": {
        "description": "No copy of the list is loaded yet (only right after a first start). Sent with `Cache-Control: no-store` and a 600-second retry header.",
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait: 600.",
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/OfacError"
            },
            "example": {
              "ok": false,
              "error": "unavailable"
            }
          }
        }
      }
    },
    "schemas": {
      "LookupRequest": {
        "type": "object",
        "required": [
          "address"
        ],
        "properties": {
          "network": {
            "type": "string",
            "description": "TRC20 (TRON) or ERC20 (Ethereum); TRX, TRON, ETH and ETHEREUM are accepted too, in any case. Always send it: without it a TRON address is rejected. TON and SOL pass the address check but always answer `unknown`. Any other value is treated as an unlisted network: the contract is not read, and an 0x address is matched against the whole index, so Ethereum events and their status can be returned.",
            "examples": [
              "TRC20",
              "ERC20"
            ]
          },
          "address": {
            "type": "string",
            "minLength": 10,
            "description": "The address in the chain's own format; TRON addresses are checksum-checked."
          }
        }
      },
      "BlacklistStatus": {
        "type": "string",
        "enum": [
          "frozen",
          "unfrozen",
          "burned",
          "not_found",
          "unknown"
        ],
        "description": "frozen: on the blacklist — for USDT, the contract says so or, when it could not be read, the index shows a freeze in force; for a USDC-only address, the index shows a Circle freeze in force (Circle's contract is not read). unfrozen: not blacklisted now, with an earlier freeze in the index. burned: the frozen balance was destroyed; the address stays blacklisted. not_found: the contract says not blacklisted and the index holds no event. unknown: the status could not be established; never read it as not blacklisted."
      },
      "LookupResponse": {
        "type": "object",
        "required": [
          "status",
          "events",
          "onchain",
          "checkedOnChainAt",
          "indexStatus",
          "mismatch",
          "explorerUrl"
        ],
        "properties": {
          "status": {
            "$ref": "#/components/schemas/BlacklistStatus"
          },
          "address": {
            "type": "string",
            "description": "As the index or the contract read spells it."
          },
          "network": {
            "type": "string",
            "enum": [
              "TRX",
              "ETH"
            ],
            "description": "The index's code for the chain."
          },
          "token": {
            "type": "string",
            "enum": [
              "USDT",
              "USDC"
            ],
            "description": "USDT when the address has any USDT event; otherwise the token of its latest event."
          },
          "firstSeen": {
            "type": "string",
            "description": "Time of the first event, `YYYY-MM-DD HH:MM:SS` as the index stores it. Absent when the index holds no event."
          },
          "lastSeen": {
            "type": "string",
            "description": "Time of the last event, same format. Absent when the index holds no event."
          },
          "frozenBalance": {
            "type": "number",
            "description": "The balance recorded when the freeze in force was placed; not a live balance. 0 once unfrozen or burned, and 0 when the freeze in force is not in the index."
          },
          "burnedAmount": {
            "type": "number",
            "description": "The total destroyed."
          },
          "eventCount": {
            "type": "integer"
          },
          "events": {
            "type": "array",
            "maxItems": 1000,
            "description": "Every event the index holds for the address, oldest first, at most 1,000.",
            "items": {
              "$ref": "#/components/schemas/BlacklistEvent"
            }
          },
          "onchain": {
            "oneOf": [
              {
                "type": "boolean"
              },
              {
                "type": "string",
                "const": "unknown"
              }
            ],
            "description": "getBlackListStatus on Tether's USDT contract. \"unknown\" when the contract could not be read within about 3 seconds, when the caller has made more than about 30 TRON or Ethereum lookups this minute or the shared budget of all callers is spent, when a second host does not confirm a `false` that would clear a freeze in the index, or when the network is not TRON or Ethereum. USDT only."
          },
          "checkedOnChainAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the contract was read, ISO 8601 UTC; null when onchain is \"unknown\"."
          },
          "indexStatus": {
            "$ref": "#/components/schemas/BlacklistStatus"
          },
          "mismatch": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "not_in_index",
              "not_on_chain",
              null
            ],
            "description": "null when the contract and the index agree; not_in_index when the contract says blacklisted and the index has no freeze in force; not_on_chain when the index shows a freeze in force and the contract says not blacklisted."
          },
          "explorerUrl": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "The address on Tronscan or Etherscan; null for other networks."
          }
        }
      },
      "BlacklistEvent": {
        "type": "object",
        "required": [
          "event",
          "kind",
          "network",
          "token",
          "amount",
          "balance",
          "time",
          "block",
          "tx"
        ],
        "properties": {
          "event": {
            "type": "string",
            "enum": [
              "AddedBlackList",
              "RemovedBlackList",
              "DestroyedBlackFunds",
              "Blacklisted",
              "UnBlacklisted"
            ],
            "description": "The contract event: Tether's USDT (AddedBlackList, RemovedBlackList, DestroyedBlackFunds) or Circle's USDC (Blacklisted, UnBlacklisted)."
          },
          "kind": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "frozen",
              "unfrozen",
              "burned",
              null
            ]
          },
          "network": {
            "type": "string",
            "enum": [
              "TRX",
              "ETH"
            ]
          },
          "token": {
            "type": "string",
            "enum": [
              "USDT",
              "USDC"
            ]
          },
          "amount": {
            "type": "number",
            "description": "The destroyed amount on a burn; 0 otherwise."
          },
          "balance": {
            "type": "number",
            "description": "The balance recorded with the event."
          },
          "time": {
            "type": "string",
            "description": "`YYYY-MM-DD HH:MM:SS`, as the index stores it."
          },
          "block": {
            "type": "integer"
          },
          "tx": {
            "type": "string",
            "description": "The transaction hash shortened to its first 6 and last 4 characters."
          }
        }
      },
      "LookupError": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "invalid_address",
              "internal_error"
            ]
          }
        }
      },
      "OfacHit": {
        "type": "object",
        "required": [
          "list",
          "address",
          "currency",
          "uid",
          "entity",
          "type",
          "programs",
          "firstSeen",
          "entryUrl"
        ],
        "properties": {
          "list": {
            "type": "string",
            "const": "OFAC SDN"
          },
          "address": {
            "type": "string",
            "description": "As published by OFAC."
          },
          "currency": {
            "type": "string",
            "description": "The tag after \"Digital Currency Address - \": USDT, TRX, ETH, XBT…"
          },
          "uid": {
            "type": "integer",
            "description": "The SDN entry's ID on OFAC's search."
          },
          "entity": {
            "type": [
              "string",
              "null"
            ],
            "description": "The entry's name; null for an individual."
          },
          "type": {
            "type": "string",
            "description": "Entity, Individual, Vessel or Aircraft."
          },
          "programs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "firstSeen": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "Publish date of the first file the feed saw this identifier in; null when it was already in the first file the feed read. OFAC publishes no date per address."
          },
          "entryUrl": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "OfacScreen": {
        "type": "object",
        "required": [
          "ok",
          "listed",
          "hits",
          "publishDate",
          "checkedAt",
          "baselineDate"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "listed": {
            "type": "boolean"
          },
          "hits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OfacHit"
            }
          },
          "publishDate": {
            "type": "string",
            "format": "date",
            "description": "Publish date of the OFAC file screened."
          },
          "checkedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the server last confirmed it holds OFAC's current file."
          },
          "baselineDate": {
            "type": "string",
            "format": "date",
            "description": "Publish date of the first file the feed read."
          }
        }
      },
      "OfacRow": {
        "type": "object",
        "required": [
          "address",
          "currency",
          "uid",
          "name",
          "type",
          "programs",
          "firstSeen"
        ],
        "properties": {
          "address": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "uid": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "description": "The SDN entry's name as published."
          },
          "type": {
            "type": "string"
          },
          "programs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "firstSeen": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          }
        }
      },
      "OfacSummary": {
        "type": "object",
        "required": [
          "identifiers",
          "addresses",
          "entries",
          "byCurrency"
        ],
        "properties": {
          "identifiers": {
            "type": "integer",
            "description": "Address identifiers (rows)."
          },
          "addresses": {
            "type": "integer",
            "description": "Distinct addresses."
          },
          "entries": {
            "type": "integer",
            "description": "SDN entries with at least one address."
          },
          "byCurrency": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "currency",
                "count"
              ],
              "properties": {
                "currency": {
                  "type": "string"
                },
                "count": {
                  "type": "integer"
                }
              }
            }
          }
        }
      },
      "OfacList": {
        "type": "object",
        "required": [
          "ok",
          "sourceUrl",
          "publishDate",
          "recordCount",
          "sha256",
          "fetchedAt",
          "checkedAt",
          "baselineDate",
          "summary",
          "rows"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "sourceUrl": {
            "type": "string",
            "format": "uri",
            "description": "OFAC's SDN.XML export."
          },
          "publishDate": {
            "type": "string",
            "format": "date"
          },
          "recordCount": {
            "type": "integer",
            "description": "Every SDN entry in the file, crypto or not."
          },
          "sha256": {
            "type": "string",
            "description": "SHA-256 of the file, hex."
          },
          "fetchedAt": {
            "type": "string",
            "format": "date-time"
          },
          "checkedAt": {
            "type": "string",
            "format": "date-time"
          },
          "baselineDate": {
            "type": "string",
            "format": "date"
          },
          "summary": {
            "$ref": "#/components/schemas/OfacSummary"
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OfacRow"
            }
          }
        }
      },
      "OfacError": {
        "type": "object",
        "required": [
          "ok",
          "error"
        ],
        "properties": {
          "ok": {
            "type": "boolean",
            "const": false
          },
          "error": {
            "type": "string",
            "enum": [
              "invalid_address",
              "unavailable"
            ]
          }
        }
      },
      "WalletInfo": {
        "type": "object",
        "required": [
          "network",
          "address",
          "usdtBalance",
          "nativeBalance",
          "nativeSymbol",
          "totalTxCount",
          "lastActivity",
          "explorerUrl"
        ],
        "properties": {
          "network": {
            "type": "string",
            "enum": [
              "TRC20",
              "ERC20",
              "SOL",
              "TON"
            ]
          },
          "address": {
            "type": "string"
          },
          "usdtBalance": {
            "type": "number"
          },
          "nativeBalance": {
            "type": "number"
          },
          "nativeSymbol": {
            "type": "string",
            "examples": [
              "TRX",
              "ETH",
              "SOL",
              "TON"
            ]
          },
          "totalTxCount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Best effort. On Ethereum the transactions the address sent; on Solana it stops at 1,000; on TON always null."
          },
          "totalTxCountIsFloor": {
            "type": "boolean",
            "description": "Present and true when totalTxCount is a floor, not a total (Solana)."
          },
          "lastActivity": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "explorerUrl": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "WalletInfoResponse": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "ok",
              "info"
            ],
            "properties": {
              "ok": {
                "type": "boolean",
                "const": true
              },
              "info": {
                "$ref": "#/components/schemas/WalletInfo"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "ok",
              "info",
              "reason"
            ],
            "properties": {
              "ok": {
                "type": "boolean",
                "const": false
              },
              "info": {
                "type": "null"
              },
              "reason": {
                "type": "string",
                "enum": [
                  "invalid",
                  "unsupported",
                  "fetch_failed"
                ],
                "description": "invalid: address missing or malformed. unsupported: network missing or not one of the four. fetch_failed: the chain could not be read."
              }
            }
          }
        ]
      },
      "ExportNotFound": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "const": "not_found"
          }
        }
      }
    }
  }
}
