Package org.knowm.xchange.gateio.service
Class GateioTradeServiceRaw
java.lang.Object
org.knowm.xchange.service.BaseExchangeService<GateioExchange>
org.knowm.xchange.gateio.service.GateioBaseService
org.knowm.xchange.gateio.service.GateioTradeServiceRaw
- All Implemented Interfaces:
BaseService
- Direct Known Subclasses:
GateioTradeService
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.knowm.xchange.gateio.service.GateioBaseService
apiKey, gateio, gateioAuthenticated, signatureCreator
Fields inherited from class org.knowm.xchange.service.BaseExchangeService
exchange
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
cancelAllOrders
(String type, CurrencyPair currencyPair) Cancels all orders.boolean
cancelOrder
(String orderId, CurrencyPair currencyPair) getGateioOrderStatus
(String orderId, CurrencyPair currencyPair) getGateioTradeHistory
(CurrencyPair currencyPair) placeGateioLimitOrder
(CurrencyPair currencyPair, GateioOrderType orderType, BigDecimal rate, BigDecimal amount) Submits a Limit Order to be executed on the Gateio Exchange for the desired market defined bycurrencyPair
.placeGateioLimitOrder
(LimitOrder limitOrder) Submits a Limit Order to be executed on the Gateio Exchange for the desired market defined byCurrencyPair
.Methods inherited from class org.knowm.xchange.gateio.service.GateioBaseService
getApiKey, handleResponse
Methods inherited from class org.knowm.xchange.service.BaseExchangeService
verifyOrder, verifyOrder, verifyOrder
-
Constructor Details
-
GateioTradeServiceRaw
Constructor- Parameters:
exchange
-
-
-
Method Details
-
placeGateioLimitOrder
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 pollgetGateioOpenOrders()
. However if the order is created and executed before it is caught in its open state from callinggetGateioOpenOrders()
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 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 pollgetGateioOpenOrders()
. However if the order is created and executed before it is caught in its open state from callinggetGateioOpenOrders()
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
-
cancelOrder
- Throws:
IOException
-
cancelAllOrders
Cancels all orders. See https://gate.io/api2.- Parameters:
type
- order type(0:sell,1:buy,-1:all)currencyPair
- currency pair- Returns:
- Throws:
IOException
-
getGateioOpenOrders
- Throws:
IOException
-
getGateioOrderStatus
public GateioOrderStatus getGateioOrderStatus(String orderId, CurrencyPair currencyPair) throws IOException - Throws:
IOException
-
getGateioTradeHistory
- Throws:
IOException
-