Package org.knowm.xchange.gateio.service
Class GateioTradeService
java.lang.Object
org.knowm.xchange.service.BaseExchangeService<GateioExchange>
org.knowm.xchange.gateio.service.GateioBaseService
org.knowm.xchange.gateio.service.GateioTradeServiceRaw
org.knowm.xchange.gateio.service.GateioTradeService
- All Implemented Interfaces:
BaseService,TradeService
-
Nested Class Summary
Nested classes/interfaces inherited from class org.knowm.xchange.gateio.service.GateioTradeServiceRaw
GateioTradeServiceRaw.GateioCancelOrderParams -
Field Summary
Fields inherited from class org.knowm.xchange.gateio.service.GateioBaseService
apiKey, gateio, gateioAuthenticated, signatureCreatorFields inherited from class org.knowm.xchange.service.BaseExchangeService
exchange -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancancelOrder(String orderId) booleancancelOrder(CancelOrderParams orderParams) getOpenOrders(OpenOrdersParams params) getOrder(OrderQueryParams... orderQueryParams) Class[]getTradeHistory(TradeHistoryParams params) Required parameter:TradeHistoryParamCurrencyPairplaceLimitOrder(LimitOrder limitOrder) Submits a Limit Order to be executed on the Gateio Exchange for the desired market defined byCurrencyPair.placeMarketOrder(MarketOrder marketOrder) Methods inherited from class org.knowm.xchange.gateio.service.GateioTradeServiceRaw
cancelAllOrders, cancelOrder, getGateioOpenOrders, getGateioOrderStatus, getGateioTradeHistory, placeGateioLimitOrder, placeGateioLimitOrderMethods inherited from class org.knowm.xchange.gateio.service.GateioBaseService
getApiKey, handleResponseMethods inherited from class org.knowm.xchange.service.BaseExchangeService
verifyOrder, verifyOrder, verifyOrderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.knowm.xchange.service.trade.TradeService
cancelAllOrders, changeOrder, getOpenPositions, getOrder, getRequiredOrderQueryParamClass, placeStopOrder, verifyOrder, verifyOrder
-
Constructor Details
-
GateioTradeService
Constructor- Parameters:
exchange-
-
-
Method Details
-
getOpenOrders
- Specified by:
getOpenOrdersin interfaceTradeService- Throws:
IOException
-
getOpenOrders
- Specified by:
getOpenOrdersin interfaceTradeService- Throws:
IOException
-
placeMarketOrder
- Specified by:
placeMarketOrderin interfaceTradeService- Throws:
IOException
-
placeLimitOrder
Submits a Limit Order to be executed on the Gateio Exchange for the desired market defined byCurrencyPair. 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 pollgetOpenOrders(). However, if the order is created and executed before it is caught in its open state from callinggetOpenOrders()then the only way to confirm would be confirm the expected difference in funds available for your account.- Specified by:
placeLimitOrderin interfaceTradeService- Returns:
- String "true"/"false" Used to determine if the order request was submitted successfully.
- Throws:
IOException
-
cancelOrder
- Specified by:
cancelOrderin interfaceTradeService- Throws:
IOException
-
getRequiredCancelOrderParamClasses
- Specified by:
getRequiredCancelOrderParamClassesin interfaceTradeService
-
cancelOrder
- Specified by:
cancelOrderin interfaceTradeService- Throws:
IOException
-
getTradeHistory
Required parameter:TradeHistoryParamCurrencyPair- Specified by:
getTradeHistoryin interfaceTradeService- Throws:
ExchangeExceptionIOException
-
getOrder
- Specified by:
getOrderin interfaceTradeService- Throws:
IOException
-
createTradeHistoryParams
- Specified by:
createTradeHistoryParamsin interfaceTradeService
-
createOpenOrdersParams
- Specified by:
createOpenOrdersParamsin interfaceTradeService
-