The fee is a flat 0.5 ML default sized for a ~200 byte transfer, as the comment notes, because the REST indexer exposes no fee-rate endpoint. A transfer that selects several inputs is larger than that, so the flat fee overpays on small txs and can drift toward the min-relay floor on large ones. After encoding the tx, derive the fee from its byte size at the ~0.001 ML/byte min relay rate, keeping the flat value as a floor.
The fee is a flat 0.5 ML default sized for a ~200 byte transfer, as the comment notes, because the REST indexer exposes no fee-rate endpoint. A transfer that selects several inputs is larger than that, so the flat fee overpays on small txs and can drift toward the min-relay floor on large ones. After encoding the tx, derive the fee from its byte size at the ~0.001 ML/byte min relay rate, keeping the flat value as a floor.