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 |
[]AgencyTransactionHistory AgencyTransactionHistory(ctx, optional)
Broker obtains transaction history of recommended users
Record query time range cannot exceed 30 days
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| optional | AgencyTransactionHistoryOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a AgencyTransactionHistoryOpts struct
| Name | Type | Description | Notes |
|---|---|---|---|
| currencyPair | optional.String | Specify the trading pair. If not specified, returns all trading pairs | |
| userId | optional.Int64 | User ID. If not specified, all user records will be returned | |
| from | optional.Int64 | Start time for querying records, defaults to 7 days before current time if not specified | |
| to | optional.Int64 | End timestamp for the query, defaults to current time if not specified | |
| limit | optional.Int32 | Maximum number of records returned in a single list | [default to 100] |
| offset | optional.Int32 | List offset, starting from 0 | [default to 0] |
package main
import (
"context"
"fmt"
"github.com/gateio/gateapi-go/v7"
)
func main() {
client := gateapi.NewAPIClient(gateapi.NewConfiguration())
// uncomment the next line if your are testing against testnet
// client.ChangeBasePath("https://fx-api-testnet.gateio.ws/api/v4")
ctx := context.WithValue(context.Background(),
gateapi.ContextGateAPIV4,
gateapi.GateAPIV4{
Key: "YOUR_API_KEY",
Secret: "YOUR_API_SECRET",
}
)
result, _, err := client.RebateApi.AgencyTransactionHistory(ctx, nil)
if err != nil {
if e, ok := err.(gateapi.GateAPIError); ok {
fmt.Printf("gate api error: %s\n", e.Error())
} else {
fmt.Printf("generic error: %s\n", err.Error())
}
} else {
fmt.Println(result)
}
}- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]AgencyCommissionHistory AgencyCommissionsHistory(ctx, optional)
Broker obtains rebate history of recommended users
Record query time range cannot exceed 30 days
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| optional | AgencyCommissionsHistoryOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a AgencyCommissionsHistoryOpts struct
| Name | Type | Description | Notes |
|---|---|---|---|
| currency | optional.String | Specify the currency. If not specified, returns all currencies | |
| commissionType | optional.Int32 | Rebate type: 1 - Direct rebate, 2 - Indirect rebate, 3 - Self rebate | |
| userId | optional.Int64 | User ID. If not specified, all user records will be returned | |
| from | optional.Int64 | Start time for querying records, defaults to 7 days before current time if not specified | |
| to | optional.Int64 | End timestamp for the query, defaults to current time if not specified | |
| limit | optional.Int32 | Maximum number of records returned in a single list | [default to 100] |
| offset | optional.Int32 | List offset, starting from 0 | [default to 0] |
package main
import (
"context"
"fmt"
"github.com/gateio/gateapi-go/v7"
)
func main() {
client := gateapi.NewAPIClient(gateapi.NewConfiguration())
// uncomment the next line if your are testing against testnet
// client.ChangeBasePath("https://fx-api-testnet.gateio.ws/api/v4")
ctx := context.WithValue(context.Background(),
gateapi.ContextGateAPIV4,
gateapi.GateAPIV4{
Key: "YOUR_API_KEY",
Secret: "YOUR_API_SECRET",
}
)
result, _, err := client.RebateApi.AgencyCommissionsHistory(ctx, nil)
if err != nil {
if e, ok := err.(gateapi.GateAPIError); ok {
fmt.Printf("gate api error: %s\n", e.Error())
} else {
fmt.Printf("generic error: %s\n", err.Error())
}
} else {
fmt.Println(result)
}
}- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PartnerTransactionHistory PartnerTransactionHistory(ctx, optional)
Partner obtains transaction history of recommended users
Record query time range cannot exceed 30 days
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| optional | PartnerTransactionHistoryOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a PartnerTransactionHistoryOpts struct
| Name | Type | Description | Notes |
|---|---|---|---|
| currencyPair | optional.String | Specify the trading pair. If not specified, returns all trading pairs | |
| userId | optional.Int64 | User ID. If not specified, all user records will be returned | |
| from | optional.Int64 | Start time for querying records, defaults to 7 days before current time if not specified | |
| to | optional.Int64 | End timestamp for the query, defaults to current time if not specified | |
| limit | optional.Int32 | Maximum number of records returned in a single list | [default to 100] |
| offset | optional.Int32 | List offset, starting from 0 | [default to 0] |
package main
import (
"context"
"fmt"
"github.com/gateio/gateapi-go/v7"
)
func main() {
client := gateapi.NewAPIClient(gateapi.NewConfiguration())
// uncomment the next line if your are testing against testnet
// client.ChangeBasePath("https://fx-api-testnet.gateio.ws/api/v4")
ctx := context.WithValue(context.Background(),
gateapi.ContextGateAPIV4,
gateapi.GateAPIV4{
Key: "YOUR_API_KEY",
Secret: "YOUR_API_SECRET",
}
)
result, _, err := client.RebateApi.PartnerTransactionHistory(ctx, nil)
if err != nil {
if e, ok := err.(gateapi.GateAPIError); ok {
fmt.Printf("gate api error: %s\n", e.Error())
} else {
fmt.Printf("generic error: %s\n", err.Error())
}
} else {
fmt.Println(result)
}
}- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PartnerCommissionHistory PartnerCommissionsHistory(ctx, optional)
Partner obtains rebate records of recommended users
Record query time range cannot exceed 30 days
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| optional | PartnerCommissionsHistoryOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a PartnerCommissionsHistoryOpts struct
| Name | Type | Description | Notes |
|---|---|---|---|
| currency | optional.String | Specify the currency. If not specified, returns all currencies | |
| userId | optional.Int64 | User ID. If not specified, all user records will be returned | |
| from | optional.Int64 | Start time for querying records, defaults to 7 days before current time if not specified | |
| to | optional.Int64 | End timestamp for the query, defaults to current time if not specified | |
| limit | optional.Int32 | Maximum number of records returned in a single list | [default to 100] |
| offset | optional.Int32 | List offset, starting from 0 | [default to 0] |
package main
import (
"context"
"fmt"
"github.com/gateio/gateapi-go/v7"
)
func main() {
client := gateapi.NewAPIClient(gateapi.NewConfiguration())
// uncomment the next line if your are testing against testnet
// client.ChangeBasePath("https://fx-api-testnet.gateio.ws/api/v4")
ctx := context.WithValue(context.Background(),
gateapi.ContextGateAPIV4,
gateapi.GateAPIV4{
Key: "YOUR_API_KEY",
Secret: "YOUR_API_SECRET",
}
)
result, _, err := client.RebateApi.PartnerCommissionsHistory(ctx, nil)
if err != nil {
if e, ok := err.(gateapi.GateAPIError); ok {
fmt.Printf("gate api error: %s\n", e.Error())
} else {
fmt.Printf("generic error: %s\n", err.Error())
}
} else {
fmt.Println(result)
}
}- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PartnerSubList PartnerSubList(ctx, optional)
Partner subordinate list
Including sub-agents, direct customers, and indirect customers
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| optional | PartnerSubListOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a PartnerSubListOpts struct
| Name | Type | Description | Notes |
|---|---|---|---|
| userId | optional.Int64 | User ID. If not specified, all user records will be returned | |
| limit | optional.Int32 | Maximum number of records returned in a single list | [default to 100] |
| offset | optional.Int32 | List offset, starting from 0 | [default to 0] |
package main
import (
"context"
"fmt"
"github.com/gateio/gateapi-go/v7"
)
func main() {
client := gateapi.NewAPIClient(gateapi.NewConfiguration())
// uncomment the next line if your are testing against testnet
// client.ChangeBasePath("https://fx-api-testnet.gateio.ws/api/v4")
ctx := context.WithValue(context.Background(),
gateapi.ContextGateAPIV4,
gateapi.GateAPIV4{
Key: "YOUR_API_KEY",
Secret: "YOUR_API_SECRET",
}
)
result, _, err := client.RebateApi.PartnerSubList(ctx, nil)
if err != nil {
if e, ok := err.(gateapi.GateAPIError); ok {
fmt.Printf("gate api error: %s\n", e.Error())
} else {
fmt.Printf("generic error: %s\n", err.Error())
}
} else {
fmt.Println(result)
}
}- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]BrokerCommission RebateBrokerCommissionHistory(ctx, optional)
Broker obtains user's rebate records
Record query time range cannot exceed 30 days
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| optional | RebateBrokerCommissionHistoryOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a RebateBrokerCommissionHistoryOpts struct
| Name | Type | Description | Notes |
|---|---|---|---|
| limit | optional.Int32 | Maximum number of records returned in a single list | [default to 100] |
| offset | optional.Int32 | List offset, starting from 0 | [default to 0] |
| userId | optional.Int64 | User ID. If not specified, all user records will be returned | |
| from | optional.Int64 | Start time of the query record. If not specified, defaults to 30 days before the current time | |
| to | optional.Int64 | End timestamp for the query, defaults to current time if not specified |
package main
import (
"context"
"fmt"
"github.com/gateio/gateapi-go/v7"
)
func main() {
client := gateapi.NewAPIClient(gateapi.NewConfiguration())
// uncomment the next line if your are testing against testnet
// client.ChangeBasePath("https://fx-api-testnet.gateio.ws/api/v4")
ctx := context.WithValue(context.Background(),
gateapi.ContextGateAPIV4,
gateapi.GateAPIV4{
Key: "YOUR_API_KEY",
Secret: "YOUR_API_SECRET",
}
)
result, _, err := client.RebateApi.RebateBrokerCommissionHistory(ctx, nil)
if err != nil {
if e, ok := err.(gateapi.GateAPIError); ok {
fmt.Printf("gate api error: %s\n", e.Error())
} else {
fmt.Printf("generic error: %s\n", err.Error())
}
} else {
fmt.Println(result)
}
}- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]BrokerTransaction RebateBrokerTransactionHistory(ctx, optional)
Broker obtains user's trading history
Record query time range cannot exceed 30 days
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| optional | RebateBrokerTransactionHistoryOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a RebateBrokerTransactionHistoryOpts struct
| Name | Type | Description | Notes |
|---|---|---|---|
| limit | optional.Int32 | Maximum number of records returned in a single list | [default to 100] |
| offset | optional.Int32 | List offset, starting from 0 | [default to 0] |
| userId | optional.Int64 | User ID. If not specified, all user records will be returned | |
| from | optional.Int64 | Start time of the query record. If not specified, defaults to 30 days before the current time | |
| to | optional.Int64 | End timestamp for the query, defaults to current time if not specified |
package main
import (
"context"
"fmt"
"github.com/gateio/gateapi-go/v7"
)
func main() {
client := gateapi.NewAPIClient(gateapi.NewConfiguration())
// uncomment the next line if your are testing against testnet
// client.ChangeBasePath("https://fx-api-testnet.gateio.ws/api/v4")
ctx := context.WithValue(context.Background(),
gateapi.ContextGateAPIV4,
gateapi.GateAPIV4{
Key: "YOUR_API_KEY",
Secret: "YOUR_API_SECRET",
}
)
result, _, err := client.RebateApi.RebateBrokerTransactionHistory(ctx, nil)
if err != nil {
if e, ok := err.(gateapi.GateAPIError); ok {
fmt.Printf("gate api error: %s\n", e.Error())
} else {
fmt.Printf("generic error: %s\n", err.Error())
}
} else {
fmt.Println(result)
}
}- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]RebateUserInfo RebateUserInfo(ctx, )
User obtains rebate information
package main
import (
"context"
"fmt"
"github.com/gateio/gateapi-go/v7"
)
func main() {
client := gateapi.NewAPIClient(gateapi.NewConfiguration())
// uncomment the next line if your are testing against testnet
// client.ChangeBasePath("https://fx-api-testnet.gateio.ws/api/v4")
ctx := context.WithValue(context.Background(),
gateapi.ContextGateAPIV4,
gateapi.GateAPIV4{
Key: "YOUR_API_KEY",
Secret: "YOUR_API_SECRET",
}
)
result, _, err := client.RebateApi.RebateUserInfo(ctx)
if err != nil {
if e, ok := err.(gateapi.GateAPIError); ok {
fmt.Printf("gate api error: %s\n", e.Error())
} else {
fmt.Printf("generic error: %s\n", err.Error())
}
} else {
fmt.Println(result)
}
}- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserSubRelation UserSubRelation(ctx, userIdList)
User subordinate relationship
Query whether the specified user is within the system
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| userIdList | string | Query user ID list, separated by commas. If more than 100, only 100 will be returned |
package main
import (
"context"
"fmt"
"github.com/gateio/gateapi-go/v7"
)
func main() {
client := gateapi.NewAPIClient(gateapi.NewConfiguration())
// uncomment the next line if your are testing against testnet
// client.ChangeBasePath("https://fx-api-testnet.gateio.ws/api/v4")
ctx := context.WithValue(context.Background(),
gateapi.ContextGateAPIV4,
gateapi.GateAPIV4{
Key: "YOUR_API_KEY",
Secret: "YOUR_API_SECRET",
}
)
userIdList := "1, 2, 3" // string - Query user ID list, separated by commas. If more than 100, only 100 will be returned
result, _, err := client.RebateApi.UserSubRelation(ctx, userIdList)
if err != nil {
if e, ok := err.(gateapi.GateAPIError); ok {
fmt.Printf("gate api error: %s\n", e.Error())
} else {
fmt.Printf("generic error: %s\n", err.Error())
}
} else {
fmt.Println(result)
}
}- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]