Skip to content

Method: addresses/addAddress

POST /addresses
( https://services-api.dcore.io/blockchain/addresses )


This endpoint creates a new address on the target blockchain and is used slightly differently depending on which blockchain you are using1.

  • Bitcoin (blockchain=Bitcoin) and Ethereum (blockchain=Ethereum)

    Independently create a Public/Private key-pair, and then submit the public key to the endpoint, which will return a new address on the target blockchain. You do not send an address as this is generated and returned in the response.

  • DCore (blockchain=DCore)

    Choose a new, unique, address (which complies with the DCore address naming conventions) and submit that to the endpoint. If successful, the address, and a new Public/Private key-pair unique to that address, will be returned. You do not supply any keys.


Query Parameters

Name Description Type
blockchain
required
Which blockchain to use.
Values: "Bitcoin", "Ethereum", "DCore".
string

Request Body

Required

Schema Type: application/json

The request body consists of an addAddress.body.

Schema Body: addAddress.body

Request Headers

1
2
3
accept: application/json
x-api-key: <your-api-key>
Content-Type: application/json

Example Request Body

Example request body
    {
    "address": "XYZ...",
    "publicKey": "string"
    }

Responses for addresses/addAddress

The following response codes could be returned following a call to the addresses/addAddress endpoint.

200

Content Type: application/json

An addAddress.response object is returned.

Example response body
    {
        "address": "XYZ...",
        "privateKey": "string",
        "publicKey": "string"
    }

Error

Click the description for more detailed information on why the error was raised, and potential fixes.

Examples

Examples of using the addresses/addAddress endpoint method can be found here.


  1. The blockchains supported are Bitcoin (BTC) Ethereum (ETH) and DCore (DCT)