-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add QuoteContext.queryWarrantList for java
- Loading branch information
Showing
17 changed files
with
458 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
java/javasrc/src/main/java/com/longport/quote/FilterWarrantExpiryDate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.longport.quote; | ||
|
||
public enum FilterWarrantExpiryDate { | ||
LT_3, | ||
Between_3_6, | ||
Between_6_12, | ||
GT_12, | ||
} |
6 changes: 6 additions & 0 deletions
6
java/javasrc/src/main/java/com/longport/quote/FilterWarrantInOutBoundsType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.longport.quote; | ||
|
||
public enum FilterWarrantInOutBoundsType { | ||
In, | ||
Out, | ||
} |
45 changes: 45 additions & 0 deletions
45
java/javasrc/src/main/java/com/longport/quote/QueryWarrantOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package com.longport.quote; | ||
|
||
@SuppressWarnings("unused") | ||
public class QueryWarrantOptions { | ||
private String symbol; | ||
private WarrantSortBy sortBy; | ||
private SortOrderType sortType; | ||
private WarrantType[] warrantType; | ||
private int[] issuer; | ||
private FilterWarrantExpiryDate[] expiryDate; | ||
private FilterWarrantInOutBoundsType[] priceType; | ||
private WarrantStatus[] status; | ||
|
||
public QueryWarrantOptions(String symbol, WarrantSortBy sortBy, SortOrderType sortType) { | ||
this.symbol = symbol; | ||
this.sortBy = sortBy; | ||
this.sortType = sortType; | ||
} | ||
|
||
public QueryWarrantOptions setWarrantType(WarrantType[] warrantType) { | ||
this.warrantType = warrantType; | ||
return this; | ||
} | ||
|
||
public QueryWarrantOptions setIssuer(int[] issuer) { | ||
this.issuer = issuer; | ||
return this; | ||
} | ||
|
||
public QueryWarrantOptions setExpiryDate(FilterWarrantExpiryDate[] expiryDate) { | ||
this.expiryDate = expiryDate; | ||
return this; | ||
} | ||
|
||
public QueryWarrantOptions setPriceType(FilterWarrantInOutBoundsType[] priceType) { | ||
this.priceType = priceType; | ||
return this; | ||
} | ||
|
||
public QueryWarrantOptions setStatus(WarrantStatus[] status) { | ||
this.status = status; | ||
return this; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
java/javasrc/src/main/java/com/longport/quote/SortOrderType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.longport.quote; | ||
|
||
public enum SortOrderType { | ||
Ascending, | ||
Descending, | ||
} |
146 changes: 146 additions & 0 deletions
146
java/javasrc/src/main/java/com/longport/quote/WarrantInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
package com.longport.quote; | ||
|
||
import java.math.BigDecimal; | ||
import java.time.LocalDate; | ||
|
||
public class WarrantInfo { | ||
private String symbol; | ||
private WarrantType warrantType; | ||
private String name; | ||
private BigDecimal lastDone; | ||
private BigDecimal changeRate; | ||
private BigDecimal changeValue; | ||
private long volume; | ||
private BigDecimal turnover; | ||
private LocalDate expiryDate; | ||
private BigDecimal strikePrice; | ||
private BigDecimal upperStrikePrice; | ||
private BigDecimal lowerStrikePrice; | ||
private long outstandingQty; | ||
private BigDecimal outstandingRatio; | ||
private BigDecimal premium; | ||
private BigDecimal itmOtm; | ||
private BigDecimal impliedVolatility; | ||
private BigDecimal delta; | ||
private BigDecimal callPrice; | ||
private BigDecimal toCallPrice; | ||
private BigDecimal effectiveLeverage; | ||
private BigDecimal leverageRatio; | ||
private BigDecimal conversionRatio; | ||
private BigDecimal balancePoint; | ||
private WarrantStatus status; | ||
|
||
public String getSymbol() { | ||
return symbol; | ||
} | ||
|
||
public WarrantType getWarrantType() { | ||
return warrantType; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public BigDecimal getLastDone() { | ||
return lastDone; | ||
} | ||
|
||
public BigDecimal getChangeRate() { | ||
return changeRate; | ||
} | ||
|
||
public BigDecimal getChangeValue() { | ||
return changeValue; | ||
} | ||
|
||
public long getVolume() { | ||
return volume; | ||
} | ||
|
||
public BigDecimal getTurnover() { | ||
return turnover; | ||
} | ||
|
||
public LocalDate getExpiryDate() { | ||
return expiryDate; | ||
} | ||
|
||
public BigDecimal getStrikePrice() { | ||
return strikePrice; | ||
} | ||
|
||
public BigDecimal getUpperStrikePrice() { | ||
return upperStrikePrice; | ||
} | ||
|
||
public BigDecimal getLowerStrikePrice() { | ||
return lowerStrikePrice; | ||
} | ||
|
||
public long getOutstandingQty() { | ||
return outstandingQty; | ||
} | ||
|
||
public BigDecimal getOutstandingRatio() { | ||
return outstandingRatio; | ||
} | ||
|
||
public BigDecimal getPremium() { | ||
return premium; | ||
} | ||
|
||
public BigDecimal getItmOtm() { | ||
return itmOtm; | ||
} | ||
|
||
public BigDecimal getImpliedVolatility() { | ||
return impliedVolatility; | ||
} | ||
|
||
public BigDecimal getDelta() { | ||
return delta; | ||
} | ||
|
||
public BigDecimal getCallPrice() { | ||
return callPrice; | ||
} | ||
|
||
public BigDecimal getToCallPrice() { | ||
return toCallPrice; | ||
} | ||
|
||
public BigDecimal getEffectiveLeverage() { | ||
return effectiveLeverage; | ||
} | ||
|
||
public BigDecimal getLeverageRatio() { | ||
return leverageRatio; | ||
} | ||
|
||
public BigDecimal getConversionRatio() { | ||
return conversionRatio; | ||
} | ||
|
||
public BigDecimal getBalancePoint() { | ||
return balancePoint; | ||
} | ||
|
||
public WarrantStatus getStatus() { | ||
return status; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "WarrantInfo [symbol=" + symbol + ", warrantType=" + warrantType + ", name=" + name + ", lastDone=" | ||
+ lastDone + ", changeRate=" + changeRate + ", changeValue=" + changeValue + ", volume=" + volume | ||
+ ", turnover=" + turnover + ", expiryDate=" + expiryDate + ", strikePrice=" + strikePrice | ||
+ ", upperStrikePrice=" + upperStrikePrice + ", lowerStrikePrice=" + lowerStrikePrice | ||
+ ", outstandingQty=" + outstandingQty + ", outstandingRatio=" + outstandingRatio + ", premium=" | ||
+ premium + ", itmOtm=" + itmOtm + ", impliedVolatility=" + impliedVolatility + ", delta=" + delta | ||
+ ", callPrice=" + callPrice + ", toCallPrice=" + toCallPrice + ", effectiveLeverage=" | ||
+ effectiveLeverage + ", leverageRatio=" + leverageRatio + ", conversionRatio=" + conversionRatio | ||
+ ", balancePoint=" + balancePoint + ", status=" + status + "]"; | ||
} | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
java/javasrc/src/main/java/com/longport/quote/WarrantSortBy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.longport.quote; | ||
|
||
public enum WarrantSortBy { | ||
LastDone, | ||
ChangeRate, | ||
ChangeValue, | ||
Volume, | ||
Turnover, | ||
ExpiryDate, | ||
StrikePrice, | ||
UpperStrikePrice, | ||
LowerStrikePrice, | ||
OutstandingQuantity, | ||
OutstandingRatio, | ||
Premium, | ||
ItmOtm, | ||
ImpliedVolatility, | ||
Delta, | ||
CallPrice, | ||
ToCallPrice, | ||
EffectiveLeverage, | ||
LeverageRatio, | ||
ConversionRatio, | ||
BalancePoint, | ||
Status, | ||
} |
7 changes: 7 additions & 0 deletions
7
java/javasrc/src/main/java/com/longport/quote/WarrantStatus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.longport.quote; | ||
|
||
public enum WarrantStatus { | ||
Suspend, | ||
PrepareList, | ||
Normal, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.