Skip to content

Commit

Permalink
Release: v1.0.14-alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
amir-the-h committed Sep 29, 2021
1 parent f35cf1f commit d507e2e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@ Changelog
=========
All notable changes to this project will be documented in this file.

v1.0.14-alpha
------------

### Changed

- Fixed requests array type conversion

v1.0.13-alpha
------------

### Changed

- Fixed requests array typ conversion
- Fixed requests array type conversion

v1.0.12-alpha
------------
Expand Down
12 changes: 12 additions & 0 deletions api/rest/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ func (c *Account) GetPositions(req requests.GetPositions) (response responses.Ge
if len(req.InstID) > 0 {
m["instId"] = strings.Join(req.InstID, ",")
}
if len(req.PosID) > 0 {
m["posId"] = strings.Join(req.PosID, ",")
}
res, err := c.client.Do(http.MethodGet, p, true, m)
if err != nil {
return
Expand Down Expand Up @@ -172,6 +175,9 @@ func (c *Account) SetLeverage(req requests.SetLeverage) (response responses.Leve
func (c *Account) GetMaxBuySellAmount(req requests.GetMaxBuySellAmount) (response responses.GetMaxBuySellAmount, err error) {
p := "/api/v5/account/max-size"
m := okex.S2M(req)
if len(req.InstID) > 0 {
m["instId"] = strings.Join(req.InstID, ",")
}
res, err := c.client.Do(http.MethodGet, p, true, m)
if err != nil {
return
Expand Down Expand Up @@ -296,6 +302,9 @@ func (c *Account) GetInterestAccrued(req requests.GetInterestAccrued) (response
func (c *Account) GetInterestRates(req requests.GetBalance) (response responses.GetInterestRates, err error) {
p := "/api/v5/account/interest-rate"
m := okex.S2M(req)
if len(req.Ccy) > 0 {
m["ccy"] = strings.Join(req.Ccy, ",")
}
res, err := c.client.Do(http.MethodGet, p, true, m)
if err != nil {
return
Expand Down Expand Up @@ -331,6 +340,9 @@ func (c *Account) SetGreeks(req requests.SetGreeks) (response responses.SetGreek
func (c *Account) GetMaxWithdrawals(req requests.GetBalance) (response responses.GetMaxWithdrawals, err error) {
p := "/api/v5/account/max-withdrawal"
m := okex.S2M(req)
if len(req.Ccy) > 0 {
m["ccy"] = strings.Join(req.Ccy, ",")
}
res, err := c.client.Do(http.MethodGet, p, true, m)
if err != nil {
return
Expand Down

0 comments on commit d507e2e

Please sign in to comment.