Skip to main content

User deposit

1、Assign deposit address

HTTP request:

http://wallet.unn.com:8080/v2/user/create

Request method: POST

Header

ParameterTypeRequiredDescription
tokenstringtrueAccess Token

Request parameters

ParameterTypeRequiredDescription
user_idstringtrueuser ID in the merchant system
namestringfalsenickname

Request Example

curl --location 'http://wallet.unn.com:8080/v2/user/create' \
--header 'token: service.eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMHg1QjgzYTI2N2I2QjhCZTRiRTZEOWFmMWMxZGQxOUMzNEZCMjY0MUIwIiwiZW50ZXJwcmlzZV9saXN0IjpbeyJjaGFpbiI6IkVSQzIwIiwiY29udHJhY3RfYWRkciI6IjB4RTU4MzExYjIxMGY0RUI1N2QzQmU2MTk0NkNlRTMzZUNhODc5M2NGMCIsImVudGVycHJpc2UiOiI2NGNlMGNiMjFiOWIwNDE5Y2VlMWRkNTgiLCJpc19vd25lciI6dHJ1ZSwicGVybWlzc2lvbiI6WzAsMSwyLDNdfSx7ImNoYWluIjoiVFJDMjAiLCJjb250cmFjdF9hZGRyIjoiVEVWUktYb05xcWk3UkJEYkY0TXplVDNwUHVpc1hCaXpBdSIsImVudGVycHJpc2UiOiI2NGNlMGNiMjFiOWIwNDE5Y2VlMWRkNTgiLCJpc19vd25lciI6dHJ1ZSwicGVybWlzc2lvbiI6WzAsMSwyLDNdfV0sImNyZWF0ZVRpbWUiOjE2OTIzNDE4ODIsImV4cCI6MTY5NDkzMzg4MiwiYWNjb3VudF9uYW1lIjoiIn0.ix213o6Azf2rGTmTiLX98BYEn-Ngme9P4LYrO3-zNQs' \
--header 'Content-Type: application/json' \
--data '{
"body": {
"user_id": "T1692343087",
"name": "Arthur02"
}
}'

return parameters

ParameterTypeRequiredDescription
merchant_idstringtruemerchant ID
user_idstringtruemerchant system user ID
namestringtrueuser name
descstringtruedesc
addressstringtrueuser deposit address

Back to example

{
"code": 200,
"message": "success",
"data": {
"entity": {
"merchant_id": "64f2974b8dd894bc6115e260",
"user_id": "T1692343087",
"name": "Arthur02",
"desc": "",
"address": {
"ERC20": "0xdd07371E0930ac4B60d103A3ce7B6D9509F39Dad",
"TRC20": "TYTUmbXev4qBpM2JeNkwAwkL3HE8h29Rvr"
},
"index": 6,
"in_used": true,
"create_time": 1695621744,
"update_time": 1695621744,
"id": "65112270467ce9af683bd8c7"
}
}
}

2、Query deposit address

Request URL:

http://wallet.unn.com:8080/v2/order/deposit/{UserId}

UserId is the user ID of the calling system

Request method: GET

Header

parametertyperequireddescription
tokenstringtrueAccess Token

Request Example

curl --location 'http://43.198.64.79:30105/v2/order/deposit/test0011' \
--header 'token: service.eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMHg1MkM1NDBFZDdBMTk4ZTQ4QjU3RjYwYTc5MWFhRTgzYTVBMmIwNjNFIiwiZW50ZXJwcmlzZV9saXN0IjpbeyJjaGFpbiI6IkVSQzIwIiwiY29udHJhY3RfYWRkciI6IjB4NDU3ODU3MDEzQTkyMEQ3QzM3OWZjRTkwMjhmRmM2NzhDZUM4MUQ2OCIsImVudGVycHJpc2UiOiI2NGM3NGI2OTgwYTU4NjIwOThhZTIzMDEiLCJpc19vd25lciI6dHJ1ZSwicGVybWlzc2lvbiI6WzAsMSwyLDNdfV0sImNyZWF0ZVRpbWUiOjE2OTA3ODUyNzAsImV4cCI6MTY5MzM3NzI3MCwiYWNjb3VudF9uYW1lIjoiIn0.GSM0vsDjrgW1ZQzG2AQUWVQKA0UmtJynrG6sDePxbQo'

return parameters

parametertyperequireddescription
addressdicttrueaddress
—ERC20stringtrueEth address
—TRC20stringtrueTron address

Back to example

{
"code": 200,
"message": "success",
"data": {
"entity": {
"address": {
"ERC20": "0x9E572A5e1012359365ab07A70Ff94aCdf9a2460c",
"TRC20": "TFwgcKZPn3WfmAHb6vtaL261DNFKCrU7Vf"
}
}
}
}