{
  "info": {
    "name": "KYA / KYT Sandbox 客户测试接口",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "先在 apiKey 下推送规则，再使用相同 apiKey 仅带原有业务参数查询。GET /sandbox/rules 列出该 Key 的所有有效规则。默认24小时，每Key 5 QPS，Key和Secret均非空。"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://sandbox.example.invalid",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "customer-deposit-test-001",
      "type": "string"
    },
    {
      "key": "address",
      "value": "0x0000000000000000000000000000000000000001",
      "type": "string"
    },
    {
      "key": "txnHash",
      "value": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "type": "string"
    },
    {
      "key": "utxoTxnHash",
      "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "type": "string"
    },
    {
      "key": "runId",
      "value": "customer-a-deposit-20261123-001",
      "type": "string"
    },
    {
      "key": "apiSecret",
      "value": "customer-test-secret",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "预设规则 · KYA 推送高风险",
      "request": {
        "method": "POST",
        "auth": {
          "type": "noauth"
        },
        "header": [
          {
            "key": "X-API-Key",
            "value": "{{apiKey}}"
          },
          {
            "key": "X-API-Secret",
            "value": "{{apiSecret}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/sandbox/rules",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "sandbox",
            "rules"
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"chain\": \"eth\",\n  \"address\": \"{{address}}\",\n  \"risk\": \"high\",\n  \"ttl_seconds\": 86400\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "response": []
    },
    {
      "name": "预设规则 · KYA 正常查询",
      "request": {
        "method": "GET",
        "auth": {
          "type": "noauth"
        },
        "header": [
          {
            "key": "X-API-Key",
            "value": "{{apiKey}}"
          },
          {
            "key": "X-API-Secret",
            "value": "{{apiSecret}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v4/kya/risk?chain=eth&address={{address}}",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "v4",
            "kya",
            "risk"
          ],
          "query": [
            {
              "key": "chain",
              "value": "eth"
            },
            {
              "key": "address",
              "value": "{{address}}"
            }
          ]
        }
      },
      "response": []
    },
    {
      "name": "预设规则 · KYA 重检前改为低风险",
      "request": {
        "method": "POST",
        "auth": {
          "type": "noauth"
        },
        "header": [
          {
            "key": "X-API-Key",
            "value": "{{apiKey}}"
          },
          {
            "key": "X-API-Secret",
            "value": "{{apiSecret}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/sandbox/rules",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "sandbox",
            "rules"
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"chain\": \"eth\",\n  \"address\": \"{{address}}\",\n  \"risk\": \"low\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "response": []
    },
    {
      "name": "预设规则 · 查询当前 Key 的全部规则",
      "request": {
        "method": "GET",
        "auth": {
          "type": "noauth"
        },
        "header": [
          {
            "key": "X-API-Key",
            "value": "{{apiKey}}"
          },
          {
            "key": "X-API-Secret",
            "value": "{{apiSecret}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/sandbox/rules",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "sandbox",
            "rules"
          ]
        }
      },
      "response": []
    },
    {
      "name": "预设规则 · KYA 前三次失败后恢复",
      "request": {
        "method": "POST",
        "auth": {
          "type": "noauth"
        },
        "header": [
          {
            "key": "X-API-Key",
            "value": "{{apiKey}}"
          },
          {
            "key": "X-API-Secret",
            "value": "{{apiSecret}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/sandbox/rules",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "sandbox",
            "rules"
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"chain\": \"eth\",\n  \"address\": \"{{address}}\",\n  \"risk\": \"low\",\n  \"scenario\": \"server_error\",\n  \"fail_count\": 3\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "response": []
    },
    {
      "name": "预设规则 · KYT 推送高风险",
      "request": {
        "method": "POST",
        "auth": {
          "type": "noauth"
        },
        "header": [
          {
            "key": "X-API-Key",
            "value": "{{apiKey}}"
          },
          {
            "key": "X-API-Secret",
            "value": "{{apiSecret}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/sandbox/rules",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "sandbox",
            "rules"
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"chain\": \"btc\",\n  \"txn_hash\": \"{{utxoTxnHash}}\",\n  \"risk\": \"high\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "response": []
    },
    {
      "name": "预设规则 · KYT 正常查询",
      "request": {
        "method": "GET",
        "auth": {
          "type": "noauth"
        },
        "header": [
          {
            "key": "X-API-Key",
            "value": "{{apiKey}}"
          },
          {
            "key": "X-API-Secret",
            "value": "{{apiSecret}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v4/kyt/risk?chain=btc&txn_hash={{utxoTxnHash}}",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "v4",
            "kyt",
            "risk"
          ],
          "query": [
            {
              "key": "chain",
              "value": "btc"
            },
            {
              "key": "txn_hash",
              "value": "{{utxoTxnHash}}"
            }
          ]
        }
      },
      "response": []
    },
    {
      "name": "临时调试 · KYA - 高风险",
      "request": {
        "method": "GET",
        "auth": {
          "type": "noauth"
        },
        "header": [
          {
            "key": "X-API-Key",
            "value": "{{apiKey}}"
          },
          {
            "key": "X-API-Secret",
            "value": "{{apiSecret}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v4/kya/risk?chain=eth&address={{address}}&test_risk=high",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "v4",
            "kya",
            "risk"
          ],
          "query": [
            {
              "key": "chain",
              "value": "eth"
            },
            {
              "key": "address",
              "value": "{{address}}"
            },
            {
              "key": "test_risk",
              "value": "high"
            }
          ]
        },
        "description": ""
      },
      "response": []
    },
    {
      "name": "临时调试 · KYA - 重检低风险",
      "request": {
        "method": "GET",
        "auth": {
          "type": "noauth"
        },
        "header": [
          {
            "key": "X-API-Key",
            "value": "{{apiKey}}"
          },
          {
            "key": "X-API-Secret",
            "value": "{{apiSecret}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v4/kya/risk?chain=eth&address={{address}}&test_risk=low",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "v4",
            "kya",
            "risk"
          ],
          "query": [
            {
              "key": "chain",
              "value": "eth"
            },
            {
              "key": "address",
              "value": "{{address}}"
            },
            {
              "key": "test_risk",
              "value": "low"
            }
          ]
        },
        "description": ""
      },
      "response": []
    },
    {
      "name": "临时调试 · KYA - 重检无风险",
      "request": {
        "method": "GET",
        "auth": {
          "type": "noauth"
        },
        "header": [
          {
            "key": "X-API-Key",
            "value": "{{apiKey}}"
          },
          {
            "key": "X-API-Secret",
            "value": "{{apiSecret}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v4/kya/risk?chain=eth&address={{address}}&test_risk=none",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "v4",
            "kya",
            "risk"
          ],
          "query": [
            {
              "key": "chain",
              "value": "eth"
            },
            {
              "key": "address",
              "value": "{{address}}"
            },
            {
              "key": "test_risk",
              "value": "none"
            }
          ]
        },
        "description": ""
      },
      "response": []
    },
    {
      "name": "临时调试 · KYA - Header 优先示例",
      "request": {
        "method": "GET",
        "auth": {
          "type": "noauth"
        },
        "header": [
          {
            "key": "X-API-Key",
            "value": "{{apiKey}}"
          },
          {
            "key": "X-Test-Risk",
            "value": "high"
          },
          {
            "key": "X-API-Secret",
            "value": "{{apiSecret}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v4/kya/risk?chain=eth&address={{address}}&test_risk=low",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "v4",
            "kya",
            "risk"
          ],
          "query": [
            {
              "key": "chain",
              "value": "eth"
            },
            {
              "key": "address",
              "value": "{{address}}"
            },
            {
              "key": "test_risk",
              "value": "low"
            }
          ]
        },
        "description": "Query 为 low，Header 为 high，结果为 High。"
      },
      "response": []
    },
    {
      "name": "临时调试 · KYT - EVM 高风险",
      "request": {
        "method": "GET",
        "auth": {
          "type": "noauth"
        },
        "header": [
          {
            "key": "X-API-Key",
            "value": "{{apiKey}}"
          },
          {
            "key": "X-API-Secret",
            "value": "{{apiSecret}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v4/kyt/risk?chain=eth&txn_hash={{txnHash}}&test_risk=high",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "v4",
            "kyt",
            "risk"
          ],
          "query": [
            {
              "key": "chain",
              "value": "eth"
            },
            {
              "key": "txn_hash",
              "value": "{{txnHash}}"
            },
            {
              "key": "test_risk",
              "value": "high"
            }
          ]
        },
        "description": ""
      },
      "response": []
    },
    {
      "name": "临时调试 · KYT - BTC 高风险及 vin/vout",
      "request": {
        "method": "GET",
        "auth": {
          "type": "noauth"
        },
        "header": [
          {
            "key": "X-API-Key",
            "value": "{{apiKey}}"
          },
          {
            "key": "X-API-Secret",
            "value": "{{apiSecret}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v4/kyt/risk?chain=btc&txn_hash={{utxoTxnHash}}&test_risk=high",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "v4",
            "kyt",
            "risk"
          ],
          "query": [
            {
              "key": "chain",
              "value": "btc"
            },
            {
              "key": "txn_hash",
              "value": "{{utxoTxnHash}}"
            },
            {
              "key": "test_risk",
              "value": "high"
            }
          ]
        },
        "description": ""
      },
      "response": []
    },
    {
      "name": "临时调试 · KYT - BCH 高风险及 vin/vout",
      "request": {
        "method": "GET",
        "auth": {
          "type": "noauth"
        },
        "header": [
          {
            "key": "X-API-Key",
            "value": "{{apiKey}}"
          },
          {
            "key": "X-API-Secret",
            "value": "{{apiSecret}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v4/kyt/risk?chain=bch&txn_hash={{utxoTxnHash}}&test_risk=high",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "v4",
            "kyt",
            "risk"
          ],
          "query": [
            {
              "key": "chain",
              "value": "bch"
            },
            {
              "key": "txn_hash",
              "value": "{{utxoTxnHash}}"
            },
            {
              "key": "test_risk",
              "value": "high"
            }
          ]
        },
        "description": ""
      },
      "response": []
    },
    {
      "name": "临时调试 · KYA - 持续 500",
      "request": {
        "method": "GET",
        "auth": {
          "type": "noauth"
        },
        "header": [
          {
            "key": "X-API-Key",
            "value": "{{apiKey}}"
          },
          {
            "key": "X-API-Secret",
            "value": "{{apiSecret}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v4/kya/risk?chain=eth&address={{address}}&test_risk=low&test_scenario=server_error",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "v4",
            "kya",
            "risk"
          ],
          "query": [
            {
              "key": "chain",
              "value": "eth"
            },
            {
              "key": "address",
              "value": "{{address}}"
            },
            {
              "key": "test_risk",
              "value": "low"
            },
            {
              "key": "test_scenario",
              "value": "server_error"
            }
          ]
        },
        "description": ""
      },
      "response": []
    },
    {
      "name": "临时调试 · KYA - 模拟 429",
      "request": {
        "method": "GET",
        "auth": {
          "type": "noauth"
        },
        "header": [
          {
            "key": "X-API-Key",
            "value": "{{apiKey}}"
          },
          {
            "key": "X-API-Secret",
            "value": "{{apiSecret}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v4/kya/risk?chain=eth&address={{address}}&test_risk=low&test_scenario=rate_limit",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "v4",
            "kya",
            "risk"
          ],
          "query": [
            {
              "key": "chain",
              "value": "eth"
            },
            {
              "key": "address",
              "value": "{{address}}"
            },
            {
              "key": "test_risk",
              "value": "low"
            },
            {
              "key": "test_scenario",
              "value": "rate_limit"
            }
          ]
        },
        "description": ""
      },
      "response": []
    },
    {
      "name": "临时调试 · KYA - 空结果",
      "request": {
        "method": "GET",
        "auth": {
          "type": "noauth"
        },
        "header": [
          {
            "key": "X-API-Key",
            "value": "{{apiKey}}"
          },
          {
            "key": "X-API-Secret",
            "value": "{{apiSecret}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v4/kya/risk?chain=eth&address={{address}}&test_risk=low&test_scenario=empty",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "v4",
            "kya",
            "risk"
          ],
          "query": [
            {
              "key": "chain",
              "value": "eth"
            },
            {
              "key": "address",
              "value": "{{address}}"
            },
            {
              "key": "test_risk",
              "value": "low"
            },
            {
              "key": "test_scenario",
              "value": "empty"
            }
          ]
        },
        "description": ""
      },
      "response": []
    },
    {
      "name": "临时调试 · KYA - 超时（10 秒）",
      "request": {
        "method": "GET",
        "auth": {
          "type": "noauth"
        },
        "header": [
          {
            "key": "X-API-Key",
            "value": "{{apiKey}}"
          },
          {
            "key": "X-API-Secret",
            "value": "{{apiSecret}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v4/kya/risk?chain=eth&address={{address}}&test_risk=low&test_scenario=timeout&test_delay_ms=10000",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "v4",
            "kya",
            "risk"
          ],
          "query": [
            {
              "key": "chain",
              "value": "eth"
            },
            {
              "key": "address",
              "value": "{{address}}"
            },
            {
              "key": "test_risk",
              "value": "low"
            },
            {
              "key": "test_scenario",
              "value": "timeout"
            },
            {
              "key": "test_delay_ms",
              "value": "10000"
            }
          ]
        },
        "description": "timeout 场景请将客户端超时设为小于 10000ms；否则等待后收到 504。"
      },
      "response": []
    },
    {
      "name": "临时调试 · KYA - 前三次失败后恢复",
      "request": {
        "method": "GET",
        "auth": {
          "type": "noauth"
        },
        "header": [
          {
            "key": "X-API-Key",
            "value": "{{apiKey}}"
          },
          {
            "key": "X-API-Secret",
            "value": "{{apiSecret}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v4/kya/risk?chain=eth&address={{address}}&test_risk=low&test_scenario=server_error&test_fail_count=3&test_run_id={{runId}}",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "v4",
            "kya",
            "risk"
          ],
          "query": [
            {
              "key": "chain",
              "value": "eth"
            },
            {
              "key": "address",
              "value": "{{address}}"
            },
            {
              "key": "test_risk",
              "value": "low"
            },
            {
              "key": "test_scenario",
              "value": "server_error"
            },
            {
              "key": "test_fail_count",
              "value": "3"
            },
            {
              "key": "test_run_id",
              "value": "{{runId}}"
            }
          ]
        },
        "description": "连续发送四次，预期 500、500、500、200。重复完整测试前修改 runId。"
      },
      "response": []
    },
    {
      "name": "临时调试 · KYT - 前三次失败后恢复",
      "request": {
        "method": "GET",
        "auth": {
          "type": "noauth"
        },
        "header": [
          {
            "key": "X-API-Key",
            "value": "{{apiKey}}"
          },
          {
            "key": "X-API-Secret",
            "value": "{{apiSecret}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v4/kyt/risk?chain=eth&txn_hash={{txnHash}}&test_risk=low&test_scenario=server_error&test_fail_count=3&test_run_id={{runId}}",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "v4",
            "kyt",
            "risk"
          ],
          "query": [
            {
              "key": "chain",
              "value": "eth"
            },
            {
              "key": "txn_hash",
              "value": "{{txnHash}}"
            },
            {
              "key": "test_risk",
              "value": "low"
            },
            {
              "key": "test_scenario",
              "value": "server_error"
            },
            {
              "key": "test_fail_count",
              "value": "3"
            },
            {
              "key": "test_run_id",
              "value": "{{runId}}"
            }
          ]
        },
        "description": "连续发送四次，预期 500、500、500、200。重复完整测试前修改 runId。"
      },
      "response": []
    }
  ]
}
