Class LivePaperPosition

java.lang.Object
com.qtsurfer.api.client.model.LivePaperPosition

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.24.0") public class LivePaperPosition extends Object
LivePaperPosition
  • Field Details

  • Constructor Details

    • LivePaperPosition

      public LivePaperPosition()
  • Method Details

    • instrument

      public LivePaperPosition instrument(@Nonnull String instrument)
    • getInstrument

      @Nonnull public String getInstrument()
      Get instrument
      Returns:
      instrument
    • setInstrument

      public void setInstrument(@Nonnull String instrument)
    • base

      public LivePaperPosition base(@Nonnull Double base)
    • getBase

      @Nonnull public Double getBase()
      Amount held, in the base asset.
      Returns:
      base
    • setBase

      public void setBase(@Nonnull Double base)
    • cost

      public LivePaperPosition cost(@Nonnull Double cost)
    • getCost

      @Nonnull public Double getCost()
      What it cost, in the account's currency.
      Returns:
      cost
    • setCost

      public void setCost(@Nonnull Double cost)
    • markPrice

      public LivePaperPosition markPrice(@Nullable Double markPrice)
    • getMarkPrice

      @Nullable public Double getMarkPrice()
      The price the position was valued at in the last mark. Present, with `markedAtMs` and `unrealisedPnl`, only when that mark is of the position as it stands now.
      Returns:
      markPrice
    • setMarkPrice

      public void setMarkPrice(@Nullable Double markPrice)
    • markedAtMs

      public LivePaperPosition markedAtMs(@Nullable Long markedAtMs)
    • getMarkedAtMs

      @Nullable public Long getMarkedAtMs()
      Market time (epoch ms) of that mark.
      Returns:
      markedAtMs
    • setMarkedAtMs

      public void setMarkedAtMs(@Nullable Long markedAtMs)
    • unrealisedPnl

      public LivePaperPosition unrealisedPnl(@Nullable Double unrealisedPnl)
    • getUnrealisedPnl

      @Nullable public Double getUnrealisedPnl()
      `base` times `markPrice`, minus `cost`, in the account's currency.
      Returns:
      unrealisedPnl
    • setUnrealisedPnl

      public void setUnrealisedPnl(@Nullable Double unrealisedPnl)
    • equals

      public boolean equals(Object o)
      Return true if this LivePaperPosition object is equal to o.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toUrlQueryString

      public String toUrlQueryString()
      Convert the instance into URL query string.
      Returns:
      URL query string
    • toUrlQueryString

      public String toUrlQueryString(String prefix)
      Convert the instance into URL query string.
      Parameters:
      prefix - prefix of the query string
      Returns:
      URL query string