๐ณ Wallet Management
Digital wallet, balance, and crypto/fiat account endpoints. 9 endpoints available.
๐ฏ Quick Stats
- Total Endpoints: 9
- Base URL:
https://api.market.decenctype.com - Authentication: Bearer Token / API Key
๐ Methods
- ๐ GET: 7 endpoints
- ๐ POST: 1 endpoints
- โ๏ธ PUT: 1 endpoints
๐ Authentication
All endpoints in this section use the same authentication methods. Choose one:
๐ Bearer Token (Recommended)
For user session authentication
Add to request headers:
Authorization: Bearer YOUR_TOKEN๐ง API Key
For server-side authentication
Add to request headers:
X-API-KEY: YOUR_API_KEYโ ๏ธ Important: Do not use both authentication methods simultaneously in the same request.
๐ Endpoints Overview
| Method | Endpoint | Description |
|---|---|---|
๐ GET | /wallet/chain-type/{token} | Get chain type |
๐ GET | /wallet/address | Get wallet address |
๐ POST | /wallet/address/generate | Generate a new wallet address |
๐ GET | /wallet/account/crypto | Get wallet crypto account |
๐ GET | /wallet/account/fiat | Get wallet fiat account |
๐ GET | /wallet/accounts | Get all user accounts (crypto and fiat) |
๐ GET | /wallet/exchange-rates | Get exchange rates |
โ๏ธ PUT | /wallet/exchange-rates | No description |
๐ GET | /wallet/account/system | Get wallet accounts for system |
๐ Detailed Documentation
Get chain type
/wallet/chain-type/{token}https://api.market.decenctype.com/wallet/chain-type/{token}๐ฏ Path Parameters
token(string) - โ Required: No description
Description: Get chain type
Operation ID: getChainType
Response Status:
- โ 200: The found chain type
๐ Example Request
curl -X GET "https://api.market.decenctype.com/wallet/chain-type/example-token" \\
-H "Authorization: Bearer YOUR_TOKEN" \\
-H "Content-Type: application/json"Get wallet address
/wallet/addresshttps://api.market.decenctype.com/wallet/address๐ Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | โ | ๅฐๅ็ฑปๅ๏ผ็จๆทๅฐๅๆๅๆทๅฐๅ |
chainType | string | โ | ้พ็ฑปๅ |
ignoreStatus | boolean | โ | ๆฏๅฆๅฟฝ็ฅๅฐๅ็ถๆ |
Description: Get wallet address
Operation ID: getAddress
Response Status:
- โ 200: The found record
๐ Response Examples
1[2 {3 "chainAddressId": "c0a80121-7ac0-4e1c-9d67-a6b5e7b7c8d9",4 "chainAddress": "0x1234567890abcdef1234567890abcdef12345678",5 "chainType": "ETH",6 "type": "user",7 "userId": "c0a80121-7ac0-4e1c-9d67-a6b5e7b7c8d9",8 "merchantId": "c0a80121-7ac0-4e1c-9d67-a6b5e7b7c8d9",9 "status": "active"10 }11]๐ Example Request
curl -X GET "https://api.market.decenctype.com/wallet/address" \\
-H "Authorization: Bearer YOUR_TOKEN" \\
-H "Content-Type: application/json"Generate a new wallet address
/wallet/address/generatehttps://api.market.decenctype.com/wallet/address/generate๐ Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
chainType | string | โ | Chain Type |
chainId | string | โ | Chain ID |
alias | string | โ | Alias of the address |
merchantId | string | โ | Merchant ID |
Description: Generate a new wallet address
Operation ID: generateAddress
Response Status:
- โ 201: Success
Merchant ID is only required for merchant type
๐ Response Examples
1{2 "chainAddressId": "c0a80121-7ac0-4e1c-9d67-a6b5e7b7c8d9",3 "chainAddress": "0x1234567890abcdef1234567890abcdef12345678",4 "chainType": "ETH",5 "type": "user",6 "userId": "c0a80121-7ac0-4e1c-9d67-a6b5e7b7c8d9",7 "merchantId": "c0a80121-7ac0-4e1c-9d67-a6b5e7b7c8d9",8 "status": "active"9}๐ Example Request
curl -X POST "https://api.market.decenctype.com/wallet/address/generate" \\
-H "Authorization: Bearer YOUR_TOKEN" \\
-H "Content-Type: application/json" \\
-d '{
"chainType": "example-chainType",
"chainId": "example-id"
}'Get wallet crypto account
/wallet/account/cryptohttps://api.market.decenctype.com/wallet/account/crypto๐ Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
accountType | string | โ | Type of account (็คบไพ: user) |
token | string | โ | Cryptocurrency token type (็คบไพ: USDT) |
Description: Get wallet crypto account
Operation ID: getCryptoAccount
Response Status:
- โ 200: The found crypto account record
๐ Response Examples
1{2 "accountBalance": 1,3 "accountBalanceFrozen": 1,4 "accountToken": {},5 "accountId": "example-id",6 "userId": "example-id",7 "merchantId": "example-id",8 "accountType": {},9 "accountStatus": {}10}๐ Example Request
curl -X GET "https://api.market.decenctype.com/wallet/account/crypto" \\
-H "Authorization: Bearer YOUR_TOKEN" \\
-H "Content-Type: application/json"Get wallet fiat account
/wallet/account/fiathttps://api.market.decenctype.com/wallet/account/fiat๐ Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
accountType | string | โ | Type of account (็คบไพ: user) |
currency | string | โ | Fiat currency type (็คบไพ: USD) |
Description: Get wallet fiat account
Operation ID: getFiatAccount
Response Status:
- โ 200: The found fiat account record
๐ Response Examples
1{2 "accountBalance": 1,3 "accountBalanceFrozen": 1,4 "accountCurrency": {},5 "accountId": "example-id",6 "userId": "example-id",7 "merchantId": "example-id",8 "accountType": {},9 "accountStatus": {}10}๐ Example Request
curl -X GET "https://api.market.decenctype.com/wallet/account/fiat" \\
-H "Authorization: Bearer YOUR_TOKEN" \\
-H "Content-Type: application/json"Get all user accounts (crypto and fiat)
/wallet/accountshttps://api.market.decenctype.com/wallet/accounts๐ Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ignoreStatus | boolean | โ | Whether to ignore account status |
Description: Get all user accounts (crypto and fiat)
Operation ID: getAllUserAccounts
Response Status:
- โ 200: All user accounts retrieved successfully
๐ Response Examples
1{2 "fiatAccounts": [3 {4 "accountBalance": 1,5 "accountBalanceFrozen": 1,6 "accountCurrency": {},7 "accountId": "example-id",8 "userId": "example-id",9 "merchantId": "example-id",10 "accountType": {},11 "accountStatus": {}12 }13 ],14 "cryptoAccounts": [15 {16 "accountBalance": 1,17 "accountBalanceFrozen": 1,18 "accountToken": {},19 "accountId": "example-id",20 "userId": "example-id",21 "merchantId": "example-id",22 "accountType": {},23 "accountStatus": {}24 }25 ]26}๐ Example Request
curl -X GET "https://api.market.decenctype.com/wallet/accounts" \\
-H "Authorization: Bearer YOUR_TOKEN" \\
-H "Content-Type: application/json"Get exchange rates
/wallet/exchange-rateshttps://api.market.decenctype.com/wallet/exchange-rates๐ Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
from | string | โ | ๅบ็ก่ดงๅธ็ฑปๅ (็คบไพ: USDT,USDC,BTC,ETH) |
to | string | โ | ็ฎๆ ่ดงๅธ็ฑปๅ๏ผๅคไธชไปฅ้ๅทๅ้ (็คบไพ: USD,EUR) |
Description: Get exchange rates
Operation ID: getExchangeRates
Response Status:
- โ 200: The found exchange rates
๐ Response Examples
1[2 {3 "rateId": 1,4 "fromCurrency": "example-fromCurrency",5 "toCurrency": "example-toCurrency",6 "exchangeRate": 17 }8]๐ Example Request
curl -X GET "https://api.market.decenctype.com/wallet/exchange-rates" \\
-H "Authorization: Bearer YOUR_TOKEN" \\
-H "Content-Type: application/json"PUT /wallet/exchange-rates
/wallet/exchange-rateshttps://api.market.decenctype.com/wallet/exchange-rates๐ Authentication: Required (see authentication section above)
Operation ID: updateExchangeRates
Response Status:
- โ 200: Success
๐ Example Request
curl -X PUT "https://api.market.decenctype.com/wallet/exchange-rates" \\
-H "Authorization: Bearer YOUR_TOKEN" \\
-H "Content-Type: application/json"Get wallet accounts for system
/wallet/account/systemhttps://api.market.decenctype.com/wallet/account/system๐ Authentication: Required (see authentication section above)
Description: Get wallet accounts for system
Operation ID: getSystemAccount
Response Status:
- โ 200: The found system account record
This endpoint is used to get the system account information, and can only be invoked by admin.
๐ Response Examples
1{2 "cryptoAccounts": [3 {4 "accountBalance": 1,5 "accountBalanceFrozen": 1,6 "accountToken": {},7 "accountId": "example-id",8 "userId": "example-id",9 "merchantId": "example-id",10 "accountType": {},11 "accountStatus": {}12 }13 ],14 "fiatAccounts": [15 {16 "accountBalance": 1,17 "accountBalanceFrozen": 1,18 "accountCurrency": {},19 "accountId": "example-id",20 "userId": "example-id",21 "merchantId": "example-id",22 "accountType": {},23 "accountStatus": {}24 }25 ]26}๐ Example Request
curl -X GET "https://api.market.decenctype.com/wallet/account/system" \\
-H "Authorization: Bearer YOUR_TOKEN" \\
-H "Content-Type: application/json"