RageTrade / utilities

Arbitrage bot for FTX and RageTrade
7 stars 5 forks source link

isLong check wrong #8

Closed 0xDosa closed 2 years ago

0xDosa commented 2 years ago

https://github.com/RageTrade/arbitrage-bot/blob/cb9dc696b06a609800a58b72ecfed43082484c7d/arbitrage-bot/rage-trade/index.ts#L242 This check should be basis the position that you are trying to take and not you current position

protodev-rage commented 2 years ago

check seems correct, for margin ratio after trade, that check is done in simulatePostTrade