⚡ We welcome businesses to test our enterprise-grade service

bch
Bitcoin Cash (BCH)

Method: POST getnewaddress

dropdown

方法 RPC getnewaddress 例如 Bitcoin Cash (BCH)

POST getnewaddress

方法不允许

返回用于接收付款的新比特币地址。

如果指定了“标签”,则会将其添加到地址簿中,因此通过该地址收到的付款将与“标签”相关联。

Parameters

label - 字符串,可选,默认=””

要链接到的地址的标签名称。也可以设置为空字符串“”来表示默认标签。标签不需要存在,如果给定名称没有标签,则会创建标签。

address_type - 字符串,可选,默认=由 -addresstype 设置

要使用的地址类型。选项是“legacy”、“p2sh-segwit”和“bech32”。

Request

curl --location --request POST 'https://bch.getblock.io/mainnet/' 
--header 'x-api-key: YOUR-API-KEY' 
--header 'Content-Type: application/json' 
--data-raw '{"jsonrpc": "2.0",
"method": "getnewaddress",
"params": [null, null],
"id": "getblock.io"}'


Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}