When I am placing a Market Order I am getting the error
ccxt.base.errors.InsufficientFunds: binance Account has insufficient balance for requested action.
The Balance on my TestNet is:
{'asset': 'BNB', 'free': '1000.00000000', 'locked': '0.00000000'}
{'asset': 'BTC', 'free': '1.00000000', 'locked': '0.00000000'}
{'asset': 'BUSD', 'free': '10000.00000000', 'locked': '0.00000000'}
{'asset': 'ETH', 'free': '100.00000000', 'locked': '0.00000000'}
{'asset': 'LTC', 'free': '500.00000000', 'locked': '0.00000000'}
{'asset': 'TRX', 'free': '500000.00000000', 'locked': '0.00000000'}
{'asset': 'USDT', 'free': '10000.00000000', 'locked': '0.00000000'}
{'asset': 'XRP', 'free': '50000.00000000', 'locked': '0.00000000'}
The code I am trying is given below:
import ccxt
exchange_id = 'binance'
API_KEY = ''
SECRET = ''
exchange_class = getattr(ccxt, exchange_id)
symbol = 'BTC/USDT'
type = 'market' # or 'market'
side = 'buy' # or 'buy'
amount = 1.0
# extra params and overrides if needed
params = {
'test': True, # test if it's valid, but don't actually place it
}
exchange = ccxt.binance({
'apiKey': API_KEY,
'secret': SECRET,
'enableRateLimit': True,
})
exchange.set_sandbox_mode(enabled=True)
# order = exchange.create_order(symbol, type, side, amount, price, params)
# print(order)
order = exchange.create_order(symbol=symbol,type='market',amount=1.0,side=side)
print(order)
Is there anyway to fund my test account with fake USDT? How to resolve it?
Thanks