amount_out is already net of every component below, and fee_breakdown explains the difference between what the user puts in and what they get out.
Components
Each entry infee_breakdown.components has a name, a side, a cost in usd_micros, and for gas components a native amount in base units of that chain’s native asset.
side says which leg of the trade the cost belongs to, not who pays it. Every component is deducted from the same trade before amount_out is computed.
Components are only present when they apply. An Arbitrum to Solana USDC transfer with no referrer and no gas drop carries the spread and gas components; a cross-asset or gasless quote adds its own.
Totals
USD values are integers in micros:
1000000 is one dollar. Divide by 1,000,000 to display, and keep them as strings until you do — they exceed safe integer range in aggregate.
The spread
The operator spread is basis points on cross-chain quotes and on same-chain swaps. It appears asbps_spread or same_chain_swap_fee.
Quotes requested without an API key pay an additional basis points, folded into the same component. The difference is not itemized, so a keyless integration silently prices worse than a keyed one. See API keys.
Gas is committed, not estimated at settlement
dst_fulfill_gas and src_refund_gas are computed from the live gas price at quote time and then committed. The operator absorbs the difference if gas rises before the fulfillment lands, which is why a quote left sitting for a long time is refreshed rather than honored.
The one place this is visible to a user is refunds: if gas has risen far enough that the refund would cost more than the committed src_refund_gas, the refund waits for gas to come down rather than eating the deposit. See Refunds.
Displaying fees
Showamount_out as the headline number — it is already net. Use the breakdown for the detail row, grouped by side, and label gas_drop as an amount the user receives rather than a cost, because that is what it is.
Referrer fees are part of the same breakdown. If you set them, they are yours; see Referral program.