Skip to content

Commit 1c47dfb

Browse files
committed
fix: time in force day
1 parent e5f3fb2 commit 1c47dfb

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.cryptomarket.params;
22

3+
import com.squareup.moshi.Json;
4+
35
/** Time in force */
46
public enum TimeInForce {
57
/** good till canceled */
@@ -9,12 +11,8 @@ public enum TimeInForce {
911
/** fill or kill */
1012
FOK,
1113
/** day */
12-
DAY {
13-
@Override
14-
public String toString() {
15-
return "Day";
16-
}
17-
},
14+
@Json(name="Day")
15+
DAY,
1816
/** good till date */
1917
GTD,
2018
}

src/test/java/com/cryptomarket/sdk/TestRestClientSpotTrading.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ public void testOrderFlow() throws CryptomarketSDKException {
6565
.symbol("EOSETH")
6666
.side(Side.SELL)
6767
.quantity("0.01")
68+
.timeInForce(TimeInForce.DAY)
6869
.orderType(OrderType.LIMIT)
6970
.price("1000"));
7071
Checker.checkOrder.accept(order);
@@ -105,4 +106,4 @@ public void testCreateOrderList() throws CryptomarketSDKException {
105106
null);
106107
orders.forEach(Checker.checkOrder);
107108
}
108-
}
109+
}

0 commit comments

Comments
 (0)