germangar / whook

WHOOK is a fully functional webhook for handling Tradingview Alerts to crypto exchanges in perpetual USDT futures. Supported exchanges: Binance, Kucoin, Bitget, Coinex, Okx, Bybit, Bingx, Kraken and Phemex.
MIT License
33 stars 10 forks source link

Bad margin mode on Kucoin #15

Closed iZnogoude closed 3 months ago

iZnogoude commented 3 months ago

Hello there, Here is your favorite betatestor with another issue ^_^

The margin mode is set up to cross and it results on a isolated margin mode in kucoin exchange :

[
        {
                "ACCOUNT_ID":"iz.......", 
                "EXCHANGE":"kucoinfutures", 
                "API_KEY":"xxxxxxxxxxxxxxxxxxxxxxxxxxxx", 
                "SECRET_KEY":"xxxxxxxxxxxxxxxxxxxxxxxxxxxx", 
                "PASSWORD":"xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                "MARGIN_MODE":"cross"
        }
]
Refreshing positions izn.......@gmail.com: 1 positions found
ONDO/USDT:USDT * isolated:3x * long * 25.0 * 98.1784[$] * -12.39[$] * -12.61%

Seems that buying and selling as expected :

[2024/06/17][06:00:04]  ALERT: izn.....@gmail.com ONDOUSDT buy 1@ x3
[2024/06/17][06:00:04] ----------------------------
[2024/06/17][06:00:06]  * Order successful: ONDO/USDT:USDT buy 1.0 3x at price 1.1195 id 192030352959725569
[2024/06/17][07:15:06]  
[2024/06/17][07:15:06]  ALERT: izn.....@gmail.com ONDOUSDT sell 1@ x3
[2024/06/17][07:15:06] ----------------------------
[2024/06/17][07:15:07]  * Order successful: ONDO/USDT:USDT sell 1.0 3x at price 1.1395 id 192049230985039872

I had no positions opened previously. Using CCXT 4.3.40 Last version of whook (I think) Platform : AWS Ubuntu

Have a nice day !

germangar commented 3 months ago

This one is not on me. Kucoin only has isolated mode. There's no option to change it to anything else :)

iZnogoude commented 3 months ago

Ah, okay, thanks for the information lad :)