8
Follow
21
Followers
کوڈ
def short(direction,price,amount):
exchange.SetDirection('sell')
logtype = LOG_TYPE_SELL
para = ""
para += "market='"+exchange.GetCurrency().replace('_USD', '-PERP') + "'"
para += "&side='"+ direction + "'"
para += "&price=" + str(price)
para += "&type='" + "'limit'" + "'"
para += "&size=" + str(amount)
if direction == "'buy'":
para += "&reduceOnly=true"
logtype = LOG_TYPE_BUY
exchange.SetDirection('closesell')
para+="&postOnly=true"
# para+="×tamp="+ str(int(UnixNano() / 1000000))
ret = exchange.IO("api", "POST", '/orders', para)
exchange.Log(logtype, price, amount)
return ret
روبوٹ کا اصل پتہ https://www.fmz.com/robot/407656
Related Recommendations
How to Specify Different Versions of Data for the Rented Strategy by Its Rental Code MetadataAdvanced Tutorial for FMZ Quant platform Strategy WritingElementary Tutorial for FMZ Quant platform Strategy WritingGet Started with FMZ Quant PlatformSECURITY BUGI keep getting error: Exchange_GetAccount: Invalid ContractTypeWe have an incredibly profitable market making algorithm for sideways markets on Bitmex - but need expert to help eliminate wait times during downward volatility in the marketError with deribitLimitations of the backtesting engineHow to install ta-lib on linux docker?

