#### swap

0 credits

| param | type |   |   |
|---|---|---|---|
| quote_id | 32 hex chars | req | the quoteId of a served quote |
| user_pubkey | pubkey | req |  |
| compute_unit_price_micro_lamports | u64 | opt | 0 to 300000; default a sampled network price |

```
{"jsonrpc":"2.0","id":1,"method":"swap","params":[{"quote_id":"<quote_id>","user_pubkey":"<YOUR_PUBKEY>","compute_unit_price_micro_lamports":10000}]}
```

**answer**: {transaction (unsigned, base64), blockhash, lastValidBlockHeight, minAmountOut, computeUnitLimit, priorityFeeLamports, rentLamports, ataCreates, txVersion?, routeRerouted?, swapTag?}

**refuses**: 403 -32050 the account lacks the quote module; 401 -32001 the key lacks the quote scope; 400 -32602 a param missing, unknown or out of range; 400 -32095 quote_id unknown or expired; 200 -32055 route over the quote's account cap; -32056, -32060 to -32099 a named build refusal; HTTP 200, 400 or 503 by refusal; 400 -32600 sent in a batch
