-
-
Notifications
You must be signed in to change notification settings - Fork 273
/
get_fee_rates_request.go
38 lines (30 loc) · 1.1 KB
/
get_fee_rates_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
package bybitapi
import (
"github.com/c9s/requestgen"
"github.com/c9s/bbgo/pkg/fixedpoint"
)
//go:generate -command GetRequest requestgen -method GET -responseType .APIResponse -responseDataField Result
//go:generate -command PostRequest requestgen -method POST -responseType .APIResponse -responseDataField Result
type FeeRates struct {
List []FeeRate `json:"list"`
}
type FeeRate struct {
Symbol string `json:"symbol"`
TakerFeeRate fixedpoint.Value `json:"takerFeeRate"`
MakerFeeRate fixedpoint.Value `json:"makerFeeRate"`
}
//go:generate GetRequest -url "/v5/account/fee-rate" -type GetFeeRatesRequest -responseDataType .FeeRates
type GetFeeRatesRequest struct {
client requestgen.AuthenticatedAPIClient
category Category `param:"category,query" validValues:"spot"`
// Symbol name. Valid for linear, inverse, spot
symbol *string `param:"symbol,query"`
// Base coin. SOL, BTC, ETH. Valid for option
baseCoin *string `param:"baseCoin,query"`
}
func (c *RestClient) NewGetFeeRatesRequest() *GetFeeRatesRequest {
return &GetFeeRatesRequest{
client: c,
category: CategorySpot,
}
}