Swap via deposit does not require a wallet connection. User should make a deposit by himself.
Retrieving Token Quotes
Now that the wallet is connected, we can request token quotes from Rubic API. Endpoint:POST https://api-v2.rubic.exchange/api/routes/quoteBest
Retrieving Data to Execute a Transaction
To perform a token swap through Rubic API, we need to get the necessary data for the transaction. Endpoint:POST https://api-v2.rubic.exchange/api/routes/swap
Executing a Transaction with the API Response Data
You should display thedepositAddress, amountToSend, exchangeId and extraFields fields from the transaction object in your UI. The user should send amount to the received depositAddress from his wallet by himself.
User should pass the extraFields.value field otherwise the transaction may fail.