Fast transaction sequence

I state that I have been using Python for a few days.
The idea is to make a few transactions in a short time.
I wrote a piece of code and the first transaction is successful, the second always returns the error: “APIError(code=-1013): Filter failure: NOTIONAL”
the last two transactions are:
|SYS|USDT|buy|
|SYS|BUSD|sell|
Initial capital is 40.0 USDT.
For which it exceeds the limits of capital and quantity.
Following the purchase and sale code
BUY:
order = client.create_order(
symbol=symbol,
side=Client.SIDE_BUY,
type=Client.ORDER_TYPE_LIMIT,
timeInForce=Client.TIME_IN_FORCE_FOK,
quantity=quantity,
price=‘{:0.0{}f}’.format(price, precision)
)
SELL:
order = client.create_order(
symbol=symbol,
side=Client.SIDE_SELL,
type=Client.ORDER_TYPE_LIMIT,
timeInForce=Client.TIME_IN_FORCE_FOK,
quantity=quantity,
price=‘{:0.0{}f}’.format(price, precision)
)
I make the purchase, if order[‘status’] == ‘FILLED’ I continue
But at the sale it crashes with the error “APIError(code=-1013): Filter failure: NOTIONAL”.
I tried to enter a wait after purchase of 10 seconds but the error persists.
Do I have to do something between buying and selling?
Please if anyone has any ideas, thanks

Premetto che sono pochi giorni che utilizzo Python.
L’idea è fare alcune transazioni in breve tempo.
Ho scritto una parte di codice e la prima transazione va a buon fine, alla seconda mi restituisce sempre, l’errore: “APIError(code=-1013): Filter failure: NOTIONAL”
le ultime due transazioni sono:
|SYS|USDT|buy|
|SYS|BUSD|sell|
Il capitale iniziale è di 40.0 USDT.
Per cui supera i limiti di capitale e quantità.
A seguire il codice di acquisto e vendita
BUY:
order = client.create_order(
symbol=symbol,
side=Client.SIDE_BUY,
type=Client.ORDER_TYPE_LIMIT,
timeInForce=Client.TIME_IN_FORCE_FOK,
quantity=quantity,
price=‘{:0.0{}f}’.format(price, precision)
)
SELL:
order = client.create_order(
symbol=symbol,
side=Client.SIDE_SELL,
type=Client.ORDER_TYPE_LIMIT,
timeInForce=Client.TIME_IN_FORCE_FOK,
quantity=quantity,
price=‘{:0.0{}f}’.format(price, precision)
)
Faccio l’acquisto, se order[‘status’] == ‘FILLED’ proseguo
Ma alla vendita si blocca con l’errore “APIError(code=-1013): Filter failure: NOTIONAL”.
Ho provato a inserire un’attesa dopo l’acquisto di 10 secondi ma l’errore persiste.
Devo fare qualcosa tra l’acquisto e la vendita ?
Per cortesia se qualcuno ha qualche idea, grazie

Please share the question in English, that can help us to respond faster.

If the error is about Filter failure: NOTIONAL, that means the order value is below the min notinal value that required for the symbol. I could recommend to read the document Binance API Documentation , especially the NOTIONAL session.

Thanks

All right, thank you, I’ve translated

The error message you’re receiving, “APIError(code=-1013): Filter failure: NOTIONAL,” indicates that the notional value of your order is not within the allowed limits set by Binance. The notional value is the product of the quantity and price of the order.

To resolve this issue, you need to ensure that your sell order’s notional value falls within the acceptable range.

The value shown in MIN_NOTIONAL is the minimum value you can purchase of a symbol. For example, if MIN_NOTIONAL is 10, the order must be at least of 10 USDT.

LOT_SIZE refers to the quantity of your order. You must obey the stepSize shown in the filter. If stepSize = 0.01, this means that your quantity cannot exceed 2 decimal places.

Thanks, solved