exchange.IO("priorityFee", ...)
When called as exchange.IO("priorityFee", ...), this function sets the priority fee cap for swap transactions on a Jupiter exchange object.
exchange.IO(k)
exchange.IO(k, sol)Examples
Raise the priority fee cap.
javascript
function main() {
exchange.IO("priorityFee", 0.005)
Log("Priority fee cap:", exchange.IO("priorityFee"), "SOL")
}Returns
| Type | Description |
number | Returns the current priority fee cap (SOL). |
Arguments
| Name | Type | Required | Description |
k | string | Yes | Selects what the |
sol | number | No | Priority fee cap per transaction, in SOL. Its range is 0 to 0.1 and its default is 0.001. Omit it to query the current value. |
See Also
Jupiter exchange.IO exchange.IO("slippage") exchange.IO("receipt") exchange.IO("transfer") exchange.CreateOrder
Remarks
The actual priority fee is estimated by Jupiter from current network congestion (a high tier) and never exceeds this cap. Once the transaction is confirmed, fee in the Info of the order returned by exchange.GetOrder is the fee actually paid for the transaction (SOL, base fee plus priority fee). If the cap is too low, transactions may fail to land in time during congestion and expire.