-
-
Notifications
You must be signed in to change notification settings - Fork 294
/
get_spot_rebate_history_request.go
41 lines (32 loc) · 1.28 KB
/
get_spot_rebate_history_request.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package binanceapi
import (
"time"
"github.com/c9s/requestgen"
"github.com/c9s/bbgo/pkg/fixedpoint"
"github.com/c9s/bbgo/pkg/types"
)
// rebate type:1 is commission rebate,2 is referral kickback
type RebateType int
const (
RebateTypeCommission = 1
RebateTypeReferralKickback = 2
)
type SpotRebate struct {
Asset string `json:"asset"`
Type RebateType `json:"type"`
Amount fixedpoint.Value `json:"amount"`
UpdateTime types.MillisecondTimestamp `json:"updateTime"`
}
// GetSpotRebateHistoryRequest
// The max interval between startTime and endTime is 30 days.
// If startTime and endTime are not sent, the recent 7 days' data will be returned.
// The earliest startTime is supported on June 10, 2020
//go:generate requestgen -method GET -url "/sapi/v1/rebate/taxQuery" -type GetSpotRebateHistoryRequest -responseType PagedDataResponse -responseDataField Data.Data -responseDataType []SpotRebate
type GetSpotRebateHistoryRequest struct {
client requestgen.AuthenticatedAPIClient
startTime *time.Time `param:"startTime,milliseconds"`
endTime *time.Time `param:"endTime,milliseconds"`
}
func (c *RestClient) NewGetSpotRebateHistoryRequest() *GetSpotRebateHistoryRequest {
return &GetSpotRebateHistoryRequest{client: c}
}