ftx-api-wrapper-python3 icon indicating copy to clipboard operation
ftx-api-wrapper-python3 copied to clipboard

Introduce a "failsafe" flag for risky private operations

Open zevaverbach opened this issue 4 years ago • 9 comments

For any private operations which are "risky" -- meaning that they'll actually do something with assets when they're called, like buy/sell assets -- what do you think about an im_sure flag which defaults to False? And it could maybe raise an exception when it's set to False saying "Please set im_sure to True if you want this transaction to go through."

zevaverbach avatar May 11 '21 12:05 zevaverbach

This is good, and maybe I can support withdraw feature with pyOTP, what do you think?

LeeChunHao2000 avatar May 11 '21 12:05 LeeChunHao2000

That's a cool idea! Although I also respect your original choice of not implementing withdrawals. The main strength of this is for algorithmic trading, right?

For that reason, I'm rethinking my suggestion to add failsafes. What do you think?

zevaverbach avatar May 12 '21 20:05 zevaverbach

Yes, I think failsafes is a good idea that users can decide how much they wanna risk.

LeeChunHao2000 avatar May 13 '21 13:05 LeeChunHao2000

Can you give an example of how that API might work?

zevaverbach avatar May 13 '21 15:05 zevaverbach

which one?

LeeChunHao2000 avatar May 14 '21 12:05 LeeChunHao2000

withdrawal with an OTP

zevaverbach avatar May 14 '21 12:05 zevaverbach

Params here, the last param code is 2fa code, we can get it via this lib.

totp = pyotp.TOTP('secret get from FTX 2fa setting')
totp.now() # => '492039'

LeeChunHao2000 avatar May 14 '21 12:05 LeeChunHao2000

but how would you integrate it with withdrawal methods?

zevaverbach avatar May 14 '21 19:05 zevaverbach

Sorry for late, I will integrate this part after I finish final exam.

LeeChunHao2000 avatar Jun 17 '21 09:06 LeeChunHao2000