Getting a list of addresses

The method allows you to get all the user's personal addresses. Deposits and withdrawals are available for all addresses, but the user should only see addresses with isActive: true. Thus, if necessary, you can generate a new address for a user in a certain coin and network, then all previous addresses in this coin and network will have the parameter isActive: false (read more in the previous method "Get/Renew personal address")

Getting a list of addresses

POSThttps://ocp.payonchain.org/api-gateway/personal-addresses/get-user-addresses
Header parameters
Body
idstring

Filter by User ID

isActiveboolean

Filter by parameter 'isActive'

currencyarray of string

Filter by currencies

networkarray of string

Filter by networks

balanceobject

Filter by address balance

offset*integer

Offset (for pagination)

limit*integer

Limit (for pagination)

Response
Body
success*boolean

Request success indicator

response*array of PersonalAddressResponse (object)
Request
const response = await fetch('https://ocp.payonchain.org/api-gateway/personal-addresses/get-user-addresses', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "success": false,
  "response": [
    {
      "id": "3d9f93dd-9447-48ab-9f49-366588de96d8",
      "userId": "ecfc4f24-2de9-45f8-b939-dc8efb47f7c2",
      "currency": "USDT",
      "network": "ethereum",
      "address": "0x515b72ed8a97f42c568d6a143232775018f133c8",
      "balance": "1234.1234",
      "isActive": false
    }
  ]
}

Last updated