diff --git a/wiki/Manual.md b/wiki/Manual.md index e10b0a5c58df..a1d05666c136 100644 --- a/wiki/Manual.md +++ b/wiki/Manual.md @@ -1802,6 +1802,10 @@ Most of methods returning orders within ccxt unified API will usually yield an o - The `lastTradeTimestamp` timestamp may have no value and may be `undefined/None/null` where not supported by the exchange or in case of an open order (an order that has not been filled nor partially filled yet). - The `lastTradeTimestamp`, if any, designates the timestamp of the last trade, in case the order is filled fully or partially, otherwise `lastTradeTimestamp` is `undefined/None/null`. - Order `status` prevails or has precedence over the `lastTradeTimestamp`. +- The `cost` of an order is: + - `if (status === 'open' and filled === 0) { amount * price }` + - `if (status === 'closed' || status === 'canceled') { filled * price }` +- The `cost` of an order means the total *quote* volume of the order (whereas the `amount` is the *base* volume). The value of `cost` should be as close to the actual most recent known order cost as possible. The `cost` field itself is there mostly for convenience and can be deduced from other fields. ### Placing Orders @@ -2040,9 +2044,9 @@ Returns ordered array `[]` of trades (most recent trade last). } ``` -**The work on `'fee'` info is still in progress, fee info may be missing partially or entirely, depending on the exchange capabilities.** - -**The `fee` currency may be different from both traded currencies (for example, an ETH/BTC order with fees in USD).** +- The work on `'fee'` info is still in progress, fee info may be missing partially or entirely, depending on the exchange capabilities. +- The `fee` currency may be different from both traded currencies (for example, an ETH/BTC order with fees in USD). +- The `cost` of the trade means `amount * price`. It is the total *quote* volume of the trade (whereas `amount` is the *base* volume). The cost field itself is there mostly for convenience and can be deduced from other fields. ### Trades By Order Id