Mistakes
Sell ((581.63, 0.01): 400: {
I don't have access except to ask why.
The Little DreamAn exception mechanism can only capture program errors, interface reports are not program errors (interface reports are interface business errors, not anomalies).
The Little DreamIn the same way, calls that fail return empty values.
The Little Dreamnil is the meaning of the empty value. It is possible to judge whether the interface is called failed, and to judge whether the return is empty.
wangtaolueI looked at it and it looked like it was returning nil, but I didn't know if it was a string or what type.
wangtaolueI asked for this error: 502:
The Little DreamWhat's up? Sell ((581.63, 0.01): 400: {"code":-4024, "msg:"Limit price can't be lower than 600.087"} What's up? This is a business error, the interface returns an empty value, python is ``None ``. JS is ``null ``. Get the original response information from the exchange interface using GetRawJSON, which is available in the FMZ API documentation.
wangtaolueIs it a string or what type?
wangtaolueSo this is going to return a value that is
wangtaolueSo what's the return value of this is this string?
wangtaolueHow to get this situation?
wangtaolueSell ((4649.03, 0.022): 502: