You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For (filled) stop orders - average is missing (probably a duplicate of #21419).
What's worse though is that cost is NOT correct.
This order filled at 0.0000094949 - and was for 10_417_100 - a USDT cost of 98.9103370717.
The (parsed) result from ccxt however has "98.80306837" as cost - which (i assume) is simply price * amount.
The "stoploss" response from the exchange does have a corresponding field in "cummulativeQuoteQty" - which does contain the correct cost - and which i think should be used by ccxt.
I understand that price is the limit of the stop limit price - and i also kinda understand that average is not filled currently - as it's not provided by the exchange.
However unfortunately, the absence of average - combined with the wrongness of cost makes it currently near impossible to correctly calculate the price for an order (without using the info object) - which i find rather unfortunate.
@xmatthias looks like the cost was wrong, what's the price of the order? I used cummulativeQuoteQty / executedQty (9.494997366999999e-6) or (cummulativeQuoteQty - fee) / executedQty (9.485502369632964e-6), but the number didn't match......
Well the price is shown in the screenshot (took a highlighted screenshot from the order below for you to highlight this).
the price shown on exchange IS 0.0000094949 - which is what your first calculation yielded cummulativeQuoteQty / executedQty.
you got 0.00000949497366999999 - which is the same for the first 10(!) decimals - and the rest, I'd assume to be a rounding problem (it'll most likely disappear if you do string math).
Now the exchange will truncate the remaining decimals - but it's a LOT better than what ccxt is currently providing - which is using the price of the limit order - so "stop price - 1%" in my case - which is 1% below the actual execution price.
Operating System
python
Programming Languages
Python
CCXT Version
4.3.28
Description
For (filled) stop orders - average is missing (probably a duplicate of #21419).
What's worse though is that cost is NOT correct.
This order filled at 0.0000094949 - and was for 10_417_100 - a USDT cost of
98.9103370717
.The (parsed) result from ccxt however has "98.80306837" as cost - which (i assume) is simply price * amount.
The "stoploss" response from the exchange does have a corresponding field in
"cummulativeQuoteQty"
- which does contain the correct cost - and which i think should be used by ccxt.I understand that
price
is the limit of the stop limit price - and i also kinda understand that average is not filled currently - as it's not provided by the exchange.However unfortunately, the absence of average - combined with the wrongness of cost makes it currently near impossible to correctly calculate the price for an order (without using the info object) - which i find rather unfortunate.
Code
The text was updated successfully, but these errors were encountered: