View Javadoc
1   package org.oxerr.peatio.rest.service.polling;
2   
3   import java.io.IOException;
4   import java.math.BigDecimal;
5   
6   import org.oxerr.peatio.rest.PeatioException;
7   import org.oxerr.peatio.rest.dto.Order;
8   import org.oxerr.peatio.rest.dto.Trade;
9   
10  import com.xeiam.xchange.Exchange;
11  
12  /**
13   * Trade raw service.
14   */
15  public class PeatioTradeServiceRaw extends PeatioBasePrivatePollingService {
16  
17  	protected PeatioTradeServiceRaw(Exchange exchange) {
18  		super(exchange);
19  	}
20  
21  	public Order[] getOrders(String market, String state, Integer limit,
22  			Integer page, String orderBy) throws PeatioException, IOException {
23  		return peatio.getOrders(accessKey, tonce, signature, market, state,
24  				limit, page, orderBy);
25  	}
26  
27  	public Order placeOrder(String market, String side, BigDecimal volume,
28  			BigDecimal price, String ordType) throws PeatioException,
29  			IOException {
30  		return peatio.placeOrder(accessKey, tonce, signature, market, side, volume,
31  				price, ordType);
32  	}
33  
34  	public Order[] clearOrders() throws PeatioException, IOException {
35  		return peatio.clear(accessKey, tonce, signature);
36  	}
37  
38  	public Order getOrder(long id) throws PeatioException, IOException {
39  		return peatio.getOrder(accessKey, tonce, signature, id);
40  	}
41  
42  	public Order deleteOrder(long id) throws PeatioException, IOException {
43  		return peatio.deleteOrder(accessKey, tonce, signature, id);
44  	}
45  
46  	public Trade[] getMyTrades(String market, Integer limit, Long timestamp,
47  			Long from, Long to, String orderBy) throws PeatioException,
48  			IOException {
49  		return peatio.getMyTrades(accessKey, tonce, signature, market, limit,
50  				timestamp, from, to, orderBy);
51  	}
52  
53  }