> For the complete documentation index, see [llms.txt](https://docs-swft.swft.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-swft.swft.pro/zhong-xin-hua-dui-huan-api-jie-kou/chuang-jian-ding-dan.md).

# 创建订单

### **1. 接口调用：（限速规则：10次/2s）**

&#x20;`https://{host}/open/api/simpleExchange`

### **2. 请求参数**

| 字段名称   | 字段              | 数据类型   | 数据长度 | 必输项 | 备注                                                                                                 |
| ------ | --------------- | ------ | ---- | --- | -------------------------------------------------------------------------------------------------- |
| 存币币种   | depositCoinCode | String | 30   | Y   | eg：ETH                                                                                             |
| 接收币币种  | receiveCoinCode | String | 30   | Y   | eg：BTC                                                                                             |
| 存币数量   | depositCoinAmt  | String | 50   | Y   | eg：0.01                                                                                            |
| 项目方订单号 | developerId     | String | 50   | N   | 用于记录项目方的订单关联数据，项目方可用该字段来表示该订单归属于自己的某个用户或用于记录自己系统内的订单编号，或其他编号；在订单创建完成后，会回传该字段值（SWFT不支持通过该字段查询寻订单信息） |

### 3.请求参数示例

```yaml
{
	"channelId":"zml-test",
	"depositCoinAmt":"0.01",
	"depositCoinCode":"ETH",
	"developerId":"zml-11111",
	"receiveCoinCOde":"SWFTC",
	"sign":"1A87D09169495065A4DDDB794510C4C0B6AA7C39FACB62406BA5703FC207831F",
	"timestamp":1557661583167
}
```

### 4.Postman示例

![](/files/Gluf9ktteof55eVWpExM)

### 5.返回结果示例

```yaml
 {
    "data": {
        "changeType": "simple",
        "choiseFeeType": "4",
        "depositCoinAmt": "0.01",
        "depositCoinCode": "ETH",
        "depositCoinFeeAmt": "",
        "depositCoinFeeRate": "",
        "depositCoinState": "",
        "destinationAddr": "",
        "detailState": "wait_exchange_push",
        "orderId": "e61e20c9-7548-4c81-bdd2-35921510c1b2",
        "orderState": "wait_deposits",
        "platformAddr": "",
        "receiveCoinAmt": "647.854966",
        "receiveCoinCode": "SWFTC",
        "receiveSwftAmt": "0.63",
        "refundAddr": "",
        "refundCoinAmt": "",
        "refundCoinMinerFee": "",
        "refundSwftAmt": "",
        "swftCoinFeeRate": "0.001",
        "swftCoinState": "",
        "swftReceiveAddr": "",
        "developerId": "zml-11111",
        "swftRefundAddr": ""
    },
    "resCode": "800",
    "resMsg": "成功"
}
```

### 6.返回参数说明

| 字段名称     | 字段                 | 数据类型   | 数据长度 | bixu 项 | 备注                                                                                                                                                                                                                                                                                                                                  |
| -------- | ------------------ | ------ | ---- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 订单号      | orderId            | String | 30   | Y      | eg：d47e8b9b-c17f-432b-9285-a46c0a3ceb9a                                                                                                                                                                                                                                                                                             |
| 存币币种     | depositCoinCode    | String | 30   | Y      | eg：ETH                                                                                                                                                                                                                                                                                                                              |
| 接收币币种    | receiveCoinCode    | String | 30   | Y      | eg：BTC                                                                                                                                                                                                                                                                                                                              |
| 存币数量     | depositCoinAmt     | String | 50   | Y      | eg：1                                                                                                                                                                                                                                                                                                                                |
| 接收币数量    | receiveCoinAmt     | String | 50   | Y      | eg：0.1                                                                                                                                                                                                                                                                                                                              |
| 速币数量     | receiveSwftAmt     | String | 50   | Y      | eg：100                                                                                                                                                                                                                                                                                                                              |
| 存币的存放状态  | depositCoinState   | String | 30   | Y      | eg：wait\_send                                                                                                                                                                                                                                                                                                                       |
| 存币地址     | platformAddr       | String | 50   | Y      | eg：123123123-232-1231232                                                                                                                                                                                                                                                                                                            |
| 存币的手续费率  | depositCoinFeeRate | String | 30   | Y      | eg：0.001                                                                                                                                                                                                                                                                                                                            |
| 存币的手续费金额 | depositCoinFeeAmt  | String | 50   | Y      | eg：1                                                                                                                                                                                                                                                                                                                                |
| 速币的手续费率  | swftCoinFeeRate    | String | 30   | Y      | eg：0.0005                                                                                                                                                                                                                                                                                                                           |
| 订单状态     | orderState         | String | 30   | Y      | eg：wait\_deposits                                                                                                                                                                                                                                                                                                                   |
| 速币接收地址   | swftReceiveAddr    | String | 50   | Y      | eg：d47e8b9b-c17f-432b-9285-a46c0a3ceb9a                                                                                                                                                                                                                                                                                             |
| 速币存放状态   | swftCoinState      | String | 30   | Y      | eg：wait\_send                                                                                                                                                                                                                                                                                                                       |
| 退币时的矿工费  | refundCoinMinerFee | String | 50   | Y      | eg: 10                                                                                                                                                                                                                                                                                                                              |
| 退币金额     | refundCoinAmt      | String | 50   | Y      | eg: 0.98                                                                                                                                                                                                                                                                                                                            |
| 退速币金额    | refundSwftAmt      | String | 50   | Y      | eg: 10                                                                                                                                                                                                                                                                                                                              |
| 目标币接收地址  | destinationAddr    | String | 50   | Y      | eg: 18orDLFMp3fGoy5Uk93LDGTGbxWEm7b7FY                                                                                                                                                                                                                                                                                              |
| 退原币的地址   | refundAddr         | String | 50   | Y      | eg: 18orDLFMp3fGoy5Uk93LDGTGbxWEm7b7FY                                                                                                                                                                                                                                                                                              |
| 退手续费的地址  | swftRefundAddr     | String | 50   | Y      | eg: 18orDLFMp3fGoy5Uk93LDGTGbxWEm7b7FY                                                                                                                                                                                                                                                                                              |
| 手续费类型    | choiseFeeType      | String | 50   | Y      | 3-原币模式，4-速币模式                                                                                                                                                                                                                                                                                                                       |
| 详情状态     | detailState        | String | 30   | Y      | <p>(1)wait\_account\_deduct:等待从账户扣款； (2)timeout:超时；</p><p>(3)wait\_exchange\_push:等待交换信息推送； (4)wait\_exchange\_return:等待交换信息返回； (5.1)wait\_receive\_send:等待接收币种发送, wait\_receive\_confirm:等待接收币种确认, receive\_complete:接收币种确认完成. (5.2)wait\_refund\_send:等待退原币币种发送, wait\_refund\_confirm:等待退原币币种确认, refund\_complete:退原币币种确认完成；</p> |
| 兑换方式     | changeType         | String | 20   | Y      | simple：简单兑换、advanced：高级兑换                                                                                                                                                                                                                                                                                                           |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs-swft.swft.pro/zhong-xin-hua-dui-huan-api-jie-kou/chuang-jian-ding-dan.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
