mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-06 07:26:47 +00:00
Binance: replace deprecated /v1 API calls (#482)
Several /v1 API calls have been deprecated, and will be removed shortly. Moving these across to their /v3 equivalents Capturing of the klines request via the recorder was failing, as it did not handle the structure where the klines response in an array of mixed primitive arrays. Excluding primitive values from the exclusion checks addresses this
This commit is contained in:
@@ -26,14 +26,14 @@ const (
|
||||
apiURL = "https://api.binance.com"
|
||||
|
||||
// Public endpoints
|
||||
exchangeInfo = "/api/v1/exchangeInfo"
|
||||
orderBookDepth = "/api/v1/depth"
|
||||
recentTrades = "/api/v1/trades"
|
||||
historicalTrades = "/api/v1/historicalTrades"
|
||||
aggregatedTrades = "/api/v1/aggTrades"
|
||||
candleStick = "/api/v1/klines"
|
||||
exchangeInfo = "/api/v3/exchangeInfo"
|
||||
orderBookDepth = "/api/v3/depth"
|
||||
recentTrades = "/api/v3/trades"
|
||||
historicalTrades = "/api/v3/historicalTrades"
|
||||
aggregatedTrades = "/api/v3/aggTrades"
|
||||
candleStick = "/api/v3/klines"
|
||||
averagePrice = "/api/v3/avgPrice"
|
||||
priceChange = "/api/v1/ticker/24hr"
|
||||
priceChange = "/api/v3/ticker/24hr"
|
||||
symbolPrice = "/api/v3/ticker/price"
|
||||
bestPrice = "/api/v3/ticker/bookTicker"
|
||||
accountInfo = "/api/v3/account"
|
||||
|
||||
@@ -107,8 +107,6 @@ type RecentTradeRequestParams struct {
|
||||
|
||||
// RecentTrade holds recent trade data
|
||||
type RecentTrade struct {
|
||||
Code int `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
ID int64 `json:"id"`
|
||||
Price float64 `json:"price,string"`
|
||||
Quantity float64 `json:"qty,string"`
|
||||
@@ -247,7 +245,7 @@ type PriceChangeStats struct {
|
||||
QuoteVolume float64 `json:"quoteVolume,string"`
|
||||
OpenTime int64 `json:"openTime"`
|
||||
CloseTime int64 `json:"closeTime"`
|
||||
FirstID int64 `json:"fristId"`
|
||||
FirstID int64 `json:"firstId"`
|
||||
LastID int64 `json:"lastId"`
|
||||
Count int64 `json:"count"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user