By 10000000/LotAmout, if you enter maxlot you want to buy 10 million units? Such a trade has impact on the market price, better split it in smaller packets. Or maybe you use the wrong asset list? For Oanda currencies you can trade max 10000000 lots, not 10000. Use AssetsOanda.csv.