Package com.qtsurfer.api.client.model
Class LivePaperInstrument
java.lang.Object
com.qtsurfer.api.client.model.LivePaperInstrument
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.24.0")
public class LivePaperInstrument
extends Object
One instrument's part of a shared paper account.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncontributionPct(Double contributionPct) booleanReturn true if this LivePaperInstrument object is equal to o.`realisedPnl` as a percent of the account's `initialFunding` (0-100 scale), so the contributions of the instruments add up to the account's realised return.Get instrumentgetKpi()The KPIs of this instrument's closed trades alone, with the account's `initialFunding` as the capital (so `pnlTotalPercent` equals `contributionPct`).The other closed trades; a trade with a PnL of exactly zero is a loss.Get openPositionSum of the PnL of its closed trades, in the account's currency.`realisedPnl` plus `unrealisedPnl`.Its closed trades.What its open position is worth over its cost as of the last mark; `0` when it holds nothing.getWins()Closed trades with a PnL above zero.inthashCode()instrument(String instrument) kpi(LivePaperKpi kpi) openPosition(LivePaperInstrumentOpenPosition openPosition) realisedPnl(Double realisedPnl) voidsetContributionPct(Double contributionPct) voidsetInstrument(String instrument) voidsetKpi(LivePaperKpi kpi) voidvoidsetOpenPosition(LivePaperInstrumentOpenPosition openPosition) voidsetRealisedPnl(Double realisedPnl) voidsetTotalPnl(Double totalPnl) voidvoidsetUnrealisedPnl(Double unrealisedPnl) voidtoString()Convert the instance into URL query string.toUrlQueryString(String prefix) Convert the instance into URL query string.unrealisedPnl(Double unrealisedPnl)
-
Field Details
-
JSON_PROPERTY_INSTRUMENT
- See Also:
-
JSON_PROPERTY_TRADES
- See Also:
-
JSON_PROPERTY_WINS
- See Also:
-
JSON_PROPERTY_LOSSES
- See Also:
-
JSON_PROPERTY_REALISED_PNL
- See Also:
-
JSON_PROPERTY_CONTRIBUTION_PCT
- See Also:
-
JSON_PROPERTY_UNREALISED_PNL
- See Also:
-
JSON_PROPERTY_TOTAL_PNL
- See Also:
-
JSON_PROPERTY_OPEN_POSITION
- See Also:
-
JSON_PROPERTY_KPI
- See Also:
-
-
Constructor Details
-
LivePaperInstrument
public LivePaperInstrument()
-
-
Method Details
-
instrument
-
getInstrument
Get instrument- Returns:
- instrument
-
setInstrument
-
trades
-
getTrades
Its closed trades.- Returns:
- trades
-
setTrades
-
wins
-
getWins
Closed trades with a PnL above zero.- Returns:
- wins
-
setWins
-
losses
-
getLosses
The other closed trades; a trade with a PnL of exactly zero is a loss.- Returns:
- losses
-
setLosses
-
realisedPnl
-
getRealisedPnl
Sum of the PnL of its closed trades, in the account's currency.- Returns:
- realisedPnl
-
setRealisedPnl
-
contributionPct
-
getContributionPct
`realisedPnl` as a percent of the account's `initialFunding` (0-100 scale), so the contributions of the instruments add up to the account's realised return.- Returns:
- contributionPct
-
setContributionPct
-
unrealisedPnl
-
getUnrealisedPnl
What its open position is worth over its cost as of the last mark; `0` when it holds nothing. Absent while its position has no current mark (see `openPosition`).- Returns:
- unrealisedPnl
-
setUnrealisedPnl
-
totalPnl
-
getTotalPnl
`realisedPnl` plus `unrealisedPnl`. Absent when `unrealisedPnl` is.- Returns:
- totalPnl
-
setTotalPnl
-
openPosition
-
getOpenPosition
Get openPosition- Returns:
- openPosition
-
setOpenPosition
-
kpi
-
getKpi
The KPIs of this instrument's closed trades alone, with the account's `initialFunding` as the capital (so `pnlTotalPercent` equals `contributionPct`). Absent until its first closed trade.- Returns:
- kpi
-
setKpi
-
equals
Return true if this LivePaperInstrument object is equal to o. -
hashCode
public int hashCode() -
toString
-
toUrlQueryString
Convert the instance into URL query string.- Returns:
- URL query string
-
toUrlQueryString
Convert the instance into URL query string.- Parameters:
prefix- prefix of the query string- Returns:
- URL query string
-