> ## Documentation Index
> Fetch the complete documentation index at: https://docs.killb.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Ramps 概览

> 了解 on-ramps 和 off-ramps

## 什么是 Ramps？

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

<CardGroup cols={2}>
  <Card title="On-Ramps" icon="arrow-up" href="/zh/guides/ramps/on-ramp">
    **法币 → 加密货币**

    将 COP/MXN/USD 转换为 USDC/USDT
  </Card>

  <Card title="Off-Ramps" icon="arrow-down" href="/zh/guides/ramps/off-ramp">
    **加密货币 → 法币**

    将 USDC/USDT 转换为 COP/MXN/USD
  </Card>
</CardGroup>

## 交易流程

<Steps>
  <Step title="获取报价">
    请求锁定汇率的报价
  </Step>

  <Step title="创建 Ramp">
    使用报价 ID 执行交易
  </Step>

  <Step title="支付/存款">
    用户完成支付
  </Step>

  <Step title="转换">
    KillB 处理货币兑换
  </Step>

  <Step title="结算">
    资金交付到目的地
  </Step>
</Steps>

## 关键概念

<AccordionGroup>
  <Accordion title="需要报价" icon="calculator">
    每个 ramp 都需要报价以锁定汇率
  </Accordion>

  <Accordion title="30 秒过期" icon="clock">
    报价在 30 秒后过期，以防止汇率套利
  </Accordion>

  <Accordion title="状态跟踪" icon="list-check">
    通过状态更新监控 ramp 进度
  </Accordion>

  <Accordion title="Webhook 通知" icon="bell">
    通过 webhooks 获取实时更新
  </Accordion>
</AccordionGroup>

## 快速开始

```javascript theme={null}
// 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;
```

## 下一步

<CardGroup cols={2}>
  <Card title="On-Ramp 指南" icon="arrow-up" href="/zh/guides/ramps/on-ramp">
    实现法币到加密货币的转换
  </Card>

  <Card title="Off-Ramp 指南" icon="arrow-down" href="/zh/guides/ramps/off-ramp">
    实现加密货币到法币的转换
  </Card>

  <Card title="状态跟踪" icon="chart-line" href="/zh/guides/ramps/ramp-status">
    监控 ramp 进度
  </Card>

  <Card title="API 参考" icon="code" href="/api-reference/endpoint/ramps-create">
    完整的 Ramps API 文档
  </Card>
</CardGroup>
