Hi everyone,
I’m new to this world and I’m trying to understand some things…
I have two questions inherent in the same problem:
Question 1:
I noticed several times that creating a SELL LIMIT order with Python:
from binance.client import Client
…
client = Client('API KEY', 'APY SECRET', testnet=True)
…
sell_order = client.create_order(
symbol=self.crypto_to_trade,
side='SELL',
type='LIMIT',
timeInForce=time_in_force,
quantity=qty,
price=price
)
Often these Sell Limits are closed even if the market price has not arrived at the price indicated for the limit.
Looking into the price historian:
bars = client.get_historical_klines(self.trade_crypto, interval, timestamp, limit=1000)
I noticed that the Sell Limits close when the price is reached by high-price values.
Is this behavior a testnet bug? Or do it also occur in the real environment?
Question 2:
I noticed the same error a few times on the BUY MARKET, buying at a certain price, I found my order executed at a much higher market price:
bought when the market was at: 36400.67
Buy returns a purchase price to: 40620.87
I wonder if all this is normal or if it is a testnet bug, which never occurs in the real environment?
Thank you in advance those who can give me an answer.
I look forward to comments