Skip to content

Commit

Permalink
fix func: bnc.QuerySpotTrades bnc.QuerySpotAggTrades
Browse files Browse the repository at this point in the history
  • Loading branch information
dwdwow committed Sep 18, 2024
1 parent 0aa5c89 commit c541c26
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bnc/config_pub.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ type SpotTrade struct {
Price float64 `json:"price,string"`
Qty float64 `json:"qty,string"`
QuoteQty float64 `json:"quoteQty,string"`
Time int64 `json:"time,string"`
Time int64 `json:"time"`
IsBuyerMaker bool `json:"isBuyerMaker"`
IsBestMatch bool `json:"isBestMatch"`
}
Expand All @@ -429,8 +429,8 @@ type SpotAggTrades struct {
Id int64 `json:"a"`
Price float64 `json:"p,string"`
Qty float64 `json:"q,string"`
FirstTradeId int64 `json:"f,string"`
LastTradeId int64 `json:"l,string"`
FirstTradeId int64 `json:"f"`
LastTradeId int64 `json:"l"`
Time int64 `json:"T"`
IsBuyerMaker bool `json:"m"`
IsBestMatch bool `json:"M"`
Expand Down
8 changes: 8 additions & 0 deletions bnc/public_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,11 @@ func TestQueryFuturesPrices(t *testing.T) {
func TestQueryCMPremiumIndex(t *testing.T) {
publicTestChecker(QueryCMPremiumIndex("", "BTCUSD"))
}

func TestQuerySpotTrades(t *testing.T) {
publicTestChecker(QuerySpotTrades("ETHUSDT"))
}

func TestQuerySpotAggTrades(t *testing.T) {
publicTestChecker(QuerySpotAggTrades("ETHUSDT"))
}

0 comments on commit c541c26

Please sign in to comment.