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

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

Address list request body

idstringOptional

Filter by User ID

Example: be4723bf-0bd0-4ff9-a59b-2c8425b08d2d
isActivebooleanOptional

Filter by parameter 'isActive'

currencystring[]Optional

Filter by currencies

Example: USDT
networkstring[]Optional

Filter by networks

Example: ethereum
sortarrayOptional

Sort by. Fields for sorting: 'createdAt'. Order: 'ASC', 'DESC'. Example: [["createdAt", "ASC"]]

Example: [{"0":"createdAt","1":"ASC"}]
offsetintegerRequired

Offset (for pagination)

limitintegerRequired

Limit (for pagination)

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

{
  "id": "be4723bf-0bd0-4ff9-a59b-2c8425b08d2d",
  "isActive": true,
  "currency": [
    "USDT"
  ],
  "network": [
    "ethereum"
  ],
  "balance": {
    "from": "23.13",
    "to": "123.55"
  },
  "sort": [
    {
      "0": "createdAt",
      "1": "ASC"
    }
  ],
  "offset": 1,
  "limit": 1
}
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