I would like to ask you guys, how can you leverage the digital currency?

Author: xunandxuan, Created: 2022-02-18 15:58:22, Updated:

import datetime

def main() : exchange.IO("trade_margin") minStocks=0.0001 t=0 costprice=0 baseprice=0


The top is the beginning of my strategy code, and the bottom is the beginning of my strategy code. I'm going to start with a sentence.exchange.IO("trade_margin"), but there is no indication of leverage at the time of the review. The retest is the binary exchange, the transaction pair is BIC_USTD, and the underlying function is exchange.Buy ((Price, Amount).

I would like to ask you, is it possible to do a re-test with leverage only on a real disk?


More

xunandxuanThank you for your reply. I would like to ask, the documentation instruction mentioned that the input exchange.IO ("trade_margin") can be switched to leverage account mode, after entering the leverage account mode, is it possible to leverage trading using the Binance Exchange's API interface?

The Little DreamLeverage is used for both back-testing and real-time trading. Set MarginLevel. This function is only available for futures exchange objects, and should never be called under a spot exchange object.

The Little DreamThis is not supported by retesting.

xunandxuanAfter the swap is the spot leverage account, the down order is the order of the down spot leverage. If retesting is done, is it not possible to mimic the spot leverage order after switching to the spot leverage account?

The Little DreamHello, you need to exchange the object of the currency exchange in cash. After the exchange, the order is placed on the leveraged account.