Skip to content
This repository was archived by the owner on Oct 30, 2023. It is now read-only.

Commit cb90b21

Browse files
committed
cleanUp Code
1 parent 7781ee0 commit cb90b21

1 file changed

Lines changed: 19 additions & 22 deletions

File tree

src/test/java/com/binance/api/examples/OrdersExampleAsync.java

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,30 @@
1616
*/
1717
public class OrdersExampleAsync {
1818

19-
public static void main(String[] args) {
20-
BinanceApiClientFactory factory = BinanceApiClientFactory.newInstance("YOUR_API_KEY", "YOUR_SECRET");
21-
BinanceApiAsyncRestClient client = factory.newAsyncRestClient();
19+
public static void main(String[] args) {
20+
BinanceApiClientFactory factory = BinanceApiClientFactory.newInstance("YOUR_API_KEY", "YOUR_SECRET");
21+
BinanceApiAsyncRestClient client = factory.newAsyncRestClient();
2222

23-
// Getting list of open orders
24-
client.getOpenOrders(new OrderRequest("LINKETH"), response -> System.out.println(response));
23+
// Getting list of open orders
24+
client.getOpenOrders(new OrderRequest("LINKETH"), System.out::println);
2525

26-
// Get status of a particular order
27-
client.getOrderStatus(new OrderStatusRequest("LINKETH", 745262L),
28-
response -> System.out.println(response));
26+
// Get status of a particular order
27+
client.getOrderStatus(new OrderStatusRequest("LINKETH", 745262L), System.out::println);
2928

30-
// Getting list of all orders with a limit of 10
31-
client.getAllOrders(new AllOrdersRequest("LINKETH").limit(10), response -> System.out.println(response));
29+
// Getting list of all orders with a limit of 10
30+
client.getAllOrders(new AllOrdersRequest("LINKETH").limit(10), System.out::println);
3231

33-
// Canceling an order
34-
client.cancelOrder(new CancelOrderRequest("LINKETH", 756703L),
35-
response -> System.out.println(response));
32+
// Canceling an order
33+
client.cancelOrder(new CancelOrderRequest("LINKETH", 756703L), System.out::println);
3634

37-
// Placing a test LIMIT order
38-
client.newOrderTest(limitBuy("LINKETH", TimeInForce.GTC, "1000", "0.0001"),
39-
response -> System.out.println("Test order has succeeded."));
35+
// Placing a test LIMIT order
36+
client.newOrderTest(limitBuy("LINKETH", TimeInForce.GTC, "1000", "0.0001"),
37+
response -> System.out.println("Test order has succeeded."));
4038

41-
// Placing a test MARKET order
42-
client.newOrderTest(marketBuy("LINKETH", "1000"), response -> System.out.println("Test order has succeeded."));
39+
// Placing a test MARKET order
40+
client.newOrderTest(marketBuy("LINKETH", "1000"), response -> System.out.println("Test order has succeeded."));
4341

44-
// Placing a real LIMIT order
45-
client.newOrder(limitBuy("LINKETH", TimeInForce.GTC, "1000", "0.0001"),
46-
response -> System.out.println(response));
47-
}
42+
// Placing a real LIMIT order
43+
client.newOrder(limitBuy("LINKETH", TimeInForce.GTC, "1000", "0.0001"), System.out::println);
44+
}
4845
}

0 commit comments

Comments
 (0)