luzzif / binance-api-client

A wrapper which can be used to interact with Binance's API. Entirely developed in TypeScript.
24 stars 12 forks source link

extra slash in makeRequest ('/api') #122

Closed www0z0k closed 3 years ago

www0z0k commented 3 years ago

Found an issue in BinanceApiClient:

    private async makeRequest(
        httpMethod: HttpMethod,
        apiVersion: ApiVersion,
        accessedResource: string,
        requiredAuthentication: AuthenticationMethod,
        ...parameters: [string, any][]
    ): Promise {
        const apiUrl: URL = new URL(
            Path.join("/api", apiVersion, accessedResource),
            "https://api.binance.com"
        );

forms an url like https://api.binance.com//api/v1/klines?symbol=ETHBTC&interval=1m (with an extra slash) which breaks the functionality for me