Getting an address

By using this method you can:

  • Get the address for the user in the specified coin and network. When the request is repeated, the previously created address is returned, which will have isActive: true

  • Generate a new address for the user in the specified coin and network, when specifying the parameter renewAddress. The new address will have isActive: true, previously generated addresses with the same coin and network will have isActive: false

Note: At any time, a user can have only one active address in particular coin and network. Deposits and withdrawals work at all addresses, regardless of the parameter isActive

Getting an address

post
Header parameters
x-api-public-keystringOptional

Public API-key

x-api-signaturestringOptional

Signing the request body with a private API-key

Content-typestringOptional

Request content type

Example: application/json
Body

Request body to get or regenerate the address for the user

idstringRequired

User ID

Example: d38efca0-3732-4fd0-8657-498312eaa1e9
currencystringRequired

Address coin

Example: USDT
networkstringRequired

Address network

Example: ethereum
renewAddressbooleanOptional

If set to true a new address will be issued to the user, the old one will become inactive

Responses
200Success
application/json
post
POST /api-gateway/personal-addresses/get-user-address HTTP/1.1
Host: ocp.onchainpay.io
Content-Type: application/json
Accept: */*
Content-Length: 104

{
  "id": "d38efca0-3732-4fd0-8657-498312eaa1e9",
  "currency": "USDT",
  "network": "ethereum",
  "renewAddress": true
}
200Success
{
  "success": true,
  "response": {
    "id": "1b950d20-5c23-4323-b2b9-fb36d104e8f1",
    "userId": "4006fd41-0c97-49f7-8808-24c99d536c06",
    "currency": "USDT",
    "network": "ethereum",
    "address": "0x515b72ed8a97f42c568d6a143232775018f133c8",
    "tag": null,
    "balance": "1234.1234",
    "isActive": true
  }
}

Last updated