π API Endpoints
π° Fee Management
Fee configuration and rate management endpoints. 4 endpoints available.
π― Quick Stats
- Total Endpoints: 4
- Base URL:
https://api.market.decenctype.com - Authentication: Bearer Token / API Key
π Methods
- π GET: 2 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 | /fee/user/{userId} | Get user fee rate |
π GET | /fee | Get fee configurations list |
π POST | /fee | Create fee configuration |
βοΈ PUT | /fee/{feeId} | Update fee configuration |
π Detailed Documentation
Get user fee rate
GET
/fee/user/{userId}Full URL
https://api.market.decenctype.com/fee/user/{userId}π― Path Parameters
userId(string) - β Required: User ID
π Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
feeType | string | β | Fee type (e.g., exchange, withdrawal) (η€ΊδΎ: exchange) |
accountType | string | β | Account type |
Description: Get user fee rate
Operation ID: getUserFeeRate
Response Status:
- β 200: User fee rate retrieved successfully
π Response Examples
response.json
1{2 "id": "123e4567-e89b-12d3-a456-426614174000",3 "type": "exchange",4 "level": 1,5 "exchangeFee": 0.025,6 "minFee": 2,7 "maxFee": 100,8 "groupId": "123e4567-e89b-12d3-a456-426614174000",9 "merchantId": "123e4567-e89b-12d3-a456-426614174000",10 "status": "active",11 "description": "Standard exchange fee for level 1 users",12 "userGroup": "example-userGroup",13 "merchant": "example-merchant"14}π Example Request
curl -X GET "https://api.market.decenctype.com/fee/user/example-id" \\
-H "Authorization: Bearer YOUR_TOKEN" \\
-H "Content-Type: application/json"Get fee configurations list
GET
/feeFull URL
https://api.market.decenctype.com/feeπ Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
merchantId | string | β | Filter by merchant ID |
groupId | string | β | Filter by user group ID |
type | string | β | Filter by fee type |
status | string | β | Filter by status |
page | number | β | No description |
pageSize | number | β | No description |
Description: Get fee configurations list
Operation ID: getFeeConfigurations
Response Status:
- β 200: Fee configurations retrieved successfully
π Response Examples
response.json
1{2 "rows": [3 {4 "id": "123e4567-e89b-12d3-a456-426614174000",5 "type": "exchange",6 "level": 1,7 "exchangeFee": 0.025,8 "minFee": 2,9 "status": "active",10 "userGroup": "example-userGroup",11 "merchant": "example-merchant"12 }13 ],14 "count": 115}π Example Request
curl -X GET "https://api.market.decenctype.com/fee" \\
-H "Authorization: Bearer YOUR_TOKEN" \\
-H "Content-Type: application/json"Create fee configuration
POST
/feeFull URL
https://api.market.decenctype.com/feeπ Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string (exchange, withdrawal, deposit, transfer) | β | θ΄Ήηη±»ε |
level | number | β | θ΄ΉηηηΊ§ (ζε°: 0, ζε€§: 10) |
exchangeFee | number | β | δΊ€ζθ΄Ήη (ηΎεζ―) (ζε°: 0, ζε€§: 100) |
minFee | number | β | ζε°θ΄Ήη¨ (ζε°: 0) |
maxFee | number | β | ζε€§θ΄Ήη¨ (ζε°: 0) |
groupId | string | β | η¨ζ·η»ID |
merchantId | string | β | εζ·ID |
status | string (active, inactive) | β | θ΄ΉηηΆζ |
description | string | β | θ΄ΉηζθΏ° (ζε€§ιΏεΊ¦: 500) |
Description: Create fee configuration
Operation ID: createFeeConfiguration
Response Status:
- β 201: Fee configuration created successfully
π Response Examples
response.json
1{2 "id": "123e4567-e89b-12d3-a456-426614174000",3 "type": "exchange",4 "level": 1,5 "exchangeFee": 0.025,6 "minFee": 2,7 "maxFee": 100,8 "groupId": "123e4567-e89b-12d3-a456-426614174000",9 "merchantId": "123e4567-e89b-12d3-a456-426614174000",10 "status": "active",11 "description": "Standard exchange fee for level 1 users",12 "userGroup": "example-userGroup",13 "merchant": "example-merchant"14}π Example Request
curl -X POST "https://api.market.decenctype.com/fee" \\
-H "Authorization: Bearer YOUR_TOKEN" \\
-H "Content-Type: application/json" \\
-d '{
"type": "exchange",
"exchangeFee": 0.1,
"minFee": 1
}'Update fee configuration
PUT
/fee/{feeId}Full URL
https://api.market.decenctype.com/fee/{feeId}π― Path Parameters
feeId(string) - β Required: Fee configuration ID
π Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string (exchange, withdrawal, deposit, transfer) | β | θ΄Ήηη±»ε |
level | number | β | θ΄ΉηηηΊ§ (ζε°: 0, ζε€§: 10) |
exchangeFee | number | β | δΊ€ζθ΄Ήη (ηΎεζ―) (ζε°: 0, ζε€§: 100) |
minFee | number | β | ζε°θ΄Ήη¨ (ζε°: 0) |
maxFee | number | β | ζε€§θ΄Ήη¨ (ζε°: 0) |
groupId | string | β | η¨ζ·η»ID |
merchantId | string | β | εζ·ID |
status | string (active, inactive) | β | θ΄ΉηηΆζ |
description | string | β | θ΄ΉηζθΏ° (ζε€§ιΏεΊ¦: 500) |
Description: Update fee configuration
Operation ID: updateFeeConfiguration
Response Status:
- β 200: Fee configuration updated successfully
π Response Examples
response.json
1{2 "id": "123e4567-e89b-12d3-a456-426614174000",3 "type": "exchange",4 "level": 1,5 "exchangeFee": 0.025,6 "minFee": 2,7 "maxFee": 100,8 "groupId": "123e4567-e89b-12d3-a456-426614174000",9 "merchantId": "123e4567-e89b-12d3-a456-426614174000",10 "status": "active",11 "description": "Standard exchange fee for level 1 users",12 "userGroup": "example-userGroup",13 "merchant": "example-merchant"14}π Example Request
curl -X PUT "https://api.market.decenctype.com/fee/example-id" \\
-H "Authorization: Bearer YOUR_TOKEN" \\
-H "Content-Type: application/json" \\
-d '{}'