User Asset
User asset search (single currency)
POST
https://service.xxx.com/platformapi/chainup/open/ouser/userAccounts
It is necessary to package the data in the parameter table into JSON strings and use rsa for parameter encryption and signature as data and sign in the body
Headers
Content-Type *
String
application/json
Request Body
app_id*
String
Merchant AppKey
time*
String
sign*
String
data*
String
{
"code": "",
"msg": "",
"data": "",
"sign": ""
}
data:
{
"BTCPrecision": "btc8", // Currency parameter + precision: Precision of the currency in the exchange
"accounts": [
{
"uid": "202113", // User ID
"balance": "1000", // Account balance
"tag": "xxxxx", // Description
"type": "2021101" // Asset code
},
{
"uid": "202113", // User ID
"balance": "1000", // Account balance
"tag": "xxxxx", // Description
"type": "2021101" // Asset code
}
],
"USDTPrecision": "usdt8" // Currency parameter + precision: Precision of the currency in the exchange
}
The following are the parameters involved in rsa encryption:
Either the UID or OpenID of the payee must exist, and if both are present, the OpenID takes precedence.
openId
String
NO
openId, userId must pass one, while passing, take openId
userId
String
NO
openId, userId must pass one, while passing, take openId
coinSymbols
String
YES
BTC
Currency type: e.g. BTC, USDT, BIKI, etc.; refer to the currency configuration in the exchange; multiple currencies are separated by commas: Example: "USDT,BTC,ETH"
assetType
String
NO
201
Common type: "201" : General account balance
User account balance (full currency)
POST
https://service.xxx.om//platformapi/chainup/open/user/accountBalance
It is necessary to package the data in the parameter table into JSON strings and use rsa for parameter encryption and signature as data and sign in the body
Headers
Content-Type *
String
application/json
Request Body
app_id*
String
Merchant AppKey
time*
String
data*
String
sign*
String
{
"code": "", //Return code
"msg": "", //Success or failure message
"data": "",
"sign": ""
}
data:
{
"totalBalance": "100", // Total assets
"totalBalanceSymbol": "BTC", // Total asset symbol
"platformCoin": "xxx", // Platform coin for dividend configuration
"allCoinMap": { // Mapping of all coins, where the key is the uppercase coin symbol and the value is the asset details for each coin
"LTC": {
"walletTransactionOpen": 1, // Whether the coin has wallet transaction enabled
"isFiat": 0, // Whether it is a fiat currency, 0 for digital currency, 1 for fiat
"normal_balance": "200", // User's normal spot balance
"allBalance": "9000", // Total balance
"exchange_symbol": "Trading pair", // Trading pair symbol
"present_coin_balance": 9000, // Gift coin account
"lock_position_balance": "2000", // Lock position account
"btcValuatin": "10000", // BTC valuation
"sort": 20, // Sorting order
"depositOpen": 1, // Whether deposit is open
"lock_grant_divided_balance": "999999", // User's token lock + mining lock balance
"total_balance": "99999", // Total balance
"nc_lock_balance": "98888", // User's subscription frozen balance
"otcOpen": 1, // Whether OTC is open
"depositMin": 20, // Minimum deposit amount
"checked": "true", // Whether to hide zero assets, default to true
"coinName": "name", // Name
"lock_balance": "3000", // Frozen amount
"allBtcValuatin": "9918923", // All BTC valuation
"lock_position_v2_amount": "203213", // User's token lock account V2
"withdrawOpen": 1, // Whether withdrawal is open
"overcharge_balance": "9000"
},
"BCH": {
"walletTransactionOpen": 1, // Whether the coin has wallet transaction enabled
"isFiat": 0, // Whether it is a fiat currency, 0 for digital currency, 1 for fiat
"normal_balance": "200", // User's normal spot balance
"allBalance": "9000", // Total balance
"exchange_symbol": "Trading pair", // Trading pair symbol
"present_coin_balance": 9000, // Gift coin account
"lock_position_balance": "2000", // Lock position account
"btcValuatin": "10000", // BTC valuation
"sort": 20, // Sorting order
"depositOpen": 1, // Whether deposit is open
"lock_grant_divided_balance": "999999", // User's token lock + mining lock balance
"total_balance": "99999", // Total balance
"nc_lock_balance": "98888", // User's subscription frozen balance
"otcOpen": 1, // Whether OTC is open
"depositMin": 20, // Minimum deposit amount
"checked": "true", // Whether to hide zero assets, default to true
"coinName": "name", // Name
"lock_balance": "3000", // Frozen amount
"allBtcValuatin": "9918923", // All BTC valuation
"lock_position_v2_amount": "203213", // User's token lock account V2
"withdrawOpen": 1, // Whether withdrawal is open
"overcharge_balance": "9000"
}
}
}
The following are the parameters involved in rsa encryption:
(openId, userId, mobileNumber, email) One of these four must be provided.
openId
String
NO
openId, userId must pass one, while passing, take openId
userId
String
NO
openId, userId must pass one, while passing, take openId
mobileNumber
String
NO
09011223
Cell phone number
Get user top-up records
POST
https://service.xxx.com/platformapi/chainup/open/user/depositRecord
Headers
Content-Type *
String
application/json
Request Body
app_id*
String
Merchant AppKey
time*
String
sign*
String
data*
String
{
"code": "",
"msg": "",
"data": "",
"sign":""
}
data:
[
{
"symbol": "usdt", // Deposit coin symbol
"id": 112331, // Deposit ID
"uid": -230000, // Deposit user ID
"createdAt": 1233200092, // Deposit creation time
"addressTo": "xxxxxxxxx", // Deposit address
"amount": "1", // Deposit amount
"txid": "xxxxx", // TXID
"status": 1, // Deposit status: 0 - Pending, 1 - Completed, 2 - Deposit exception
"depositType": 0, // Deposit type: 0 - External deposit, 1 - Internal deposit
"statusDesc": "xxxxx", // Deposit status description
"mobileNumber": "08666666", // User's mobile number
"email": "xxxxx", // User's email
"riskLevel": 0 // Risk level: 0 - No risk detected, 1 - Low risk, 2 - Medium risk, 3 - High risk
},
{
"symbol": "bnb", // Deposit coin symbol
"id": 112331, // Deposit ID
"uid": -230000, // Deposit user ID
"createdAt": 1233200092, // Deposit creation time
"addressTo": "xxxxxxxxx", // Deposit address
"amount": "1", // Deposit amount
"txid": "xxxxx", // TXID
"status": 1, // Deposit status: 0 - Pending, 1 - Completed, 2 - Deposit exception
"depositType": 0, // Deposit type: 0 - External deposit, 1 - Internal deposit
"statusDesc": "xxxxx", // Deposit status description
"mobileNumber": "08666666", // User's mobile number
"email": "xxxxx", // User's email
"riskLevel": 0 // Risk level: 0 - No risk detected, 1 - Low risk, 2 - Medium risk, 3 - High risk
},
{
"symbol": "btc", // Deposit coin symbol
"id": 112331, // Deposit ID
"uid": -230000, // Deposit user ID
"createdAt": 1233200092, // Deposit creation time
"addressTo": "xxxxxxxxx", // Deposit address
"amount": "1", // Deposit amount
"txid": "xxxxx", // TXID
"status": 1, // Deposit status: 0 - Pending, 1 - Completed, 2 - Deposit exception
"depositType": 0, // Deposit type: 0 - External deposit, 1 - Internal deposit
"statusDesc": "xxxxx", // Deposit status description
"mobileNumber": "08666666", // User's mobile number
"email": "xxxxx", // User's email
"riskLevel": 0 // Risk level: 0 - No risk detected, 1 - Low risk, 2 - Medium risk, 3 - High risk
},
{
"symbol": "eth", // Deposit coin symbol
"id": 112331, // Deposit ID
"uid": -230000, // Deposit user ID
"createdAt": 1233200092, // Deposit creation time
"addressTo": "xxxxxxxxx", // Deposit address
"amount": "1", // Deposit amount
"txid": "xxxxx", // TXID
"status": 1, // Deposit status: 0 - Pending, 1 - Completed, 2 - Deposit exception
"depositType": 0, // Deposit type: 0 - External deposit, 1 - Internal deposit
"statusDesc": "xxxxx", // Deposit status description
"mobileNumber": "08666666", // User's mobile number
"email": "xxxxx", // User's email
"riskLevel": 0 // Risk level: 0 - No risk detected, 1 - Low risk, 2 - Medium risk, 3 - High risk
}
]
The following are the parameters involved in rsa encryption:
openId
String
NO
openId, userId must pass one, while passing, take openId
userId
String
NO
openId, userId must pass one, while passing, take openId
mobileNumber
String
NO
09011223
Cell phone number
pageSize
String
NO
20
Number of pages per page (default, 20, max 1000, can be equal to 1000)
pageNumber
String
NO
1
Number of pages (default 1, first page)
User cash withdrawal records
POST
https://service.xxx.com/platformapi/chainup/open/user/withdrawRecord
It is necessary to package the data in the parameter table into JSON strings and use rsa for parameter encryption and signature as data and sign in the body
Headers
Content-Type
String
application/json
Request Body
app_id*
String
Merchant AppKey
time*
String
data*
String
sign*
String
{
"code": "",
"msg": "",
"data": "",
"sign": ""
}
data:
[
{
"symbol": "BTC", // Withdrawal coin symbol
"id": 1112, // Withdrawal ID
"uid": 2302221, // User ID
"createdAt": 100892232313, // Withdrawal creation time
"addressTo": "xxxxxxxxx", // Withdrawal address
"amount": "20", // Withdrawal amount
"txid": "xxxxxxxxxx", // TXID
"status": 1, // Withdrawal status: 0 - Pending approval, 1 - Approved, 2 - Rejected, 3 - Payment in progress, 4 - Payment failed, 5 - Completed, 6 - Canceled
"statusDesc": "test", // Withdrawal status description
"fee": "20", // Fee
"mobileNumber": "19982112", // Mobile number
"email": "[email protected]", // Email
"warningLevel": 1, // Risk warning level
"warningLevelDesc": "test", // Warning level description
"warningTip": "resr", // Warning content
"warningTiplevel": 1 // Warning level displayed in merchant backend
},
{
"symbol": "BTC", // Withdrawal coin symbol
"id": 1112, // Withdrawal ID
"uid": 2302221, // User ID
"createdAt": 100892232313, // Withdrawal creation time
"addressTo": "xxxxxxxxx", // Withdrawal address
"amount": "20", // Withdrawal amount
"txid": "xxxxxxxxxx", // TXID
"status": 1, // Withdrawal status: 0 - Pending approval, 1 - Approved, 2 - Rejected, 3 - Payment in progress, 4 - Payment failed, 5 - Completed, 6 - Canceled
"statusDesc": "test", // Withdrawal status description
"fee": "20", // Fee
"mobileNumber": "19982112", // Mobile number
"email": "[email protected]", // Email
"warningLevel": 1, // Risk warning level
"warningLevelDesc": "test", // Warning level description
"warningTip": "resr", // Warning content
"warningTiplevel": 1 // Warning level displayed in merchant backend
}
]
The following are the parameters involved in rsa encryption:
openId
String
NO
openId, userId must pass one, while passing, take openId
userId
String
NO
openId, userId must pass one, while passing, take openId
mobileNumber
String
NO
09011223
Cell phone number
pageSize
String
NO
20
Number of pages per page (default, 20, max 1000, can be equal to 1000)
pageNumber
String
NO
1
Number of pages (default 1, first page)
Generate user's deposit address
User's deposit address
POST
https://service.xxx.com/platformapi/chainup/open/user/depositAddress
Headers
Content-Type
String
application/json
Request Body
app_id*
String
Merchant AppKey
data*
String
sign*
String
Signature
time*
String
{
"code": "",
"msg": "",
"data": "",
"sign":""
}
data:
[
{
"code": "0",
"msg": "Success",
"data": {
"address": "xxxxx",//deposit address
"meta": "xxxxx"//Return for special tokens, and return null string as default
}
}
]
appKey
String
YES
xxx_xxx
Merchant AppKey
openId
String
NO
openId, userId must pass one, while passing, take openId
userId
String
NO
openId, userId must pass one, while passing, take openId
symbol
String
YES
BTC
Symbol
sign
String
YES
2ae04ed9165624419bad68e9e0f3f2sa9fbd2ae04ed916511624419bad68e9e20f3f29fbd
Signature
User asset search (multiple currency)
User asset search (single currency)
POST
https://service.xxx.com/platformapi/chainup/open/ouser/userAccounts
Headers
Content-Type *
String
application/json
Request Body
app_id*
String
Merchant AppKey
data*
String
sign*
String
Signature
time*
String
{
"code": "",
"msg": "",
"data": "",
"sign":""
}
data:
[
{
"code": "0",
"msg": "Success",
"data": {
"BTCPrecision": "btc8", // Currency parameter + precision: Precision of the currency in the exchange
"accounts": [
{
"uid": "202113", // User ID
"balance": "1000", // Account balance
"tag": "xxxxx", // Description
"type": "2021101" // Asset code
},
{
"uid": "202113", // User ID
"balance": "1000", // Account balance
"tag": "xxxxx", // Description
"type": "2021101" // Asset code
}
],
"USDTPrecision": "usdt8" // Currency parameter + precision: Precision of the currency in the exchange
}
}
]
Parameters:
Either the UID or OpenID of the payee must exist, and if both are present, the OpenID takes precedence.
appKey
String
YES
xxx_xxx
Merchant AppKey
openId
String
NO
openId, userId must pass one, while passing, take openId
userId
String
NO
openId, userId must pass one, while passing, take openId
coinSymbols
String
YES
BTC
Currency type: e.g. BTC, USDT, BIKI, etc.; refer to the currency configuration in the exchange; multiple currencies are separated by commas: Example: "USDT,BTC,ETH"
assetType
String
NO
201
Common type: "201" : General account balance
sign
String
YES
2ae04ed9165624419bad68e9e0f3f2sa9fbd2ae04ed916511624419bad68e9e20f3f29fbd
Signature
User account balance (full currency)
POST
https://service.xxx.om//platformapi/chainup/open/user/accountBalance
Headers
Content-Type *
String
application/json
Request Body
app_id*
String
Merchant AppKey
data*
String
sign*
String
Signature
time*
String
{
"code": "",
"msg": "",
"data": "",
"sign":""
}
data:[
{
"code": "0",
"msg": "Success",
"message": null,
"data": {
"totalBalance": "100", // Total assets
"totalBalanceSymbol": "BTC", // Total asset symbol
"platformCoin": "xxx", // Platform coin for dividend configuration
"allCoinMap": { // Mapping of all coins, where the key is the uppercase coin symbol and the value is the asset details for each coin
"LTC": {
"walletTransactionOpen": 1, // Whether the coin has wallet transaction enabled
"isFiat": 0, // Whether it is a fiat currency, 0 for digital currency, 1 for fiat
"normal_balance": "200", // User's normal spot balance
"allBalance": "9000", // Total balance
"exchange_symbol": "Trading pair", // Trading pair symbol
"present_coin_balance": 9000, // Gift coin account
"lock_position_balance": "2000", // Lock position account
"btcValuatin": "10000", // BTC valuation
"sort": 20, // Sorting order
"depositOpen": 1, // Whether deposit is open
"lock_grant_divided_balance": "999999", // User's token lock + mining lock balance
"total_balance": "99999", // Total balance
"nc_lock_balance": "98888", // User's subscription frozen balance
"otcOpen": 1, // Whether OTC is open
"depositMin": 20, // Minimum deposit amount
"checked": "true", // Whether to hide zero assets, default to true
"coinName": "name", // Name
"lock_balance": "3000", // Frozen amount
"allBtcValuatin": "9918923", // All BTC valuation
"lock_position_v2_amount": "203213", // User's token lock account V2
"withdrawOpen": 1, // Whether withdrawal is open
"overcharge_balance": "9000"
},
"BCH": {
"walletTransactionOpen": 1, // Whether the coin has wallet transaction enabled
"isFiat": 0, // Whether it is a fiat currency, 0 for digital currency, 1 for fiat
"normal_balance": "200", // User's normal spot balance
"allBalance": "9000", // Total balance
"exchange_symbol": "Trading pair", // Trading pair symbol
"present_coin_balance": 9000, // Gift coin account
"lock_position_balance": "2000", // Lock position account
"btcValuatin": "10000", // BTC valuation
"sort": 20, // Sorting order
"depositOpen": 1, // Whether deposit is open
"lock_grant_divided_balance": "999999", // User's token lock + mining lock balance
"total_balance": "99999", // Total balance
"nc_lock_balance": "98888", // User's subscription frozen balance
"otcOpen": 1, // Whether OTC is open
"depositMin": 20, // Minimum deposit amount
"checked": "true", // Whether to hide zero assets, default to true
"coinName": "name", // Name
"lock_balance": "3000", // Frozen amount
"allBtcValuatin": "9918923", // All BTC valuation
"lock_position_v2_amount": "203213", // User's token lock account V2
"withdrawOpen": 1, // Whether withdrawal is open
"overcharge_balance": "9000"
}
}
}
}
]
Parameters:
(openId, userId, mobileNumber, email) One of these four must be provided.
appKey
String
YES
xxx_xxx
Merchant AppKey
openId
String
NO
openId, userId must pass one, while passing, take openId
userId
String
NO
openId, userId must pass one, while passing, take openId
mobileNumber
String
NO
09011223
Cell phone number
sign
String
YES
2ae04ed9165624419bad68e9e0f3f2sa9fbd2ae04ed916511624419bad68e9e20f3f29fbd
Signature
Batch User asset search (developing)
Batch query of user assets (specified currency pairs)
POST
https://service.xxx.com/platformapi/chainup/open/ouser/batchQueryUserAccounts
Headers
Content-Type *
String
application/json
Request Body:
app_id*
String
Merchant AppKey
data*
String
sign*
String
Signature
time*
String
{
"code": "",
"msg": "",
"data": "",
"sign":""
}
data:[
{
"code": "0",
"msg": "Success",
"data": {
"accounts": [
{
"uid": "202113", // User ID
"balance": "1000", // Account balance
"type": "202" // Asset code
"coin": "USDT", // coin name
"showName": "USDT" // coin show name
},
{
"uid": "202113", // User ID
"balance": "1000", // Account balance
"type": "201" // Asset code
"coin": "USDT", // coin name
"showName": "USDT" // coin show nam
}
],
}
}
]
//"Type" refers to the corresponding account type
type = 201(User: Normal Balance)
type = 202(User: Frozen)
type = 207(Lockup Account)
type = 210(OTC Merchant Margin Account)
type = 217(User: OTC Normal Balance)
type = 218(User: OTC Frozen)
type = 230(User: Lockup token account V2)
type = 221(User: Frozen token from Innovation trial zone subscription)
Parameters:
appKey*
String
Merchant AppKey
sign*
String
Signature
coinSymbols*
String
Currency type: e.g. BTC, USDT, BIKI, etc.; refer to the currency configuration in the exchange; multiple currencies are separated by commas: Example: "USDT,BTC,ETH"
updateTime
String
Update the time, check for this timestamp and accounts that have changed in the future. If the time when the time changes is not specified, the system starts to pull all data from the site
page
String
Page number, default 1
pageSize
String
Page size,default 20 ,Maximum support to1000
Parameters:
updateTime is a required parameter, Taking two queries as an example, first time 2023-09-01 00:00:00 second time 2023-09-01 00:10:00
first query:
account table record
1
1
10
201
2023-09-01 00:00:00
2
2
2
201
2023-09-01 00:00:00
3
1
2
202
2023-09-01 00:00:00
4
2
5
202
2023-09-01 00:02:00
5
3
5
201
2023-09-01 00:02:00
6
4
5
201
2023-09-01 00:02:00
7
6
5
201
2023-09-01 00:02:00
8
7
5
201
2023-09-01 00:02:00
9
8
5
201
2023-09-01 00:02:00
2023-09-01 00:00:00 timestemp: 1693497600000
current params is {"updateTime":1693497600000, coinSymbols: "btc,eth","page":1, "pageSize": 5}
The records found are id (1,2,3,4,5)
If the number of results is less than pageSize, end the loop
Found 5 records for pagination query. The query criteria are {"updateTime":1693497600000, coinSymbols: "BTC,ETH","page":2, "pageSize": 5} The records found are id (6,7,8,9)
second query:
account table record
1
1
12
201
2023-09-01 00:10:00
2
2
2
201
2023-09-01 00:00:00
3
1
0
202
2023-09-01 00:10:00
4
2
5
202
2023-09-01 00:02:00
5
3
5
201
2023-09-01 00:02:00
6
4
5
201
2023-09-01 00:02:00
7
6
5
201
2023-09-01 00:02:00
8
7
5
201
2023-09-01 00:02:00
9
8
5
201
2023-09-01 00:02:00
2023-09-01 00:10:00 timestemp: 1693498200000
current params is {"updateTime":1693498200000, coinSymbols: "BTC,ETH","page":1, "pageSize": 5} The records found are id (1,3)
Last updated