A certain amount will be in the smart contract, and the purchase of purp. and sale should be made from it. For example, eth (long, short) is a purchase and then a sale. buy - sell
I see it's been a while since this topic was discussed, but I'm curious if anyone has found a solid way to handle order execution on dYdX with minimal slippage. Have there been any updates or changes in their API that might affect how trades are executed? Would love to hear if anyone has refined their approach or encountered new challenges.
If you're looking to build a bot for dYdX trading, you might want to check out dYdX's official API documentation. It has everything needed to place, cancel, and modify orders programmatically. If you're working with a prop trading firm, you'll probably need efficient order execution and risk management features, so integrating WebSockets for real-time data updates could be a good approach for your strategy.