Create Deposit Addresses

Create deposit addresses on certain wallet. Once addresses are created, the CYBAVO SOFA system will callback when transactions are detected on these addresses.

Request

POST /v1/sofa/wallets/{WALLET_ID}/addresses

Post Body

Field Type Note Description
count int required, max 1000 Specify address count
memos array required (creating BNB, XLM, XRP or EOS wallet) Specify memos for BNB, XLM, XRP or EOS deposit wallet. Refer to Memo Requirement

Response Body

Field Type Description
addresses array Array of just created deposit addresses

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
400 703 Operation failed Error message returned by JSON parser Malformatted post body
400 945 The max length of BNB memo is 256 chars - Reached the limit of the length of BNB memo
400 946 The max length of EOS memo is 128 chars - Reached the limit of the length of EOS memo
400 947 The max length of XRP destination tag is 20 chars - Reached the limit of the length of XRP destination tag
400 948 The max length of XLM memo is 20 chars - Reached the limit of the length of XLM memo
400 818 Destination Tag must be integer - Wrong XRP destination tag format
403 706 Exceed max allow wallet limitation, Upgrade your SKU to get more wallets - Reached the limit of the total number of deposit addresses
403 112 Invalid parameter - The count and the count of memos mismatched
404 304 Wallet ID invalid - The wallet is not allowed to perform this request

Sample Request

API

/v1/sofa/wallets/56788/addresses

Post Body

For BNB, XLM, XRP or EOS wallet:

{
  "count": 2,
  "memos": [
    "001",
    "002"
  ]
}

For wallet excepts BNB, XLM, XRP and EOS:

{
  "count": 2
}

Response Body

For BNB, XLM, XRP or EOS wallet:

{
  "addresses": [
    "002",
    "001"
  ]
}

For wallet excepts BNB, XLM, XRP and EOS:

{
  "addresses": [
    "0x2E7248BBCD61Ad7C33EA183A85B1856bc02C40b6",
    "0x4EB990D527c96c64eC5Bfb0D1e304840052d4975",
    "0x86434604FF857702fbE11cBFf5aC7689Af19c4Ed"
  ]
}

Sample cURL Command

For BNB, XLM, XRP or EOS wallet:

curl -X POST -H "Content-Type: application/json" -d '{"count":2,"memos":["001","002"]}' \
http://localhost:8889/v1/mock/wallets/{WALLET_ID}/addresses

For wallet excepts BNB, XLM, XRP and EOS:

curl -X POST -H "Content-Type: application/json" -d '{"count":2}' \
http://localhost:8889/v1/mock/wallets/{WALLET_ID}/addresses