接口请求地址

https://x.2345.net/

币地址信息查询接口

功能

用户给出币种和地址,与系统内数据库进行比对,如果是已确认的恶意地址或已知的机构地址,将返回相关结果。

接口地址

GET /wallet/query/<currency>/<address>

接口参数

参数名 方式 含义 备注
currency URL 查询币种 币种必须包含于账户的权限列表内
address URL 查询地址 对于大小写敏感的币种,只有完全匹配才能查询到
ak GET 账户Access Key -
sk GET 账户Secret Key -

接口返回

格式:JSON

类型 含义 备注
code int 状态码 0表示成功,负数表示出错
msg string 状态描述 -
data json 具体内容 仅当code=0时返回,查询到的币信息
data.address string 查询到的地址 对于大小写不敏感的币种,此字段会显示数据库内存放的地址
data.type int 地址类型 大于0表示地址白名单(如已知机构),小于0代表恶意地址
data.reason string 原因描述 已知机构名称,或恶意行为
data.add_time time 添加时间 添加到数据库的时间,格式为2018-08-08 12:34:56 +0800

code状态码枚举及含义解释:

code msg 含义
0 ok 成功
-1 ak/sk not match 账户认证密钥对不正确
-2 banned key 账户已过期或被临时封禁
-3 ip verify failed 访问IP不在白名单内
-4 currency is not authed 账户没有权限访问该币种
-5 qps overload 超出账户访问频率限制
-101 currency is not supported 该币种暂未被支持
-102 currency and address pair not found 数据库内没有找到币种-地址对
-103 input error 输入有误

请求示例

请求:

curl http://ip:port/query/btc/17A16QmavnUfCW11DAApiJxp7ARnxN5pGX?ak=88961678&sk=e31ba098a32c003e16bbcddeff6ad189

正确的返回:

{
    "code":0,
    "msg":"ok",
    "data":{
        "address":"17A16QmavnUfCW11DAApiJxp7ARnxN5pGX",
        "type":1,
        "reason":"",
        "category": "Scamming",
        "add_time":"2018-07-19 18:15:09 +0800"
    }
}

出错的返回(IP错误):

{
    "code":-3,
    "msg":"ip verify failed"
}