LUCIT-Systems-and-Development / unicorn-binance-websocket-api

A Python SDK by LUCIT to use the Binance Websocket API`s (com+testnet, com-margin+testnet, com-isolated_margin+testnet, com-futures+testnet, com-coin_futures, us, tr, dex/chain+testnet) in a simple, fast, flexible, robust and fully-featured way.
https://unicorn-binance-websocket-api.docs.lucit.tech/
Other
677 stars 166 forks source link

Binance Futures Testnet URLs are wrong #239

Closed Animouse31 closed 2 years ago

Animouse31 commented 2 years ago

Hi Oliver!

Thank you for the wonderful module, I love it very much.

I want to report a bug for the Futures Testnet URLs.

It takes me some time to figure out the problem, even contacting Binance customer service. It turns out the URLs for Binance Futures Testnet in the manager.py are wrong.

Here's the code:

elif self.exchange == "binance.com-futures-testnet":

Todo: Needs a test

  self.API_URL = "https://testnet.binance.vision/api"
  self.MARGIN_API_URL = " https://api.binance.com/sapi"
  self.WEBSITE_URL = "https://testnet.binance.vision"
  self.FUTURES_URL = "https://fapi.binance.com/fapi"
  self.FUTURES_DATA_URL = "https://fapi.binance.com/futures/data"
  self.FUTURES_COIN_URL = "https://fapi.binance.com/fapi"
  self.FUTURES_COIN_DATA_URL = "https://dapi.binance.com/futures/data"

It uses Binance Spot Testnet URLs instead of Binance Futures Testnet URLs. For the Binance Futures Testnet URLs, it's supposed to be: "https://testnet.binancefuture.com/fapi"

testnet.binancefutures.com instead of testnet.binance.vision

As shown in the documentation: https://python-binance.readthedocs.io/en/latest/binance.html

image

oliver-zehentleitner commented 2 years ago

Why did you close it?