Skip to content

Commit 25f1b35

Browse files
authored
Merge pull request #45 from angel-one/UniqueID
UniqueorderID
2 parents 4dfc4af + fe77014 commit 25f1b35

4 files changed

Lines changed: 6 additions & 2 deletions

File tree

dist/smartapi-java-2.2.6.jar

34.6 MB
Binary file not shown.

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.angelbroking.smartapi</groupId>
77
<artifactId>smartapi-java</artifactId>
8-
<version>2.2.5</version>
8+
<version>2.2.6</version>
99
<packaging>jar</packaging>
1010

1111
<name>smartapi-java</name>

src/main/java/com/angelbroking/smartapi/SmartConnect.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ public Order placeOrder(OrderParams orderParams, String variety) {
309309
JSONObject jsonObject = smartAPIRequestHandler.postRequest(this.apiKey, url, params, accessToken);
310310
Order order = new Order();
311311
order.orderId = jsonObject.getJSONObject("data").getString("orderid");
312+
order.uniqueOrderId = jsonObject.getJSONObject("data").getString("uniqueorderid");
312313
log.info("order : {}",order);
313314
return order;
314315
} catch (Exception | SmartAPIException e) {

src/main/java/com/angelbroking/smartapi/models/Order.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ public class Order {
109109
@SerializedName("filltime")
110110
public String fillTime;
111111

112+
@SerializedName("uniqueorderid")
113+
public String uniqueOrderId;
114+
112115
@Override
113116
public String toString() {
114117
return "Order [disclosedQuantity=" + disclosedQuantity + ", duration=" + duration + ", tradingSymbol="
@@ -122,7 +125,7 @@ public String toString() {
122125
+ instrumentType + ", strikePrice=" + strikePrice + ", optionType=" + optionType + ", expiryDate="
123126
+ expiryDate + ", lotSize=" + lotSize + ", cancelSize=" + cancelSize + ", filledShares=" + filledShares
124127
+ ", orderStatus=" + orderStatus + ", unfilledShares=" + unfilledShares + ", fillId=" + fillId
125-
+ ", fillTime=" + fillTime + "]";
128+
+ ", fillTime=" + fillTime + ", uniqueorderid=" + uniqueOrderId + "]";
126129
}
127130

128131
}

0 commit comments

Comments
 (0)