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

FieldTypeNoteDescription
countintrequired, max 1000Specify address count
memosarrayrequired (creating BNB, XLM, XRP or EOS wallet)Specify memos for BNB, XLM, XRP or EOS deposit wallet. Refer to Memo Requirement

Response Body

FieldTypeDescription
addressesarrayArray of just created deposit addresses

Error Code

HTTP CodeError CodeErrorMessageDescription
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
400703Operation failedError message returned by JSON parserMalformatted post body
400945The max length of BNB memo is 256 chars-Reached the limit of the length of BNB memo
400946The max length of EOS memo is 128 chars-Reached the limit of the length of EOS memo
400947The max length of XRP destination tag is 20 chars-Reached the limit of the length of XRP destination tag
400948The max length of XLM memo is 20 chars-Reached the limit of the length of XLM memo
400818Destination Tag must be integer-Wrong XRP destination tag format
403706Exceed max allow wallet limitation, Upgrade your SKU to get more wallets-Reached the limit of the total number of deposit addresses
403112Invalid parameter-The count and the count of memos mismatched
404304Wallet 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