Class GateioTradeServiceRaw

    • Constructor Detail

      • GateioTradeServiceRaw

        public GateioTradeServiceRaw​(Exchange exchange)
        Constructor
        Parameters:
        exchange -
    • Method Detail

      • placeGateioLimitOrder

        public String placeGateioLimitOrder​(LimitOrder limitOrder)
                                     throws IOException
        Submits a Limit Order to be executed on the Gateio Exchange for the desired market defined by CurrencyPair. WARNING - Gateio will return true regardless of whether or not an order actually gets created. The reason for this is that orders are simply submitted to a queue in their back-end. One example for why an order might not get created is because there are insufficient funds. The best attempt you can make to confirm that the order was created is to poll getGateioOpenOrders(). However if the order is created and executed before it is caught in its open state from calling getGateioOpenOrders() then the only way to confirm would be confirm the expected difference in funds available for your account.
        Parameters:
        limitOrder -
        Returns:
        String order id of submitted request.
        Throws:
        IOException
      • placeGateioLimitOrder

        public String placeGateioLimitOrder​(CurrencyPair currencyPair,
                                            GateioOrderType orderType,
                                            BigDecimal rate,
                                            BigDecimal amount)
                                     throws IOException
        Submits a Limit Order to be executed on the Gateio Exchange for the desired market defined by currencyPair. WARNING - Gateio will return true regardless of whether or not an order actually gets created. The reason for this is that orders are simply submitted to a queue in their back-end. One example for why an order might not get created is because there are insufficient funds. The best attempt you can make to confirm that the order was created is to poll getGateioOpenOrders(). However if the order is created and executed before it is caught in its open state from calling getGateioOpenOrders() then the only way to confirm would be confirm the expected difference in funds available for your account.
        Parameters:
        currencyPair -
        orderType -
        rate -
        amount -
        Returns:
        String order id of submitted request.
        Throws:
        IOException
      • cancelAllOrders

        public boolean cancelAllOrders​(String type,
                                       CurrencyPair currencyPair)
                                throws IOException
        Cancels all orders. See https://gate.io/api2.
        Parameters:
        type - order type(0:sell,1:buy,-1:all)
        currencyPair - currency pair
        Returns:
        Throws:
        IOException