Skip to content

Commit 6b985af

Browse files
authored
GetIncomeHistoryServiceUM (#34)
1 parent e897fbf commit 6b985af

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

v2/portfolio/client.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,3 +420,8 @@ func (c *Client) NewMarginRepayService() *MarginRepayService {
420420
c: c,
421421
}
422422
}
423+
424+
func (c *Client) NewGetIncomeHistoryServiceUM() *GetIncomeHistoryServiceUM {
425+
fc := c.newFutureClient()
426+
return &GetIncomeHistoryServiceUM{Fs: fc.NewGetIncomeHistoryService()}
427+
}

v2/portfolio/income_history.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package portfolio
2+
3+
import (
4+
"context"
5+
6+
"github.com/photon-storage/go-binance/v2/futures"
7+
)
8+
9+
type GetIncomeHistoryServiceUM struct {
10+
Fs *futures.GetIncomeHistoryService
11+
}
12+
13+
func (s *GetIncomeHistoryServiceUM) Do(
14+
ctx context.Context,
15+
opts ...futures.RequestOption,
16+
) ([]*futures.IncomeHistory, error) {
17+
opts = append(opts, futures.WithEndpoint("/papi/v1/um/income"))
18+
return s.Fs.Do(ctx, opts...)
19+
}

0 commit comments

Comments
 (0)