# Binance Task Completion API Documentation
## Overview
The Task Completion API provides endpoints for checking task completion status with comprehensive error handling.
## API Base URL
https://binance-api-production.up.railway.app/
## Return Codes
```typescript
ReturnCode {
SUCCESS = "000000" // Request successful
TOO_MANY_REQUESTS = "000001" // Rate limit exceeded
SYSTEM_BUSY = "000002" // System is currently busy
INVALID_ARGUMENT = "000006" // Invalid input parameters
}
```
## Swagger Documentation
Swagger UI is available at `/swagger` endpoint.
## API Endpoints
### Get Server Time
GET `/v1/time`
Returns the current server timestamp.
#### Success Response
```json
{
"code": "000000",
"message": "success",
"data": 1703174400000
}
```
### Check Task Completion Status
GET `/v1/task/completion`
Retrieves the completion status for specified tasks associated with a wallet address.
#### Query Parameters
```
walletAddress: string // Ethereum wallet address
task: string // JSON stringified array of task identifiers
```
#### Example Request
```
GET /v1/task/completion?walletAddress=0x742d35Cc6634C0532925a3b844Bc454e4438f44e&task=["project1-task1","project2-task1"]
```
#### Example Parameters
```json
{
"walletAddress": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"task": "["project1-task1","project2-task1"]"
}
```
#### Validation Rules
- `walletAddress`: Must be a valid Ethereum address (0x followed by 40 hexadecimal characters)
- `task`: Must be a valid JSON string array
#### Success Response
```json
{
"code": "000000",
"message": "success",
"data": {
"project1-task1": true,
"project2-task1": false
}
}
```
#### Error Responses
1. Invalid Arguments
```json
{
"code": "000006",
"message": "invalid argument",
"data": null
}
```
2. System Busy
```json
{
"code": "000002",
"message": "system busy",
"data": null
}
```
3. Rate Limit Exceeded
```json
{
"code": "000001",
"message": "too many requests",
"data": null
}
```
## Request Validation
The API implements several validation checks:
1. Task Format Validation
- Task parameter must be valid JSON array
- All array elements must be strings
- Tasks are formatted as "projectId-task"
## Database Schema
### User Document
```typescript
interface User {
walletAddress: string;
tasks: Array<{
projectId: string;
task: string;
}>;
}
```