question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TestNet : Error = No credentials provided for private endpoint}

See original GitHub issue

The following code does not work on TestNet.

       private void Trading()
        {
           BinanceClient.SetDefaultOptions(new BinanceClientOptions()
            {
                ApiCredentials = new ApiCredentials(Constantes.KeyTest, Constantes.KeyTestP),
                LogVerbosity = LogVerbosity.Debug,
                LogWriters = new List<TextWriter> { Console.Out }
            });
            using (var client = new BinanceClient(new BinanceClientOptions()
            {
                BaseAddress = "https://testnet.binance.vision"
            }))
            {
                var clientIinfo = client.General.GetAccountInfo();
                var clientBalance = clientIinfo.Data.Balances;
                foreach (var item in clientBalance)
                {
                    if (item.Total > 0)
                    {
                        Console.WriteLine(item.Asset + " " + item.Total);
                    }
                }
            }
        }

Error = {: No credentials provided for private endpoint} Binance | Warning | [3] Request /api/v3/account failed because no ApiCredentials were provided

It works fine on api.binance : ETH 0,00000031 BNB 68,20931005 EUR 6,44510850 I have checked the keys which are good. Is there an error in my code?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
JKorfcommented, Feb 18, 2021

The issue is that when you create a client with options, it completely overrides the options set with the SetDefaultOptions method. So either move the BaseAddress = to the SetDefaultOptions method or the other way around.

0reactions
mchurletcommented, Feb 23, 2021

I have tried with two different sets of keys recently created with two different accounts and it does not work. On the other hand I found an old key that I had put on Postman and there it works in my program c#. So I have a solution and I’ll settle for it, even if I don’t know why it doesn’t work with the new keys. I have no explanation and I am sure of the keys that I checked on the test site and copy paste directly into my program.

Do you want me to close the log?

Thank you very much for your support.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"No credentials provided for private endpoint" · Issue #384
Hi when I use this code I see ""No credentials provided for private endpoint" "error inside orderResult private void button1_Click(object ...
Read more >
Troubleshoot Azure Private Endpoint connectivity problems
This article provides step-by-step guidance to validate and diagnose your Azure Private Endpoint connectivity setup. Azure Private Endpoint ...
Read more >
How do I use an API key/secret on Binance's TestNet?
You have to create your API credentials from here and pass the testnet variable into the Client constructor. See the documentation.
Read more >
AMB Access Bitcoin
Use the step-by-step tutorials in this section to learn how to perform tasks by using Amazon Managed Blockchain (AMB) Access Bitcoin.
Read more >
Troubleshoot Azure Private Link Service connectivity ...
Go to the private endpoint that you're connecting from by selecting the name. Make sure the connection status shows as Approved. Screenshot of ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found