Hello I'm writing a trading bot in C# which should be trading some futures with leverage.
Almost everything about the bot is ready except for the actual placing of short/long orders with levarage. Now, I don't want to test my implementation of the bot with real money so I figured I could use the Binance testnet to provide me with some test funds.
I generated a testnet API key/secret pair from here: https://testnet.binance.vision/ and also changed my client's endpoints to these:
BaseAddress = "https://testnet.binance.vision/";
BaseAddressCoinFutures = "https://testnet.binancefuture.com/";
BaseAddressUsdtFutures = "https://testnet.binancefuture.com/";
That setup works perfectly for Spot trading, but when I try to place a Futures order I get the following response from the server:
401 Unauthorized: Invalid API-key, IP, or permissions for action
Obviously, the first thing I checked are the permissions of the test API key/secret pair which are the following:
TRADE, USER_DATA, USER_STREAM, MARKET_DATA, SECURE_WEB_SOCKET
With that in mind, I figured that there's probably an extra permission that I'm missing in order to trade futures. Is that correct? And if yes, how can I give that additional permission to my test API key? I didn't find such option in the site where I generated it...
And also, if what I wrot above is incorrect, what's the best way to test my Futures trading implementation?