All URIs are relative to https://api.gateio.ws/api/v4
| Method | HTTP request | Description |
|---|---|---|
| agencyTransactionHistory | GET /rebate/agency/transaction_history | Broker obtains transaction history of recommended users |
| agencyCommissionsHistory | GET /rebate/agency/commission_history | Broker obtains rebate history of recommended users |
| partnerTransactionHistory | GET /rebate/partner/transaction_history | Partner obtains transaction history of recommended users |
| partnerCommissionsHistory | GET /rebate/partner/commission_history | Partner obtains rebate records of recommended users |
| partnerSubList | GET /rebate/partner/sub_list | Partner subordinate list |
| rebateBrokerCommissionHistory | GET /rebate/broker/commission_history | Broker obtains user's rebate records |
| rebateBrokerTransactionHistory | GET /rebate/broker/transaction_history | Broker obtains user's trading history |
| rebateUserInfo | GET /rebate/user/info | User obtains rebate information |
| userSubRelation | GET /rebate/user/sub_relation | User subordinate relationship |
| getPartnerApplicationRecent | GET /rebate/partner/applications/recent | Get recent partner application records |
| getPartnerEligibility | GET /rebate/partner/eligibility | Check partner application eligibility |
| getPartnerAgentDataAggregated | GET /rebate/partner/data/aggregated | Aggregated partner agent statistics |
List<AgencyTransactionHistory> agencyTransactionHistory().currencyPair(currencyPair).userId(userId).from(from).to(to).limit(limit).offset(offset).execute();
Broker obtains transaction history of recommended users
Record query time range cannot exceed 30 days
// Import classes:
import io.gate.gateapi.ApiClient;
import io.gate.gateapi.ApiException;
import io.gate.gateapi.Configuration;
import io.gate.gateapi.GateApiException;
import io.gate.gateapi.auth.*;
import io.gate.gateapi.models.*;
import io.gate.gateapi.api.RebateApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.gateio.ws/api/v4");
// Configure APIv4 authorization: apiv4
defaultClient.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
RebateApi apiInstance = new RebateApi(defaultClient);
String currencyPair = "BTC_USDT"; // String | Specify the trading pair. If not specified, returns all trading pairs
Long userId = 10003L; // Long | User ID. If not specified, all user records will be returned
Long from = 1602120000L; // Long | Start time for querying records. If not specified, defaults to 7 days before current time
Long to = 1602123600L; // Long | End timestamp for the query, defaults to current time if not specified
Integer limit = 100; // Integer | Maximum number of records returned in a single list
Integer offset = 0; // Integer | List offset, starting from 0
try {
List<AgencyTransactionHistory> result = apiInstance.agencyTransactionHistory()
.currencyPair(currencyPair)
.userId(userId)
.from(from)
.to(to)
.limit(limit)
.offset(offset)
.execute();
System.out.println(result);
} catch (GateApiException e) {
System.err.println(String.format("Gate api exception, label: %s, message: %s", e.getErrorLabel(), e.getMessage()));
e.printStackTrace();
} catch (ApiException e) {
System.err.println("Exception when calling RebateApi#agencyTransactionHistory");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| currencyPair | String | Specify the trading pair. If not specified, returns all trading pairs | [optional] |
| userId | Long | User ID. If not specified, all user records will be returned | [optional] |
| from | Long | Start time for querying records. If not specified, defaults to 7 days before current time | [optional] |
| to | Long | End timestamp for the query, defaults to current time if not specified | [optional] |
| limit | Integer | Maximum number of records returned in a single list | [optional] [default to 100] |
| offset | Integer | List offset, starting from 0 | [optional] [default to 0] |
List<AgencyTransactionHistory>
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List retrieved successfully | - |
List<AgencyCommissionHistory> agencyCommissionsHistory().currency(currency).commissionType(commissionType).userId(userId).from(from).to(to).limit(limit).offset(offset).execute();
Broker obtains rebate history of recommended users
Record query time range cannot exceed 30 days
// Import classes:
import io.gate.gateapi.ApiClient;
import io.gate.gateapi.ApiException;
import io.gate.gateapi.Configuration;
import io.gate.gateapi.GateApiException;
import io.gate.gateapi.auth.*;
import io.gate.gateapi.models.*;
import io.gate.gateapi.api.RebateApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.gateio.ws/api/v4");
// Configure APIv4 authorization: apiv4
defaultClient.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
RebateApi apiInstance = new RebateApi(defaultClient);
String currency = "BTC"; // String | Specify the currency. If not specified, returns all currencies
Integer commissionType = 1; // Integer | Rebate type: 1 - Direct rebate, 2 - Indirect rebate, 3 - Self rebate
Long userId = 10003L; // Long | User ID. If not specified, all user records will be returned
Long from = 1602120000L; // Long | Start time for querying records. If not specified, defaults to 7 days before current time
Long to = 1602123600L; // Long | End timestamp for the query, defaults to current time if not specified
Integer limit = 100; // Integer | Maximum number of records returned in a single list
Integer offset = 0; // Integer | List offset, starting from 0
try {
List<AgencyCommissionHistory> result = apiInstance.agencyCommissionsHistory()
.currency(currency)
.commissionType(commissionType)
.userId(userId)
.from(from)
.to(to)
.limit(limit)
.offset(offset)
.execute();
System.out.println(result);
} catch (GateApiException e) {
System.err.println(String.format("Gate api exception, label: %s, message: %s", e.getErrorLabel(), e.getMessage()));
e.printStackTrace();
} catch (ApiException e) {
System.err.println("Exception when calling RebateApi#agencyCommissionsHistory");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| currency | String | Specify the currency. If not specified, returns all currencies | [optional] |
| commissionType | Integer | Rebate type: 1 - Direct rebate, 2 - Indirect rebate, 3 - Self rebate | [optional] |
| userId | Long | User ID. If not specified, all user records will be returned | [optional] |
| from | Long | Start time for querying records. If not specified, defaults to 7 days before current time | [optional] |
| to | Long | End timestamp for the query, defaults to current time if not specified | [optional] |
| limit | Integer | Maximum number of records returned in a single list | [optional] [default to 100] |
| offset | Integer | List offset, starting from 0 | [optional] [default to 0] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List retrieved successfully | - |
PartnerTransactionHistory partnerTransactionHistory().currencyPair(currencyPair).userId(userId).from(from).to(to).limit(limit).offset(offset).execute();
Partner obtains transaction history of recommended users
Record query time range cannot exceed 30 days
// Import classes:
import io.gate.gateapi.ApiClient;
import io.gate.gateapi.ApiException;
import io.gate.gateapi.Configuration;
import io.gate.gateapi.GateApiException;
import io.gate.gateapi.auth.*;
import io.gate.gateapi.models.*;
import io.gate.gateapi.api.RebateApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.gateio.ws/api/v4");
// Configure APIv4 authorization: apiv4
defaultClient.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
RebateApi apiInstance = new RebateApi(defaultClient);
String currencyPair = "BTC_USDT"; // String | Specify the trading pair. If not specified, returns all trading pairs
Long userId = 10003L; // Long | User ID. If not specified, all user records will be returned
Long from = 1602120000L; // Long | Start time for querying records. If not specified, defaults to 7 days before current time
Long to = 1602123600L; // Long | End timestamp for the query, defaults to current time if not specified
Integer limit = 100; // Integer | Maximum number of records returned in a single list
Integer offset = 0; // Integer | List offset, starting from 0
try {
PartnerTransactionHistory result = apiInstance.partnerTransactionHistory()
.currencyPair(currencyPair)
.userId(userId)
.from(from)
.to(to)
.limit(limit)
.offset(offset)
.execute();
System.out.println(result);
} catch (GateApiException e) {
System.err.println(String.format("Gate api exception, label: %s, message: %s", e.getErrorLabel(), e.getMessage()));
e.printStackTrace();
} catch (ApiException e) {
System.err.println("Exception when calling RebateApi#partnerTransactionHistory");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| currencyPair | String | Specify the trading pair. If not specified, returns all trading pairs | [optional] |
| userId | Long | User ID. If not specified, all user records will be returned | [optional] |
| from | Long | Start time for querying records. If not specified, defaults to 7 days before current time | [optional] |
| to | Long | End timestamp for the query, defaults to current time if not specified | [optional] |
| limit | Integer | Maximum number of records returned in a single list | [optional] [default to 100] |
| offset | Integer | List offset, starting from 0 | [optional] [default to 0] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List retrieved successfully | - |
PartnerCommissionHistory partnerCommissionsHistory().currency(currency).userId(userId).from(from).to(to).limit(limit).offset(offset).execute();
Partner obtains rebate records of recommended users
Record query time range cannot exceed 30 days
// Import classes:
import io.gate.gateapi.ApiClient;
import io.gate.gateapi.ApiException;
import io.gate.gateapi.Configuration;
import io.gate.gateapi.GateApiException;
import io.gate.gateapi.auth.*;
import io.gate.gateapi.models.*;
import io.gate.gateapi.api.RebateApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.gateio.ws/api/v4");
// Configure APIv4 authorization: apiv4
defaultClient.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
RebateApi apiInstance = new RebateApi(defaultClient);
String currency = "BTC"; // String | Specify the currency. If not specified, returns all currencies
Long userId = 10003L; // Long | User ID. If not specified, all user records will be returned
Long from = 1602120000L; // Long | Start time for querying records. If not specified, defaults to 7 days before current time
Long to = 1602123600L; // Long | End timestamp for the query, defaults to current time if not specified
Integer limit = 100; // Integer | Maximum number of records returned in a single list
Integer offset = 0; // Integer | List offset, starting from 0
try {
PartnerCommissionHistory result = apiInstance.partnerCommissionsHistory()
.currency(currency)
.userId(userId)
.from(from)
.to(to)
.limit(limit)
.offset(offset)
.execute();
System.out.println(result);
} catch (GateApiException e) {
System.err.println(String.format("Gate api exception, label: %s, message: %s", e.getErrorLabel(), e.getMessage()));
e.printStackTrace();
} catch (ApiException e) {
System.err.println("Exception when calling RebateApi#partnerCommissionsHistory");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| currency | String | Specify the currency. If not specified, returns all currencies | [optional] |
| userId | Long | User ID. If not specified, all user records will be returned | [optional] |
| from | Long | Start time for querying records. If not specified, defaults to 7 days before current time | [optional] |
| to | Long | End timestamp for the query, defaults to current time if not specified | [optional] |
| limit | Integer | Maximum number of records returned in a single list | [optional] [default to 100] |
| offset | Integer | List offset, starting from 0 | [optional] [default to 0] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List retrieved successfully | - |
PartnerSubList partnerSubList().userId(userId).limit(limit).offset(offset).execute();
Partner subordinate list
Including sub-agents, direct customers, and indirect customers
// Import classes:
import io.gate.gateapi.ApiClient;
import io.gate.gateapi.ApiException;
import io.gate.gateapi.Configuration;
import io.gate.gateapi.GateApiException;
import io.gate.gateapi.auth.*;
import io.gate.gateapi.models.*;
import io.gate.gateapi.api.RebateApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.gateio.ws/api/v4");
// Configure APIv4 authorization: apiv4
defaultClient.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
RebateApi apiInstance = new RebateApi(defaultClient);
Long userId = 10003L; // Long | User ID. If not specified, all user records will be returned
Integer limit = 100; // Integer | Maximum number of records returned in a single list
Integer offset = 0; // Integer | List offset, starting from 0
try {
PartnerSubList result = apiInstance.partnerSubList()
.userId(userId)
.limit(limit)
.offset(offset)
.execute();
System.out.println(result);
} catch (GateApiException e) {
System.err.println(String.format("Gate api exception, label: %s, message: %s", e.getErrorLabel(), e.getMessage()));
e.printStackTrace();
} catch (ApiException e) {
System.err.println("Exception when calling RebateApi#partnerSubList");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| userId | Long | User ID. If not specified, all user records will be returned | [optional] |
| limit | Integer | Maximum number of records returned in a single list | [optional] [default to 100] |
| offset | Integer | List offset, starting from 0 | [optional] [default to 0] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List retrieved successfully | - |
List<BrokerCommission> rebateBrokerCommissionHistory().limit(limit).offset(offset).userId(userId).from(from).to(to).execute();
Broker obtains user's rebate records
Record query time range cannot exceed 30 days
// Import classes:
import io.gate.gateapi.ApiClient;
import io.gate.gateapi.ApiException;
import io.gate.gateapi.Configuration;
import io.gate.gateapi.GateApiException;
import io.gate.gateapi.auth.*;
import io.gate.gateapi.models.*;
import io.gate.gateapi.api.RebateApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.gateio.ws/api/v4");
// Configure APIv4 authorization: apiv4
defaultClient.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
RebateApi apiInstance = new RebateApi(defaultClient);
Integer limit = 100; // Integer | Maximum number of records returned in a single list
Integer offset = 0; // Integer | List offset, starting from 0
Long userId = 10003L; // Long | User ID. If not specified, all user records will be returned
Long from = 1711929600L; // Long | Start time of the query record. If not specified, defaults to 30 days before the current time
Long to = 1714521600L; // Long | End timestamp for the query, defaults to current time if not specified
try {
List<BrokerCommission> result = apiInstance.rebateBrokerCommissionHistory()
.limit(limit)
.offset(offset)
.userId(userId)
.from(from)
.to(to)
.execute();
System.out.println(result);
} catch (GateApiException e) {
System.err.println(String.format("Gate api exception, label: %s, message: %s", e.getErrorLabel(), e.getMessage()));
e.printStackTrace();
} catch (ApiException e) {
System.err.println("Exception when calling RebateApi#rebateBrokerCommissionHistory");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| limit | Integer | Maximum number of records returned in a single list | [optional] [default to 100] |
| offset | Integer | List offset, starting from 0 | [optional] [default to 0] |
| userId | Long | User ID. If not specified, all user records will be returned | [optional] |
| from | Long | Start time of the query record. If not specified, defaults to 30 days before the current time | [optional] |
| to | Long | End timestamp for the query, defaults to current time if not specified | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List retrieved successfully | - |
List<BrokerTransactionHistory> rebateBrokerTransactionHistory().limit(limit).offset(offset).userId(userId).from(from).to(to).execute();
Broker obtains user's trading history
Record query time range cannot exceed 30 days
// Import classes:
import io.gate.gateapi.ApiClient;
import io.gate.gateapi.ApiException;
import io.gate.gateapi.Configuration;
import io.gate.gateapi.GateApiException;
import io.gate.gateapi.auth.*;
import io.gate.gateapi.models.*;
import io.gate.gateapi.api.RebateApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.gateio.ws/api/v4");
// Configure APIv4 authorization: apiv4
defaultClient.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
RebateApi apiInstance = new RebateApi(defaultClient);
Integer limit = 100; // Integer | Maximum number of records returned in a single list
Integer offset = 0; // Integer | List offset, starting from 0
Long userId = 10003L; // Long | User ID. If not specified, all user records will be returned
Long from = 1711929600L; // Long | Start time of the query record. If not specified, defaults to 30 days before the current time
Long to = 1714521600L; // Long | End timestamp for the query, defaults to current time if not specified
try {
List<BrokerTransactionHistory> result = apiInstance.rebateBrokerTransactionHistory()
.limit(limit)
.offset(offset)
.userId(userId)
.from(from)
.to(to)
.execute();
System.out.println(result);
} catch (GateApiException e) {
System.err.println(String.format("Gate api exception, label: %s, message: %s", e.getErrorLabel(), e.getMessage()));
e.printStackTrace();
} catch (ApiException e) {
System.err.println("Exception when calling RebateApi#rebateBrokerTransactionHistory");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| limit | Integer | Maximum number of records returned in a single list | [optional] [default to 100] |
| offset | Integer | List offset, starting from 0 | [optional] [default to 0] |
| userId | Long | User ID. If not specified, all user records will be returned | [optional] |
| from | Long | Start time of the query record. If not specified, defaults to 30 days before the current time | [optional] |
| to | Long | End timestamp for the query, defaults to current time if not specified | [optional] |
List<BrokerTransactionHistory>
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List retrieved successfully | - |
List<RebateUserInfo> rebateUserInfo()
User obtains rebate information
// Import classes:
import io.gate.gateapi.ApiClient;
import io.gate.gateapi.ApiException;
import io.gate.gateapi.Configuration;
import io.gate.gateapi.GateApiException;
import io.gate.gateapi.auth.*;
import io.gate.gateapi.models.*;
import io.gate.gateapi.api.RebateApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.gateio.ws/api/v4");
// Configure APIv4 authorization: apiv4
defaultClient.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
RebateApi apiInstance = new RebateApi(defaultClient);
try {
List<RebateUserInfo> result = apiInstance.rebateUserInfo();
System.out.println(result);
} catch (GateApiException e) {
System.err.println(String.format("Gate api exception, label: %s, message: %s", e.getErrorLabel(), e.getMessage()));
e.printStackTrace();
} catch (ApiException e) {
System.err.println("Exception when calling RebateApi#rebateUserInfo");
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 | Query successful | - |
UserSubRelation userSubRelation(userIdList)
User subordinate relationship
Query whether the specified user is within the system
// Import classes:
import io.gate.gateapi.ApiClient;
import io.gate.gateapi.ApiException;
import io.gate.gateapi.Configuration;
import io.gate.gateapi.GateApiException;
import io.gate.gateapi.auth.*;
import io.gate.gateapi.models.*;
import io.gate.gateapi.api.RebateApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.gateio.ws/api/v4");
// Configure APIv4 authorization: apiv4
defaultClient.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
RebateApi apiInstance = new RebateApi(defaultClient);
String userIdList = "1, 2, 3"; // String | Query user ID list, separated by commas. If more than 100, only 100 will be returned
try {
UserSubRelation result = apiInstance.userSubRelation(userIdList);
System.out.println(result);
} catch (GateApiException e) {
System.err.println(String.format("Gate api exception, label: %s, message: %s", e.getErrorLabel(), e.getMessage()));
e.printStackTrace();
} catch (ApiException e) {
System.err.println("Exception when calling RebateApi#userSubRelation");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| userIdList | String | Query user ID list, separated by commas. If more than 100, only 100 will be returned |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List retrieved successfully | - |
PartnerApplicationResponse getPartnerApplicationRecent()
Get recent partner application records
Get the current user's recent partner application records. This endpoint returns application records within the last 30 days, including application status, review information, application materials, and other details.
// Import classes:
import io.gate.gateapi.ApiClient;
import io.gate.gateapi.ApiException;
import io.gate.gateapi.Configuration;
import io.gate.gateapi.GateApiException;
import io.gate.gateapi.auth.*;
import io.gate.gateapi.models.*;
import io.gate.gateapi.api.RebateApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.gateio.ws/api/v4");
// Configure APIv4 authorization: apiv4
defaultClient.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
RebateApi apiInstance = new RebateApi(defaultClient);
try {
PartnerApplicationResponse result = apiInstance.getPartnerApplicationRecent();
System.out.println(result);
} catch (GateApiException e) {
System.err.println(String.format("Gate api exception, label: %s, message: %s", e.getErrorLabel(), e.getMessage()));
e.printStackTrace();
} catch (ApiException e) {
System.err.println("Exception when calling RebateApi#getPartnerApplicationRecent");
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 | Successful response | - |
EligibilityResponse getPartnerEligibility()
Check partner application eligibility
Check whether the current user is eligible to apply as a partner. This endpoint checks multiple conditions: account status (banned or not), whether it is a sub-account, whether already a partner, KYC verification status, whether under another agent's referral chain, whether on the blacklist, and other business rule restrictions
// Import classes:
import io.gate.gateapi.ApiClient;
import io.gate.gateapi.ApiException;
import io.gate.gateapi.Configuration;
import io.gate.gateapi.GateApiException;
import io.gate.gateapi.auth.*;
import io.gate.gateapi.models.*;
import io.gate.gateapi.api.RebateApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.gateio.ws/api/v4");
// Configure APIv4 authorization: apiv4
defaultClient.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
RebateApi apiInstance = new RebateApi(defaultClient);
try {
EligibilityResponse result = apiInstance.getPartnerEligibility();
System.out.println(result);
} catch (GateApiException e) {
System.err.println(String.format("Gate api exception, label: %s, message: %s", e.getErrorLabel(), e.getMessage()));
e.printStackTrace();
} catch (ApiException e) {
System.err.println("Exception when calling RebateApi#getPartnerEligibility");
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 | Successful response | - |
PartnerDataAggregatedResponse getPartnerAgentDataAggregated().startDate(startDate).endDate(endDate).businessType(businessType).execute();
Aggregated partner agent statistics
Query aggregated partner-agent statistics for a time range, including rebate amount, trading volume, net fee, customer count, and trading user count. Notes: - `trading_user_count` is only returned when `business_type=0` (All). - Time parameters use UTC+8. - If no time range is passed, the last 7 days are queried by default. - Partner agents only; sub-accounts are not allowed.
// Import classes:
import io.gate.gateapi.ApiClient;
import io.gate.gateapi.ApiException;
import io.gate.gateapi.Configuration;
import io.gate.gateapi.GateApiException;
import io.gate.gateapi.auth.*;
import io.gate.gateapi.models.*;
import io.gate.gateapi.api.RebateApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.gateio.ws/api/v4");
// Configure APIv4 authorization: apiv4
defaultClient.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
RebateApi apiInstance = new RebateApi(defaultClient);
String startDate = "2024-01-01 00:00:00"; // String | Query start time, format: yyyy-mm-dd hh:ii:ss (UTC+8). If omitted, defaults to the start of the last 7 days.
String endDate = "2024-01-07 23:59:59"; // String | Query end time, format: yyyy-mm-dd hh:ii:ss (UTC+8). If omitted, defaults to the end of the last 7 days.
Integer businessType = 0; // Integer | Business type filter: - 0: All (default) - 1: Spot - 2: Futures - 3: Alpha - 4: Web3 - 5: Perps (DEX) - 6: Exchange All - 7: Web3 All - 8: TradFi
try {
PartnerDataAggregatedResponse result = apiInstance.getPartnerAgentDataAggregated()
.startDate(startDate)
.endDate(endDate)
.businessType(businessType)
.execute();
System.out.println(result);
} catch (GateApiException e) {
System.err.println(String.format("Gate api exception, label: %s, message: %s", e.getErrorLabel(), e.getMessage()));
e.printStackTrace();
} catch (ApiException e) {
System.err.println("Exception when calling RebateApi#getPartnerAgentDataAggregated");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| startDate | String | Query start time, format: yyyy-mm-dd hh:ii:ss (UTC+8). If omitted, defaults to the start of the last 7 days. | [optional] |
| endDate | String | Query end time, format: yyyy-mm-dd hh:ii:ss (UTC+8). If omitted, defaults to the end of the last 7 days. | [optional] |
| businessType | Integer | Business type filter: - 0: All (default) - 1: Spot - 2: Futures - 3: Alpha - 4: Web3 - 5: Perps (DEX) - 6: Exchange All - 7: Web3 All - 8: TradFi | [optional] [default to 0] [enum: 0, 1, 2, 3, 4, 5, 6, 7, 8] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Query successful | - |
| 400 | Invalid request parameters | - |
| 401 | Unauthorized access | - |
| 403 | Access denied | - |