sammchardy / python-binance

Binance Exchange API python implementation for automated trading
https://python-binance.readthedocs.io/en/latest/
MIT License
6.02k stars 2.2k forks source link

Does testnet.binance work with this api? #581

Closed PeterGardas closed 4 years ago

PeterGardas commented 4 years ago

The title says it all. I am just curious since I cant manage to buy or sell any assets if I do : client.API_URL = 'https://testnet.binance.vision/api'. Btw. this is truly an awesome project, keep up the hard work :).

Regards.

Peter.

PeterGardas commented 4 years ago

Ups. My bad. A quick poke around the issues solved my problem. Sorry for bothering anyone.

CryptoFuturesAU commented 4 years ago

Solution was ?

jpx commented 3 years ago

For reference, I can confirm that overriding Client.*_URL is a solution. For instance, to use the Futures testnet, set it after:

from binance.client import Client

Client.FUTURES_URL = 'https://testnet.binancefuture.com/fapi'