.net OKEX,API v5,掉期合约,下单错误:参数posSide错误

wkyowqbh  于 2023-06-25  发布在  .NET
关注(0)|答案(1)|浏览(161)

我正在尝试使用Okex.net创建一个永久限价订单。API在现货交易所成功下单(限价和市价),但在永久交易所没有。
API文档:https://www.okex.com/docs-v5/en/#rest-api-trade-place-order
以下是我正在尝试的:

OkexClient api = new OkexClient();
api.SetApiCredentials("***", "***", "***");
var trade_01 = api.PlaceOrder("XLM-USDT-SWAP", OkexTradeMode.Cross, OkexOrderSide.Buy, OkexPositionSide.Long, OkexOrderType.MarketOrder, 300m);

错误消息:

{
      "code": "1",
      "data": [
        {
          "clOrdId": "",
          "ordId": "",
          "sCode": "51000",
          "sMsg": "Parameter posSide  error ",
          "tag": ""
        }
      ],
      "msg": ""
}
pvabu6sv

pvabu6sv1#

我没有使用OkexClient,但这个身体为我工作。如果你像这样派医护人员去也许会有用。

{
  "instId" : "someSymbol-SWAP",
  "tdMode" : "isolated or cross",
  "clOrdId" : "someClientOrderId",
  "side" : "buy or sell",
  "ordType" : "limit or market",
  "sz" : "contract size like 1 or 2 etc..",
  "px": "somePrice"
}

相关问题