JKorf / Binance.Net

A C# .netstandard client library for the Binance REST and Websocket Spot and Futures API focusing on clear usage and models
https://jkorf.github.io/Binance.Net/
MIT License
1.02k stars 420 forks source link

ApiCredentials migration, options #1294

Closed AndrewMeta closed 10 months ago

AndrewMeta commented 10 months ago

Hello) Need help with migration. I can't solve the problem. After switching to Binance.Net 9.0.5 and CryptoExchange.Net 6.0.3, please tell me how to correctly specify the endpoint ..

image

public BinanceRestClient client = new BinanceRestClient();

        public BinanceCore(string apiKey, string secretKey)
        {

            client = new BinanceRestClient(new BinanceClientOptions
            {

                ApiCredentials = new ApiCredentials(apiKey, secretKey),
                SpotApiOptions = new BinanceApiClientOptions
                {
                    BaseAddress = "https://api.binance.com",
                    AutoTimestamp = true
                },
                UsdFuturesApiOptions = new BinanceApiClientOptions
                {
                    TradeRulesBehaviour = TradeRulesBehaviour.ThrowError,
                    BaseAddress = "https://fapi5.binance.com",
                    AutoTimestamp = true
                }
            });

        }
JKorf commented 10 months ago

See https://jkorf.github.io/CryptoExchange.Net/Migration%20Guide.html#options