Raiden/雷电API手册

查询已注册代币 - GET /api/(version)/tokens

返回已注册的代币地址的列表。

API请求

GET /api/(version)/tokens

URL参数:

  • version:API版本号,目前可用:v1

API响应

返回一个JSON数组,成员为代币地址字符串。

http响应的状态代码可能为以下值:

  • 200 OK – 查询成功
  • 500 Internal Server Error – Raiden节点内部错误

示例代码

curl请求示例:

curl -i http://localhost:5001/api/v1/tokens

响应结果如下:

HTTP/1.1 200 OK
Content-Type: application/json

[
    "0xEA674fdDe714fd979de3EdF0F56AA9716B898ec8",
    "0x61bB630D3B2e8eda0FC1d50F9f958eC02e3969F6"
]