> For the complete documentation index, see [llms.txt](https://docs.cn.omnibridge.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cn.omnibridge.pro/integration/create-order.md).

# 创建订单

**1. 接口调用：**

```
https://{host}/api/v2/accountExchange
```

**2. 请求参数示例**

<table><thead><tr><th width="160.3333740234375">参数</th><th width="105.0001220703125">是否必须</th><th>说明</th></tr></thead><tbody><tr><td>depositCoinCode</td><td>是</td><td>eg：ETH</td></tr><tr><td>receiveCoinCode</td><td>是</td><td>eg：BTC</td></tr><tr><td>depositCoinAmt</td><td>是</td><td>eg：0.01</td></tr><tr><td>receiveCoinAmt</td><td>是</td><td>期待接收数量</td></tr><tr><td>destinationAddr</td><td>是</td><td><p>eg: 18orDLFMp3fGoy5Uk93LDGTGbxWEm7b7FY </p><p>如有memo,请将memo放到地址后，用#分隔</p><p>例如：18orDLFMp3fGoy5Uk93LDGTGbxWEm7b7FY#1927632</p></td></tr><tr><td>refundAddr</td><td>是</td><td><p>eg：18orDLFMp3fGoy5Uk93LDGTGbxWEm7b7FY </p><p>如有memo,请将memo放到地址后，用#分隔</p><p>例如：18orDLFMp3fGoy5Uk93LDGTGbxWEm7b7FY#1927632</p></td></tr><tr><td>equipmentNo</td><td>是</td><td>设备唯一编号（序列号），如果无法获取到，可以填写退币地址。该字段在查询订单状态和查询订单记录接口中会用到，需要对应当前下单的查询</td></tr><tr><td>sourceType</td><td>是</td><td>只能填写ANDROID或IOS或H5，请根据自己应用填写，该字段在查询订单状态和查询订单记录接口中会用到</td></tr><tr><td>sourceFlag</td><td>是</td><td>用于标识是哪个平台创建的订单，请联系我们沟通</td></tr><tr><td>slippage</td><td>否</td><td>滑点 输入小数 (系统默认0.05)<br>0.01 = 1%</td></tr><tr><td>fixedRate</td><td>否</td><td>使用固定汇率下单(下单后接收数量不会改变)(Y/N)</td></tr></tbody></table>

**3.请求参数示例**

```ada
{
    "depositCoinCode": "ETHF",
    "receiveCoinCode": "USDT(BSC)",
    "depositCoinAmt": "42.207403",
    "receiveCoinAmt": "46.367529",
    "destinationAddr": "0x19b9918f...f85ad08ba0",
    "refundAddr": "0x19b9918f...f85ad08ba0",
    "equipmentNo":"zfgryh918f93a19fdg6918a68cf5",
    "sourceType": "H5",
    "sourceFlag":"widget",
    "slippage": "0.02",
    "fixedRate": "N"
}
```

**4.返回结果示例**

```
{
    "data": {
        "chainFee": "0.001",//兑换完成后发币旷工费
        "createTime": "2022-03-10 18:44:21",
        "dealFinishTime": null,
        "depositCoinAmt": "2",
        "depositCoinCode": "ETH",
        "depositCoinFeeAmt": "0.004",//兑换手续费
        "depositCoinFeeRate": "0.002",//兑换手续费率
        "depositCoinState": "wait_send",
        "depositFeeRate": "0.002",
        "depositTxid": "",
        "destinationAddr": "0xAE93FA34f728855cE663cf9FcF8e32148F079071",//用户接收币种地址
        "detailState": "wait_deposit_send",//订单状态（详见高级兑换接口）
        "instantRate": "6.856554564172",//汇率
        "kycUrl": "",//超过当日限额的kyc路径（详见高级兑换接口）
        "orderId": "f94e631b-d99b-4dd5-98f7-09bf99d16d94",//订单号
        "orderState": "wait_deposits",
        "platformAddr": "0x3181af4f7cc7251a6a4eda75526c8abe10106db8",//存币地址（用户创建订单后需向此地址转币，转币币种depositCoinCode，转币数量depositCoinAmt）
        "receiveCoinAmt": "13.713109",
        "receiveCoinCode": "BNB(BSC)",
        "refundAddr": "0xAE93FA34f728855cE663cf9FcF8e32148F079071",//退币地址（兑换失败退回存币币种到此地址）
        "refundCoinAmt": "",//兑换失败时的退币数量
        "refundDepositTxid": "",//兑换失败时的退币哈希
        "transactionId": "",//发币哈希
    },
    "resCode": "800",
    "resMsg": "成功",
    "resMsgEn": ""
}
```

**5.返回参数说明**

<table><thead><tr><th width="112">字段名称</th><th width="176.6666259765625">字段</th><th>备注</th></tr></thead><tbody><tr><td>订单号</td><td>orderId</td><td>eg：d47e8b9b-c17f-432b-9285-a46c0a3ceb9a</td></tr><tr><td>存币币种</td><td>depositCoinCode</td><td>eg：ETH</td></tr><tr><td>接收币币种</td><td>receiveCoinCode</td><td>eg：BTC</td></tr><tr><td>存币数量</td><td>depositCoinAmt</td><td>eg：1</td></tr><tr><td>接收币数量</td><td>receiveCoinAmt</td><td>eg：0.1</td></tr><tr><td>存币地址</td><td>platformAddr</td><td>eg：123123123-232-1231232</td></tr><tr><td>目标币接收地址</td><td>destinationAddr</td><td><p>eg: 18orDLFMp3fGoy5Uk93LDGTGbxWEm7b7FY</p><p>如有memo,请将memo放到地址后，用#分隔</p><p>例如：18orDLFMp3fGoy5Uk93LDGTGbxWEm7b7FY#1927632</p></td></tr><tr><td>退原币的地址</td><td>refundAddr</td><td><p>eg: 18orDLFMp3fGoy5Uk93LDGTGbxWEm7b7FY </p><p>如有memo,请将memo放到地址后，用#分隔</p><p>例如：18orDLFMp3fGoy5Uk93LDGTGbxWEm7b7FY#1927632</p></td></tr><tr><td>存币的手续费率</td><td>depositCoinFeeRate</td><td>eg：手续费率</td></tr><tr><td>存币的手续费金额</td><td>depositCoinFeeAmt</td><td>eg：手续费收取的原币的数量</td></tr><tr><td>退币金额</td><td>refundCoinAmt</td><td>eg: 0.98</td></tr><tr><td>兑换成功交易id</td><td>transactionId</td><td>链上交易id，在兑换完成并已发币之后，该字段才会有值</td></tr><tr><td>兑换失败交易id</td><td>refundDepositTxid</td><td>链上交易id，在兑换失败退币情况下，已退币之后，该字段才会有值</td></tr><tr><td>订单状态</td><td>detailState</td><td><p>(1)wait_deposit_send:等待存币发送 </p><p>(2)timeout:超时</p><p>(3)wait_exchange_push:等待交换信息推送(4)wait_exchange_return:等待交换信息返回</p><p>(5.1)</p><p>wait_receive_send:等待接收币种发送</p><p>wait_receive_confirm:等待接收币种确认</p><p>receive_complete:接收币种确认完成</p><p>(5.2)</p><p>wait_refund_send:等待退原币币种发送wait_refund_confirm:等待退原币币种确认</p><p>refund_complete:退原币币种确认完成</p><p>(6)ERROR/error:正在处理的订单 </p><p>(7)WAIT_KYC: 等待进行KYC或联系客服提供链接</p></td></tr><tr><td>kyc的路径</td><td>kycUrl</td><td>当返回码是311时,需要跳转到该链接。<br>{host}<a href="https://swap.swftcoin.com/swft-v3/swft-v3-m/kyc/kyc.html?lang=cn&#x26;equipmentNo=pls_input_your_real_equipmentno_ok">/swft-v3/swft-v3-m/kyc/kyc.html?lang=cn&#x26;equipmentNo=pls_input_your_real_equipmentno_ok<br></a>请更新equipmentNo的值用户的设备号（公共请求参数），lang取值：cn、en</td></tr></tbody></table>

**6.Postman示例**

![](/files/oDPbkEQXXcExykMUcBTP)


---

# 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.cn.omnibridge.pro/integration/create-order.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.
