I am trying to make an order with binance-connector-node as follows:
const options = {
price: 438.3,
quantity: 0.2,
timeInForce: "GTC",
};
(async () => {
try {
const orderData = (
await client.newOrder("BTCBUSD", "BUY", "LIMIT", options)
).data;
console.log({ orderData });
} catch (e) {
console.log(e.response.data);
}
})();
But I keep getting { code: -1013, msg: 'Filter failure: PERCENT_PRICE' }
despite verifying that the current price is around 438 using
const klines = (
await client.klines(symbol, "5m", {
limit: 1,
})
).data
// Result
/*
[
1648499700000,
'438.20000000',
'438.60000000',
'438.00000000',
'438.60000000',
'283.28200000',
1648499999999,
'124151.96680000',
262,
'151.73100000',
'66495.78850000',
'0'
]
*/
and using:
const exchangeInfo = (await client.exchangeInfo({ symbol: symbols.BTCBUSD }))
.data;
console.log({ ex: exchangeInfo.symbols[0].filters });
// Result
/*
{
filterType: 'PERCENT_PRICE',
multiplierUp: '5',
multiplierDown: '0.2',
avgPriceMins: 5
},
*/
What am I doing wrong?