Skip to content

Commit

Permalink
feat: export base futures api urls
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur Abelian committed Nov 11, 2024
1 parent 2791c09 commit e8d00bb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions v2/futures/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ type UserDataEventReasonType string
type ForceOrderCloseType string

// Endpoints
const (
baseApiMainUrl = "https://fapi.binance.com"
baseApiTestnetUrl = "https://testnet.binancefuture.com"
var (
BaseApiMainUrl = "https://fapi.binance.com"
BaseApiTestnetUrl = "https://testnet.binancefuture.com"
)

// Global enums
Expand Down Expand Up @@ -207,9 +207,9 @@ func newJSON(data []byte) (j *simplejson.Json, err error) {
// getApiEndpoint return the base endpoint of the WS according the UseTestnet flag
func getApiEndpoint() string {
if UseTestnet {
return baseApiTestnetUrl
return BaseApiTestnetUrl
}
return baseApiMainUrl
return BaseApiMainUrl
}

// NewClient initialize an API client instance with API key and secret key.
Expand Down

0 comments on commit e8d00bb

Please sign in to comment.