Skip to content

Commit

Permalink
fix: /v5/account/fee-rate (#184)
Browse files Browse the repository at this point in the history
* fix: tag

* docs: /v5/account/fee-rate

* chore: cosme

* docs: ws trade v5

* chore: delete unused
  • Loading branch information
hirokisan authored Sep 25, 2024
1 parent b0cfeee commit e17dd7d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ The following API endpoints have been implemented
- [`/v5/account/transaction-log` Get Transaction Log](https://bybit-exchange.github.io/docs/v5/account/transaction-log)
- [`/v5/account/collateral-info` Get Collateral Info](https://bybit-exchange.github.io/docs/v5/account/collateral-info)
- [`/v5/account/set-collateral-switch` Set Collateral Coin](https://bybit-exchange.github.io/docs/v5/account/set-collateral)
- [`/v5/account/fee-rate` Get Fee Rate](https://bybit-exchange.github.io/docs/v5/account/fee-rate)

#### Asset

Expand Down Expand Up @@ -361,6 +362,11 @@ The following API endpoints have been implemented
- [Wallet](https://bybit-exchange.github.io/docs/v5/websocket/private/wallet)
- [Execution](https://bybit-exchange.github.io/docs/v5/websocket/private/execution)

#### [Trade V5](https://bybit-exchange.github.io/docs/v5/websocket/trade/guideline)

- Create
- Cancel

#### [Spot v1](https://bybit-exchange.github.io/docs/spot/v1/#t-websocket)

##### Public Topics
Expand Down
9 changes: 5 additions & 4 deletions v5_account_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,10 @@ func (s *V5AccountService) GetTransactionLog(param V5GetTransactionLogParam) (*V

// V5GetFeeRateParam :
type V5GetFeeRateParam struct {
Category CategoryV5 `json:"category"`
Symbol SymbolV5 `json:"symbol"`
BaseCoin *Coin `url:"baseCoin,omitempty"`
Category CategoryV5 `url:"category"`

Symbol *SymbolV5 `url:"symbol,omitempty"`
BaseCoin *Coin `url:"baseCoin,omitempty"`
}

// V5GetFeeRateResponse :
Expand All @@ -304,7 +305,7 @@ type V5GetFeeRateList []V5GetFeeRateItem
// V5GetFeeRateItem :
type V5GetFeeRateItem struct {
Symbol SymbolV5 `json:"symbol"`
BaseCoin *Coin `url:"baseCoin,omitempty"`
BaseCoin Coin `json:"baseCoin"`
TakerFeeRate string `json:"takerFeeRate"`
MakerFeeRate string `json:"makerFeeRate"`
}
Expand Down
8 changes: 0 additions & 8 deletions v5_ws_trade.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,6 @@ func (s *V5WebsocketTradeService) judgeTopic(respBody []byte) (V5WebsocketTradeT
return "", nil
}

// parseResponse :
func (s *V5WebsocketTradeService) parseResponse(respBody []byte, response interface{}) error {
if err := json.Unmarshal(respBody, &response); err != nil {
return err
}
return nil
}

// Login : Apply for authentication when establishing a connection.
func (s *V5WebsocketTradeService) Login() error {
param, err := s.client.buildAuthParam()
Expand Down
8 changes: 3 additions & 5 deletions v5_ws_trade_order.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package bybit

import (
"encoding/json"
"fmt"
"github.com/google/uuid"
"github.com/gorilla/websocket"
"strconv"
"time"

"github.com/google/uuid"
"github.com/gorilla/websocket"
)

// CreateOrder :
Expand All @@ -29,7 +29,6 @@ func (s *V5WebsocketTradeService) CreateOrder(orders []*V5CreateOrderParam) erro
}
buf, err := json.Marshal(param)
if err != nil {
fmt.Printf("error is %+v", err)
return err
}

Expand Down Expand Up @@ -58,7 +57,6 @@ func (s *V5WebsocketTradeService) CancelOrder(orders []*V5CancelOrderParam) erro
}
buf, err := json.Marshal(param)
if err != nil {
fmt.Printf("error is %+v", err)
return err
}

Expand Down

0 comments on commit e17dd7d

Please sign in to comment.