All URIs are relative to https://api.gateio.ws/api/v4
| Method | HTTP request | Description |
|---|---|---|
| getMyActivityEntry | GET /rewards/activity/my-activity-entry | My activity entry |
| listActivities | GET /rewards/activity/activity-list | Recommended activity list |
| listActivityTypes | GET /rewards/activity/activity-type | Activity type list |
GetMyActivityEntryResponse getMyActivityEntry()
My activity entry
Query user's Activity Center entry information, including activity icon and redirect link
// Import classes:importio.gate.gateapi.ApiClient;
importio.gate.gateapi.ApiException;
importio.gate.gateapi.Configuration;
importio.gate.gateapi.GateApiException;
importio.gate.gateapi.auth.*;
importio.gate.gateapi.models.*;
importio.gate.gateapi.api.ActivityApi;
publicclassExample {
publicstaticvoidmain(String[] args) {
ApiClientdefaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.gateio.ws/api/v4");
// Configure APIv4 authorization: apiv4defaultClient.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
ActivityApiapiInstance = newActivityApi(defaultClient);
try {
GetMyActivityEntryResponseresult = apiInstance.getMyActivityEntry();
System.out.println(result);
} catch (GateApiExceptione) {
System.err.println(String.format("Gate api exception, label: %s, message: %s", e.getErrorLabel(), e.getMessage()));
e.printStackTrace();
} catch (ApiExceptione) {
System.err.println("Exception when calling ActivityApi#getMyActivityEntry");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successfully returns activity entry information | - |
ListActivitiesResponse listActivities().recommendType(recommendType).typeIds(typeIds).keywords(keywords).page(page).pageSize(pageSize).sortBy(sortBy).execute();
Recommended activity list
Query recommended activity list from Activity Center, supports pagination and sorting
// Import classes:importio.gate.gateapi.ApiClient;
importio.gate.gateapi.ApiException;
importio.gate.gateapi.Configuration;
importio.gate.gateapi.GateApiException;
importio.gate.gateapi.auth.*;
importio.gate.gateapi.models.*;
importio.gate.gateapi.api.ActivityApi;
publicclassExample {
publicstaticvoidmain(String[] args) {
ApiClientdefaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.gateio.ws/api/v4");
// Configure APIv4 authorization: apiv4defaultClient.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
ActivityApiapiInstance = newActivityApi(defaultClient);
StringrecommendType = "recommendType_example"; // String | Recommendation type: hot for popular activities, type for filtering by activity type (type_ids), scenario for matching by activity nameStringtypeIds = "typeIds_example"; // String | Activity type ID, multiple IDs separated by commas (supports filtering by activity type through this field)Stringkeywords = "keywords_example"; // String | Activity name. When scenario type is used, keyword matching is appliedIntegerpage = 1; // Integer | Page number, starting from 1IntegerpageSize = 10; // Integer | Items per pageStringsortBy = "sortBy_example"; // String | Sort order, e.g., hot for sorting by popularitytry {
ListActivitiesResponseresult = apiInstance.listActivities()
.recommendType(recommendType)
.typeIds(typeIds)
.keywords(keywords)
.page(page)
.pageSize(pageSize)
.sortBy(sortBy)
.execute();
System.out.println(result);
} catch (GateApiExceptione) {
System.err.println(String.format("Gate api exception, label: %s, message: %s", e.getErrorLabel(), e.getMessage()));
e.printStackTrace();
} catch (ApiExceptione) {
System.err.println("Exception when calling ActivityApi#listActivities");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| recommendType | String | Recommendation type: hot for popular activities, type for filtering by activity type (type_ids), scenario for matching by activity name | [optional] |
| typeIds | String | Activity type ID, multiple IDs separated by commas (supports filtering by activity type through this field) | [optional] |
| keywords | String | Activity name. When scenario type is used, keyword matching is applied | [optional] |
| page | Integer | Page number, starting from 1 | [optional] [default to 1] |
| pageSize | Integer | Items per page | [optional] [default to 10] |
| sortBy | String | Sort order, e.g., hot for sorting by popularity | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successfully returns activity list | - |
ListActivityTypesResponse listActivityTypes()
Activity type list
Query all activity types supported by Activity Center
// Import classes:importio.gate.gateapi.ApiClient;
importio.gate.gateapi.ApiException;
importio.gate.gateapi.Configuration;
importio.gate.gateapi.GateApiException;
importio.gate.gateapi.models.*;
importio.gate.gateapi.api.ActivityApi;
publicclassExample {
publicstaticvoidmain(String[] args) {
ApiClientdefaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.gateio.ws/api/v4");
ActivityApiapiInstance = newActivityApi(defaultClient);
try {
ListActivityTypesResponseresult = apiInstance.listActivityTypes();
System.out.println(result);
} catch (GateApiExceptione) {
System.err.println(String.format("Gate api exception, label: %s, message: %s", e.getErrorLabel(), e.getMessage()));
e.printStackTrace();
} catch (ApiExceptione) {
System.err.println("Exception when calling ActivityApi#listActivityTypes");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}This endpoint does not need any parameter.
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successfully returns activity type list | - |