跳到正文
注册

交易

下单

以你的价格或市价买卖任意品种。毫秒级返回响应,并附上订单状态。

POST/api/v1/orders获取密钥
curl --request POST \
  --url "https://reirex.com/api/v1/orders" \
  --header "GX-API-KEY: $GX_API_KEY" \
  --header "GX-API-TIMESTAMP: $TIMESTAMP" \
  --header "GX-API-SIGN: $SIGNATURE" \
  --header "Content-Type: application/json" \
  --data '{"pair":"BTC-EUR","side":"buy","type":"limit","amount":"0.05","price":"70000","clientOrderId":"my-order-0001"}'

201 Createdapplication/json

{
  "orderId": "01JA8K3Q7W2N5X4Y6Z8B0C1D2E",
  "clientOrderId": "my-order-0001",
  "pair": "BTC-EUR",
  "side": "buy",
  "type": "limit",
  "price": "70000.00",
  "amount": "0.05000000",
  "filled": "0.00000000",
  "averagePrice": null,
  "status": "open",
  "timeInForce": "gtc",
  "fee": "0.00",
  "feeCurrency": "EUR",
  "createdAt": "2026-10-14T16:14:15.412Z",
  "updatedAt": "2026-10-14T16:14:15.412Z"
}

限价单会挂在订单簿中,直到成交、被你撤销或有效期届满。市价单立即以订单簿中的最优价格成交。每笔订单金额至少 10 欧元。

timeInForce订单
gtc挂单直至成交或被你撤销
ioc立即成交能成交的部分,其余撤销
fok立即全部成交,否则全部撤销

吃单手续费为 0.10%,挂单手续费为 0.08%,并随账户等级提升而降低。postOnly 订单从不吃单,因此始终按挂单费率付费。

请求体application/json

  • pairstring必填

    品种和你用来支付的货币,例如 BTC-EUR。

  • sidestring必填

    buy 或 sell。

    可选值buysell

  • typestring必填

    limit 按你的价格挂单,market 立即成交。

    可选值limitmarket

  • amountstring必填

    品种数量,以十进制字符串表示。

  • pricestring

    你的价格,以十进制字符串表示。limit 订单必填,market 订单不填。

  • timeInForcestring默认值:gtc

    订单在订单簿中保留多久;见上表。

    可选值gtciocfok

  • postOnlyboolean默认值:false

    若为 true,订单宁可撤销也不会吃单。

  • clientOrderIdstring

    你自定义的 id,最多 36 个字符。用相同的 id 重试,订单绝不会重复下单。

响应

  • orderIdstring

    我们为订单分配的 id。

  • clientOrderIdstring | null

    你为订单设置的 id(如有)。

  • pairstring

    订单交易的交易对。

  • sidestring

    buy 或 sell。

  • typestring

    limit 或 market。

  • pricestring | null

    限价;市价单为 null。

  • amountstring

    下单数量。

  • filledstring

    目前已成交的数量。

  • averagePricestring | null

    已成交部分的均价;首次成交前为 null。

  • statusstring

    open、partially_filled、filled、cancelled 或 rejected。

  • timeInForcestring

    gtc、ioc 或 fok。

  • feestring

    目前已支付的手续费。

  • feeCurrencystring

    支付手续费所用的货币。

  • createdAtstring

    下单时间。

  • updatedAtstring

    最近一次变化的时间。