Skip to content

Commit

Permalink
fix: 🩹 FlexibleProductPosition response
Browse files Browse the repository at this point in the history
Signed-off-by: thanhpp <thanhphanphu18@gmail.com>
  • Loading branch information
thanhpp committed Apr 9, 2024
1 parent 553117d commit ecd667d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
28 changes: 14 additions & 14 deletions v2/savings_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -483,20 +483,20 @@ type GetFlexibleProductPositionResponse struct {
}

type FlexibleProductPosition struct {
TotalAmount string `json:"totalAmount,omitempty"`
TierAnnualPercentageRate map[string]float64 `json:"tierAnnualPercentageRate,omitempty"`
LatestAnnualPercentageRate string `json:"latestAnnualPercentageRate,omitempty"`
YesterdayAirdropPercentageRate string `json:"yesterdayAirdropPercentageRate,omitempty"`
Asset string `json:"asset,omitempty"`
AirDropAsset string `json:"airDropAsset,omitempty"`
CanRedeem bool `json:"canRedeem,omitempty"`
CollateralAmount string `json:"collateralAmount,omitempty"`
ProductID string `json:"productId,omitempty"`
YesterdayRealTimeRewards string `json:"yesterdayRealTimeRewards,omitempty"`
CumulativeBonusRewards string `json:"cumulativeBonusRewards,omitempty"`
CumulativeRealTimeRewards string `json:"cumulativeRealTimeRewards,omitempty"`
CumulativeTotalRewards string `json:"cumulativeTotalRewards,omitempty"`
AutoSubscribe bool `json:"autoSubscribe,omitempty"`
TotalAmount string `json:"totalAmount,omitempty"`
TierAnnualPercentageRate map[string]string `json:"tierAnnualPercentageRate,omitempty"`
LatestAnnualPercentageRate string `json:"latestAnnualPercentageRate,omitempty"`
YesterdayAirdropPercentageRate string `json:"yesterdayAirdropPercentageRate,omitempty"`
Asset string `json:"asset,omitempty"`
AirDropAsset string `json:"airDropAsset,omitempty"`
CanRedeem bool `json:"canRedeem,omitempty"`
CollateralAmount string `json:"collateralAmount,omitempty"`
ProductID string `json:"productId,omitempty"`
YesterdayRealTimeRewards string `json:"yesterdayRealTimeRewards,omitempty"`
CumulativeBonusRewards string `json:"cumulativeBonusRewards,omitempty"`
CumulativeRealTimeRewards string `json:"cumulativeRealTimeRewards,omitempty"`
CumulativeTotalRewards string `json:"cumulativeTotalRewards,omitempty"`
AutoSubscribe bool `json:"autoSubscribe,omitempty"`
}

// https://binance-docs.github.io/apidocs/spot/en/#get-locked-product-position-user_data
Expand Down
10 changes: 5 additions & 5 deletions v2/savings_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,8 @@ func (s *savingsServiceTestSuite) TestGetFlexibleProductPositionService() {
{
"totalAmount": "75.46000000",
"tierAnnualPercentageRate": {
"0-5BTC": 0.05,
"5-10BTC": 0.03
"0-5BTC": "0.05",
"5-10BTC": "0.03"
},
"latestAnnualPercentageRate": "0.02599895",
"yesterdayAirdropPercentageRate": "0.02599895",
Expand Down Expand Up @@ -438,9 +438,9 @@ func (s *savingsServiceTestSuite) TestGetFlexibleProductPositionService() {
r.Len(positionsList.Rows, 1)
s.assertFlexibleProductPosition(&FlexibleProductPosition{
TotalAmount: "75.46000000",
TierAnnualPercentageRate: map[string]float64{
"0-5BTC": 0.05,
"5-10BTC": 0.03,
TierAnnualPercentageRate: map[string]string{
"0-5BTC": "0.05",
"5-10BTC": "0.03",
},
LatestAnnualPercentageRate: "0.02599895",
YesterdayAirdropPercentageRate: "0.02599895",
Expand Down

0 comments on commit ecd667d

Please sign in to comment.