JKorf / OKX.Net

A C# .netstandard client library for the OKX REST and Websocket Spot and Futures API focusing on clear usage and models
https://jkorf.github.io/OKX.Net/
MIT License
28 stars 15 forks source link

Error tdMode from PlaceOrderAsync #22

Closed dante1989 closed 8 months ago

dante1989 commented 8 months ago

Dim ItemStopOKX = Await clientFutureOKX.UnifiedApi.Trading.PlaceOrderAsync(symbol:="ETH-USD-SWAP", side:=OKXOrderSide.Buy, type:=OKXOrderType.MarketOrder, quantity:=5, tradeMode:=OKXMarginMode.Isolated, positionSide:=OKXPositionSide.Long)

i got error: ItemStopOKX.Error is Parameter tdMode error

When i check ItemStopOKX.RequestUrl

I got RequestUrl is: https://www.okx.com/api/v5/trade/order Screenshot 2024-01-11 120027

When i check ItemStopOKX.RequestBody

i got:

Screenshot 2024-01-11 120820 i have used OKXMarginMode.Isolated but body show tdMode is cash

Please check that error

dante1989 commented 8 months ago

Sorry, i mistaked, i need to use OKXTradeMode.Isolated, not OKXMarginMode.Isolated