Skip to content

Binance's methods that have a symbol parameter throw an error. #753

Closed
@miguel1117

Description

@miguel1117

I am using ExchangeSharp v1.0.0 .
Calling any method that takes in a symbol using an ExchangeAPI object connected to Binance throws the following exception.
For example, the following code:

await _api.GetTickerAsync("BTCUSDT");

Throws the following exception:

Unhandled exception. System.AggregateException: One or more errors occurred. ({"code":-1100,"msg":"Illegal characters found in parameter 'symbol'; legal range is '^[A-Z0-9-_.]{1,20}$'."})
---> ExchangeSharp.APIException: {"code":-1100,"msg":"Illegal characters found in parameter 'symbol'; legal range is '^[A-Z0-9-_.]{1,20}$'."}

This happens because the symbol's string is converted to lowercase somewhere along the way, and Binance does seem to require them to be in uppercase.
image

This shouldn't be hard to fix, I might do it myself if I find the time to understand where and why the string is converted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions