All URIs are relative to https://api.gateio.ws/api/v4
Method | HTTP request | Description |
---|---|---|
AgencyTransactionHistory | Get /rebate/agency/transaction_history | The agency obtains the transaction history of the recommended user |
AgencyCommissionsHistory | Get /rebate/agency/commission_history | The agency obtains the commission history of the recommended user |
RebateBrokerCommissionHistory | Get /rebate/broker/commission_history | The broker obtains the user's commission rebate records |
RebateBrokerTransactionHistory | Get /rebate/broker/transaction_history | The broker obtains the user's trading history |
RebateUserInfo | Get /api/v4/rebate/user/info | User retrieves rebate information |
[]AgencyTransactionHistory AgencyTransactionHistory(ctx, optional)
The agency obtains the transaction history of the recommended user
Record 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 currency pair, if not specified, return all currency pairs | |
userId | optional.Int64 | User ID. If not specified, all user records will be returned | |
from | optional.Int64 | Time range beginning, default to 7 days before current time | |
to | optional.Int64 | Time range ending, default to current time | |
limit | optional.Int32 | Maximum number of records to be 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/v6"
)
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)
The agency obtains the commission history of the recommended user
Record 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 | Filter by currency. Return all currency records if not specified | |
userId | optional.Int64 | User ID. If not specified, all user records will be returned | |
from | optional.Int64 | Time range beginning, default to 7 days before current time | |
to | optional.Int64 | Time range ending, default to current time | |
limit | optional.Int32 | Maximum number of records to be 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/v6"
)
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]
[]BrokerCommission RebateBrokerCommissionHistory(ctx, optional)
The broker obtains the user's commission rebate records
Record 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 to be 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 |
package main
import (
"context"
"fmt"
"github.com/gateio/gateapi-go/v6"
)
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)
The broker obtains the user's trading history
Record 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 to be 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 |
package main
import (
"context"
"fmt"
"github.com/gateio/gateapi-go/v6"
)
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 retrieves rebate information
package main
import (
"context"
"fmt"
"github.com/gateio/gateapi-go/v6"
)
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]