# Predict Transaction Simulate the spot swap and changes in token balances, in addition to the fee estimation. Endpoint: POST /api/v1/swaps/predict Version: 0.2.0 Security: bearerAuth ## Request fields (application/json): - `quote_id` (string, required) The ID of the quote. - `vault_id` (string, required) The unique identifier of the vault. - `input_asset_identifier` (any, required) - `output_asset_identifier` (any, required) - `amount` (string, required) The amount to swap. Example: "1000000000000000000" - `slippage_bps` (string) The slippage tolerance in basis points. Example: "1000000000000000000" - `fee` (any) - `should_run_policy_check` (boolean) Should the policy check run - `fail_on_prediction_failure` (boolean) if transaction creation should fail in case prediction failed, otherwise. In case simulation has failed upon continuation, the expected result of the transaction will be partial and policy will be applied on information that can be extracted statically from the transaction only. This might result in falling back to the default policy rule. ## Response 400 fields (application/json): - `title` (string, required) Human-readable error message. - `detail` (string, required) Detailed error message. - `full_detail` (string) Full error message with additional details, if available. - `request_id` (string) Request ID - for debugging purposes. - `system_error_code` (string) An additional system error code in Fordefi. - `error_type` (string) Enum: "revoke_allowance_first", "quote_not_found" ## Response 401 fields (application/json): - `title` (string, required) Human-readable error message. - `detail` (string, required) Detailed error message. - `full_detail` (string) Full error message with additional details, if available. - `request_id` (string) Request ID - for debugging purposes. ## Response 403 fields (application/json): - `title` (string, required) Human-readable error message. - `detail` (string, required) Detailed error message. - `full_detail` (string) Full error message with additional details, if available. - `request_id` (string) Request ID - for debugging purposes. ## Response 408 fields (application/json): - `title` (string, required) Human-readable error message. - `detail` (string, required) Detailed error message. - `full_detail` (string) Full error message with additional details, if available. - `request_id` (string) Request ID - for debugging purposes. ## Response 422 fields (application/json): - `title` (string, required) Human-readable error message. - `detail` (array, required) - `detail.loc` (array, required) - `detail.msg` (string, required) - `detail.type` (string, required) - `full_detail` (string) Full error message with additional details, if available. - `request_id` (string) Request ID - for debugging purposes. ## Response 500 fields (application/json): - `title` (string, required) Human-readable error message. - `detail` (string, required) Detailed error message. - `full_detail` (string) Full error message with additional details, if available. - `request_id` (string) Request ID - for debugging purposes.