How do I choose between getUserQuote and getSwapUserQuote endpoints in the SDK?

Last updated: February 26, 2026

Context

When integrating with the Rhino SDK, developers need to understand which quote endpoint to use for different transaction types including bridges, swaps, or combined bridge/swap operations. There are multiple quote endpoints available (getUserQuote, getSwapUserQuote, and their public counterparts) and it's important to understand their differences and use cases.

Answer

For new integrations, you should use getSwapUserQuote as it's the newer, more general endpoint that supports both bridges and swaps.

Key differences between the endpoints:

  • getUserQuote is a legacy endpoint that only supports bridges and doesn't take a tokenOut parameter

  • getSwapUserQuote is the newer endpoint that supports both bridges and swaps, and includes tokenIn and tokenOut parameters

How getSwapUserQuote handles different scenarios:

  • When tokenIn and tokenOut are different tokens on different chains: performs a bridge/swap combination

  • When tokenIn and tokenOut are the same token on different chains: performs a bridge operation

  • When tokenIn and tokenOut are different tokens on the same chain: performs a swap operation

When you call getSwapUserQuote with the same tokenIn and tokenOut, it behaves like a bridge quote and returns a response with _tag: "bridge", which is why the responses look similar to getUserQuote.

Public vs User endpoints:

  • Public endpoints (getPublicQuote, getSwapPublicQuote) don't require authentication but apply higher B2C fees and don't provide access to historic transactions

  • User endpoints require authentication with your API key, apply lower B2B fees, and provide access to your historic transactions

Recommendation: Use getSwapUserQuote for all new integrations as it handles all transaction types (bridge, swap, and bridge/swap combinations) in a unified way.