Query Deposit Addresses

Query the deposit addresses created by the Create Deposit Addresses API

Request

VIEW

 GET /v1/sofa/wallets/{WALLET_ID}/addresses?start_index={FROM}&request_number={COUNT}

Query Parameters

Field Type Note Description
start_index int optional, default 0 Specify address start index
request_number int optional, default 1000, max 5000 Request address count

Response Body

Field Type Description
wallet_id int64 ID of request wallet
wallet_address array Array of wallet addresses
wallet_count int64 Total count of deposit addresses
address_index int64 The corresponding index of the address

Error Code

HTTP Code Error Code Error Message Description
403 - Forbidden. Invalid wallet ID - No wallet ID found
403 - Forbidden. Header not found - Missing X-API-CODE, X-CHECKSUM header or query param t
403 - Forbidden. Invalid timestamp - The timestamp t is not in the valid time range
403 - Forbidden. Invalid checksum - The request is considered a replay request
403 - Forbidden. Invalid API code - X-API-CODE header contains invalid API code
403 - Invalid API code for wallet {WALLET_ID} - The API code mismatched
403 - Forbidden. Checksum unmatch - X-CHECKSUM header contains wrong checksum
403 - Forbidden. Call too frequently ({THROTTLING_COUNT} calls/minute) - Send requests too frequently
403 385 API Secret not valid - Invalid API code permissions
404 304 Wallet ID invalid - The wallet is not allowed to perform this request

Sample Request

API

/v1/sofa/wallets/179654/addresses?start_index=0&request_number=3

Response Body

{
  "wallet_id": 179654,
  "wallet_count": 6,
  "wallet_address": [
    {
      "currency": 60,
      "token_address": "",
      "address": "0x8c42fD03A5cfba7C3Cd97AB8a09e1a3137Ef33C3",
      "memo": ""
    },
    {
      "currency": 60,
      "token_address": "",
      "address": "0x4d3EB54b602BF4985CE457089F9fB084Af597A2C",
      "memo": ""
    },
    {
      "currency": 60,
      "token_address": "",
      "address": "0x74dc3fB523295C87C0b93E48744Ce94fe3a8Ef5e",
      "memo": ""
    }
  ]
}

An example of a successful response of the delegated wallet:

{
  "wallet_id": 132342,
  "wallet_count": 7,
  "wallet_address": [
    {
      "address": "0xB02B189b423f58E1c035f02786eA5BC6E7762718",
      "address_index": 1,
      "currency": 99999999997,
      "memo": "",
      "token_address": ""
    },
    {
      "address": "0xace596bfd34E86d15F28b1743B99B26FAFcCC9F5",
      "address_index": 2,
      "currency": 99999999997,
      "memo": "",
      "token_address": ""
    },
    {
      "address": "0x22505d4E113aE8b7A7ACdAECABfD9601E0c41ca8",
      "address_index": 3,
      "currency": 99999999997,
      "memo": "",
      "token_address": ""
    }
  ]
}

Sample cURL Command

curl http://localhost:8889/v1/mock/wallets/{WALLET_ID}/addresses?start_index=0&request_number=1000