Skip to main content

Sell

We currently support off-ramping for ETH only with BTC coming soon. Our Sell endpoints are identical to our Buy endpoints but with the 'sell' prefix. Once a user completes the steps on a provider widget, they are redirected back to MetaMask, where the send transaction action will happen. We pre-fill the transaction details in the wallet; the automatic redirect must include order details, including the deposit address.

::: info important

We do not support testnets. All QA for off-ramping will require the use of mainnet tokens.

:::

Sell Configuration

Just like with on-ramping, you will need to define your supported cryptocurrencies, fiats, and countries in a /sell-configuration endpoint. The one difference between the on-ramp config here is the inclusion of "payoutLimit" which lets you define the minimum and maximum amount of a given crypto a user can sell.

Sell Quote

/sell-quote

Sell Widget

/sell

Sell Order

The order returned during our status polling is identical to the buy order but includes an additional mandatory field of "depositWallet". This tells us where the funds need to be sent to after a user is redirected back to MetaMask to complete the transaction /sell-order

Sell Orders

/sell-orders

important

The deposit address must be a wallet address, not a contract address, if dealing with Native Tokens.

Status

Once the user is redirected back to MetaMask we will begin polling the /sell-order endpoint to get the transaction status. On the first redirect back to MetaMask the order must be in the CREATED status. This tells MetaMask to trigger the send action in the extension. After funds are received, we expect the order to go through the same flow as in Buy: PENDING/FAILED/CANCELLED/COMPLETED.