For the same XRP Ledger “fill or kill” order, why does the fill condition also depend on another flag?

XRPL’s tfFillOrKill requires the order to be filled completely on the spot. By default, “completely” is measured by the amount you want to receive—that is, TakerPays. If tfSell is also enabled, the criterion changes to the amount you want to sell—that is, TakerGets.

Imagine you’re willing to sell some XRP for another asset. If the current offer is better, selling only part of your XRP might be enough to get the amount you originally wanted. In the default mode, completion depends on how much you receive. With tfSell enabled, the order must be able to sell all the specified XRP immediately to count as fully filled, even if you receive more of the other asset in return.

When troubleshooting why a fill-or-kill order was not executed, first confirm whether completion is determined by the buy quantity or the sell quantity, then check the liquidity that met the quote conditions at the time.

$XRP #XRPL

Original documentation: https://xrpl.org/docs/references/protocol/transactions/types/offercreate