跳转到主要内容

什么是 Ramps?

Ramps 是在法币和加密货币之间转换的交易。它们处理从支付到结算的整个过程。

交易流程

1

获取报价

请求锁定汇率的报价
2

创建 Ramp

使用报价 ID 执行交易
3

支付/存款

用户完成支付
4

转换

KillB 处理货币兑换
5

结算

资金交付到目的地

关键概念

每个 ramp 都需要报价以锁定汇率
报价在 30 秒后过期,以防止汇率套利
通过状态更新监控 ramp 进度
通过 webhooks 获取实时更新

快速开始

// 1. 获取报价
const quote = await createQuotation({
  fromCurrency: 'COP',
  toCurrency: 'USDC',
  amount: 100000,
  amountIsToCurrency: false,
  cashInMethod: 'PSE',
  cashOutMethod: 'POLYGON'
});

// 2. 创建 ramp
const ramp = await createRamp({
  quotationId: quote.id,
  userId: 'user-id',
  accountId: 'wallet-id'
});

// 3. 用户通过提供的 URL 支付
window.location.href = ramp.paymentInfo[0].url;

下一步