Fehler
Sell(581.63, 0.01): 400: {"code":-4024,"msg":"Limit price can't be lower than 600.087"}
Mein Code.
def sell(currency,price,amount):
Log("sell currency: ", currency)
set_precision(currency)
exchange.SetDirection("sell")
id1 = 0
k = 0
while (id1 == 0 and k == 0):
try:
id1 = exchange.Sell(price, amount)
Log("price: ", price)
Log("amount: ", amount)
k = 1
Log("k: ", k)
except:
cancel_all_sell_order(currency)
continue
return id1
Es gibt keine Eintrittskarten, außer, um zu fragen, warum
Sell(581.63, 0.01): 400: {"code":-4024,"msg":"Limit price can't be lower than 600.087"}
这种业务错误, 接口返回空值,python 是None 。 JS是null。
获取交易所接口原始应答信息,用GetRawJSON, 在FMZ API 文档上有,可以查阅看下。
我问的是这个错误Sell(4649.03, 0.022): 502: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <TITLE>ERROR: The request could not be satisfied</TITLE> </HEAD><BODY> <H1>502 ERROR</H1> <H2>The request could not be satisfied.</H2> <HR noshade size="1px"> The origin closed the connection. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner. <BR clear="all"> If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation. <BR clear="all"> <HR noshade size="1px"> <PRE> Generated by cloudfront (CloudFront) Request ID: I0xVlMaU_kVYhR0FicEUq-pulPa--VPkbJtWbjg_2yZlhX1x1wnL4g== </PRE> <ADDRESS> </ADDRESS> </BODY></HTML>
Sell(4649.03, 0.022): 502: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <TITLE>ERROR: The request could not be satisfied</TITLE> </HEAD><BODY> <H1>502 ERROR</H1> <H2>The request could not be satisfied.</H2> <HR noshade size="1px"> The origin closed the connection. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner. <BR clear="all"> If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation. <BR clear="all"> <HR noshade size="1px"> <PRE> Generated by cloudfront (CloudFront) Request ID: I0xVlMaU_kVYhR0FicEUq-pulPa--VPkbJtWbjg_2yZlhX1x1wnL4g== </PRE> <ADDRESS> </ADDRESS> </BODY></HTML>
出现这个错误也不会返回
- 1
