added

New Convert and Withdrawal Liquidity Endpoints

We've added 2 new API endpoints: GET /convert_withdraw/rfq and POST /convert_withdraw/execute. They allow a platform to offer a quote, execute it, and trigger an automated on-chain withdrawal to a withdrawal address of choice.

Digging into the details, this quote:

  • Requires the platform to specify a withdrawal_address on the GET /convert_withdraw/rfq call
  • Can be locked in for 5 or 30 seconds, this is configurable
  • Includes the asset purchase price (asset_cost_notional), network fee notional value (network_fee_notional), network fee quantity (network_fee_quantity), and the cumulative purchase price (total_notional)

These endpoints are very similar to the existing GET /liquidity/rfq and POST /liquidity/execute endpoints except:

  • withdrawal_address is required on the GET
  • Zero Hash will auto-send the crypto on-chain as a withdrawal
  • There is a new API key permission called Convert and Withdraw that will need to be enabled at the time of API key creation in order to use these new endpoints

Use Cases

  • Payment acquirers offering an on-ramp product to their merchant partners
  • Crypto on-ramps offering a direct-to-consumer crypto purchasing product

API Sequencing

Get quote:
A platform hits GET /convert_withdraw/rfq using the following query params:

  • participant_code: CUST01
  • underlying: BTC
  • quoted_currency: USD
  • total: 20
  • withdrawal_address (required): 2N8PYGKSQRpHa5VDNZ4iLwxi5crpRWb3TR1

Execute Quote:
A platform hits POST /convert_withdraw/execute using the quote_id from the response above

Monitor Withdrawal:
Platform hits GET /withdrawals/requests/12345

Performance Expectations

CERT:
A platform should expect latency response times of less than 800ms, at the 99th percentile, at a maximum of 8 requests per second.

PROD:
A platform should expect latency response times of less than 800ms, at the 99th percentile, at a maximum of 100 requests per second.

For more details, please visit our API documentation.