Filter failure: PRICE_FILTER’

Hello,

When I run this code:


client = Spot(base_url='https://testnet.binance.vision', api_key='PmbkFT8OJqpOx6aI4MeTbNecMHnnmVQCZqV4uMg2f6J27Z35YKaAaEpIGI8nK5fg', api_secret='UmBCYDwRMkWzZbUQJQy3YOGRtaiTBgrCb1aswYp90H7rYmQJo4txaWL2rF9Ts4Go')


params = {
    'symbol': 'BTCUSDT',
    'side': 'BUY',
    'type': 'STOP_LOSS_LIMIT',
    'timeInForce': 'GTC',
    'quantity': 0.0004,
    'price': 28021,
    'stopPrice' : 28049.021,
    'trailingDelta' : 10
}

response = client.new_order(**params)

print(response)

I get this error:

raise ClientError(

binance.error.ClientError: (400, -1013, ‘Filter failure: PRICE_FILTER’, {‘Content-Type’: ‘application/json;charset=UTF-8’, ‘Content-Length’: ‘51’, ‘Connection’: ‘keep-alive’, ‘Date’: ‘Sat, 08 Apr 2023 14:02:13 GMT’, ‘Server’: ‘nginx’, ‘x-mbx-uuid’: ‘1aea7493-be01-4333-8905-a86bd0230c10’, ‘x-mbx-used-weight’: ‘2’, ‘x-mbx-used-weight-1m’: ‘2’, ‘Strict-Transport-Security’: ‘max-age=31536000; includeSubdomains’, ‘X-Frame-Options’: ‘SAMEORIGIN’, ‘X-Xss-Protection’: ‘1; mode=block’, ‘X-Content-Type-Options’: ‘nosniff’, ‘Content-Security-Policy’: “default-src ‘self’”, ‘X-Content-Security-Policy’: “default-src ‘self’”, ‘X-WebKit-CSP’: “default-src ‘self’”, ‘Cache-Control’: ‘no-cache, no-store, must-revalidate’, ‘Pragma’: ‘no-cache’, ‘Expires’: ‘0’, ‘X-Cache’: ‘Error from cloudfront’, ‘Via’: ‘1.1 fb465ef388ebb25e5a872213f9ac3e9c.cloudfront.net (CloudFront)’, ‘X-Amz-Cf-Pop’: ‘MRS52-C1’, ‘X-Amz-Cf-Id’: ‘qhUwGrn0QsgLha55dTIG8o79Sipg843zVo5H6Ho3P7_DfESTXn8C-A==’}, None)

I think one have to remove the decimals in the prices