一、Wire Transfer(银行汇款)
说明:Wire Transfer 到账后,系统不会自动将法币兑换为稳定币,需调用 orderByFiat 接口主动购买。
完整流程:
| 步骤 | Legend 状态 | 系统动作 |
|---|---|---|
| 1 | WIRE_RECEIVED(pending) | 仅记录 |
| 2 | WIRE_RECEIVED(settled) | 用户通过交易所调用 orderByFiat 购买稳定币 → 状态更新为 processing |
| 3 | trade-execute(succeeded) | 状态更新为 completed |
| 4 | CRYPTO_SENT(settled) | 记录 tx_hash,确认完成 |
二、Credit Card(信用卡入金)
说明:Credit Card 充值成功后,Legend 会自动完成法币兑换并打币。
完整流程:
| 步骤 | Legend 状态 | 系统动作 |
|---|---|---|
| 1 | SDK 调用 orderByFiat | — |
| 2 | trade-execute(succeeded) | 状态更新为 completed |
| 3 | CREDIT_CARD_RECEIVED(settled) | 状态为 processing(因已完成,跳过) |
| 4 | CRYPTO_SENT(settled) | 记录 tx_hash,确认完成 |
三、通用规则
| 状态 | 动作 |
|---|---|
pending / in progress | 仅记录 |
CRYPTO_SENT(settled) | 记录 tx_hash,标记完成 |
四、接口说明
orderByFiat(仅 Wire Transfer 需要主动调用)
orderByFiat(仅 Wire Transfer 需要主动调用)- 触发条件:
WIRE_RECEIVED=settled - 用途:将到账法币兑换为稳定币
- 参考文档:
https://ex.legendtrading.com/v0.9-zh/reference/apporderbyfiat-1
