knowm / XChange

XChange is a Java library providing a streamlined API for interacting with 60+ Bitcoin and Altcoin exchanges providing a consistent interface for trading and accessing market data.

Home Page:http://knowm.org/open-source/xchange/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

need advice to OKX future placeOrder

rizer1980 opened this issue · comments

@makarid
Hello
I want to ask for advice.
For now placing an order on OKX Futures does not work, since "posSide" should not contain "null", but "long" or "short".
Your comment from there OkexAdapters.java

        .posSide(null) // PosSide should come as a input from an extended LimitOrder class to
        // support Futures/Swap capabilities of Okex, till then it should be null to
        // perform "net" orders

Can you explain/suggest about the extended LimitOrder class?
It only occurs to me to implement this through somethinbg like order.hasFlag(OkexOrderFlags.LONG ))

Thanks!