# Estimate Fee **POST /wallets/{walletId}/payment-fees**

status: stable

Estimate fee for the transaction. The estimate is made by assembling multiple transactions and analyzing the distribution of their fees. The estimated_max is the highest fee observed, and the estimated_min is the fee which is lower than at least 90% of the fees observed. ## Servers - https://localhost:8090/v2: https://localhost:8090/v2 () ## Parameters ### Path parameters - **walletId** (string(hex)) ### Body: application/json (object) - **payments** (array[object]) A list of target outputs with amounts specified. When creating a new transaction, the wallet software ensures that all user-specified transaction outputs have ada amounts that satisfy the ledger minimum UTxO rule: - If a user-specified transaction output has an ada `amount` that is **zero**, the wallet software will automatically assign a minimal amount of ada to the output so that it satisfies the ledger minimum UTxO rule. - If a user-specified transaction output has an ada `amount` that is **non-zero**, the wallet software will verify that the specified amount is large enough to satisfy the ledger minimum UTxO rule. If the amount is not large enough, the wallet software will return a `utxo_too_small` error, together with a revised ada amount that does satisfy the minimum UTxO rule. - **withdrawal** (string) When provided, instruments the server to automatically withdraw rewards from the source wallet when they are deemed sufficient (i.e. they contribute to the balance for at least as much as they cost). As a consequence, the resulting transaction may or may not have a withdrawal object. Summarizing: withdrawal field | reward balance | result --- | --- | --- `null` | too small | ✓ no withdrawals generated `null` | big enough | ✓ no withdrawals generated `"self"` | too small | ✓ no withdrawals generated `"self"` | big enough | ✓ withdrawal generated - **metadata** (object | null) - **time_to_live** (object) The TTL (time to live) is the time period in which the transaction will be accepted into node mempools. After the TTL has lapsed, the transaction is considered expired. At this point, nodes will give up on broadcasting the transaction, and the wallet will release the funds allocated to the transaction so they can be used for other payments. The TTL should be long enough that the transaction has time to be propagated through the network and confirmed, but short enough so that - in the event of failures - UTxO are returned to the wallet in a timely manner. The TTL value is given in seconds. It will be converted to a slot number internally. If the TTL is not provided for a payment, a reasonable default value will be used. ## Responses ### 400 Bad Request #### Body: application/json (object) - **message** (string) May occur when a request is not well-formed; that is, it fails to parse successfully. This could be the case when some required parameters are missing or, when malformed values are provided. - **code** (string) ### 403 Forbidden #### Body: application/json (object) - **message** (string) May occur when trying to perform an operation not supported by this type of wallet. - **code** (string) ### 404 Not Found #### Body: application/json (object) - **message** (string) May occur when a given walletId does not match with any known wallets (because it has been deleted, or has never existed). - **code** (string) ### 406 Not Acceptable #### Body: application/json (object) - **message** (string) May occur when providing an invalid 'Accept' header. - **code** (string) ### 415 Unsupported Media Type #### Body: application/json (object) - **message** (string) May occur when providing an invalid 'Content-Type' header. - **code** (string) ### 202 Accepted #### Body: application/json (object) - **estimated_min** (object) Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead. - **estimated_max** (object) Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead. - **minimum_coins** (array[object]) Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead. - **deposit** (object) Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead. [Powered by Bump.sh](https://bump.sh)