Class PortfolioPosition

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
ru.tinkoff.piapi.contract.v1.PortfolioPosition
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable, PortfolioPositionOrBuilder

public final class PortfolioPosition extends com.google.protobuf.GeneratedMessageV3 implements PortfolioPositionOrBuilder
Позиции портфеля.
 
Protobuf type tinkoff.public.invest.api.contract.v1.PortfolioPosition
See Also:
  • Field Details

    • FIGI_FIELD_NUMBER

      public static final int FIGI_FIELD_NUMBER
      See Also:
    • INSTRUMENT_TYPE_FIELD_NUMBER

      public static final int INSTRUMENT_TYPE_FIELD_NUMBER
      See Also:
    • QUANTITY_FIELD_NUMBER

      public static final int QUANTITY_FIELD_NUMBER
      See Also:
    • AVERAGE_POSITION_PRICE_FIELD_NUMBER

      public static final int AVERAGE_POSITION_PRICE_FIELD_NUMBER
      See Also:
    • EXPECTED_YIELD_FIELD_NUMBER

      public static final int EXPECTED_YIELD_FIELD_NUMBER
      See Also:
    • CURRENT_NKD_FIELD_NUMBER

      public static final int CURRENT_NKD_FIELD_NUMBER
      See Also:
    • AVERAGE_POSITION_PRICE_PT_FIELD_NUMBER

      public static final int AVERAGE_POSITION_PRICE_PT_FIELD_NUMBER
      See Also:
    • CURRENT_PRICE_FIELD_NUMBER

      public static final int CURRENT_PRICE_FIELD_NUMBER
      See Also:
    • AVERAGE_POSITION_PRICE_FIFO_FIELD_NUMBER

      public static final int AVERAGE_POSITION_PRICE_FIFO_FIELD_NUMBER
      See Also:
    • QUANTITY_LOTS_FIELD_NUMBER

      public static final int QUANTITY_LOTS_FIELD_NUMBER
      See Also:
    • BLOCKED_FIELD_NUMBER

      public static final int BLOCKED_FIELD_NUMBER
      See Also:
    • POSITION_UID_FIELD_NUMBER

      public static final int POSITION_UID_FIELD_NUMBER
      See Also:
    • INSTRUMENT_UID_FIELD_NUMBER

      public static final int INSTRUMENT_UID_FIELD_NUMBER
      See Also:
    • VAR_MARGIN_FIELD_NUMBER

      public static final int VAR_MARGIN_FIELD_NUMBER
      See Also:
    • EXPECTED_YIELD_FIFO_FIELD_NUMBER

      public static final int EXPECTED_YIELD_FIFO_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getUnknownFields

      public final com.google.protobuf.UnknownFieldSet getUnknownFields()
      Specified by:
      getUnknownFields in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getUnknownFields in class com.google.protobuf.GeneratedMessageV3
    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • getFigi

      public String getFigi()
      Figi-идентификатора инструмента.
       
      string figi = 1;
      Specified by:
      getFigi in interface PortfolioPositionOrBuilder
      Returns:
      The figi.
    • getFigiBytes

      public com.google.protobuf.ByteString getFigiBytes()
      Figi-идентификатора инструмента.
       
      string figi = 1;
      Specified by:
      getFigiBytes in interface PortfolioPositionOrBuilder
      Returns:
      The bytes for figi.
    • getInstrumentType

      public String getInstrumentType()
      Тип инструмента.
       
      string instrument_type = 2;
      Specified by:
      getInstrumentType in interface PortfolioPositionOrBuilder
      Returns:
      The instrumentType.
    • getInstrumentTypeBytes

      public com.google.protobuf.ByteString getInstrumentTypeBytes()
      Тип инструмента.
       
      string instrument_type = 2;
      Specified by:
      getInstrumentTypeBytes in interface PortfolioPositionOrBuilder
      Returns:
      The bytes for instrumentType.
    • hasQuantity

      public boolean hasQuantity()
      Количество инструмента в портфеле в штуках.
       
      .tinkoff.public.invest.api.contract.v1.Quotation quantity = 3;
      Specified by:
      hasQuantity in interface PortfolioPositionOrBuilder
      Returns:
      Whether the quantity field is set.
    • getQuantity

      public Quotation getQuantity()
      Количество инструмента в портфеле в штуках.
       
      .tinkoff.public.invest.api.contract.v1.Quotation quantity = 3;
      Specified by:
      getQuantity in interface PortfolioPositionOrBuilder
      Returns:
      The quantity.
    • getQuantityOrBuilder

      public QuotationOrBuilder getQuantityOrBuilder()
      Количество инструмента в портфеле в штуках.
       
      .tinkoff.public.invest.api.contract.v1.Quotation quantity = 3;
      Specified by:
      getQuantityOrBuilder in interface PortfolioPositionOrBuilder
    • hasAveragePositionPrice

      public boolean hasAveragePositionPrice()
      Средневзвешенная цена позиции. **Возможна задержка до секунды для пересчёта**.
       
      .tinkoff.public.invest.api.contract.v1.MoneyValue average_position_price = 4;
      Specified by:
      hasAveragePositionPrice in interface PortfolioPositionOrBuilder
      Returns:
      Whether the averagePositionPrice field is set.
    • getAveragePositionPrice

      public MoneyValue getAveragePositionPrice()
      Средневзвешенная цена позиции. **Возможна задержка до секунды для пересчёта**.
       
      .tinkoff.public.invest.api.contract.v1.MoneyValue average_position_price = 4;
      Specified by:
      getAveragePositionPrice in interface PortfolioPositionOrBuilder
      Returns:
      The averagePositionPrice.
    • getAveragePositionPriceOrBuilder

      public MoneyValueOrBuilder getAveragePositionPriceOrBuilder()
      Средневзвешенная цена позиции. **Возможна задержка до секунды для пересчёта**.
       
      .tinkoff.public.invest.api.contract.v1.MoneyValue average_position_price = 4;
      Specified by:
      getAveragePositionPriceOrBuilder in interface PortfolioPositionOrBuilder
    • hasExpectedYield

      public boolean hasExpectedYield()
      Текущая рассчитанная доходность позиции.
       
      .tinkoff.public.invest.api.contract.v1.Quotation expected_yield = 5;
      Specified by:
      hasExpectedYield in interface PortfolioPositionOrBuilder
      Returns:
      Whether the expectedYield field is set.
    • getExpectedYield

      public Quotation getExpectedYield()
      Текущая рассчитанная доходность позиции.
       
      .tinkoff.public.invest.api.contract.v1.Quotation expected_yield = 5;
      Specified by:
      getExpectedYield in interface PortfolioPositionOrBuilder
      Returns:
      The expectedYield.
    • getExpectedYieldOrBuilder

      public QuotationOrBuilder getExpectedYieldOrBuilder()
      Текущая рассчитанная доходность позиции.
       
      .tinkoff.public.invest.api.contract.v1.Quotation expected_yield = 5;
      Specified by:
      getExpectedYieldOrBuilder in interface PortfolioPositionOrBuilder
    • hasCurrentNkd

      public boolean hasCurrentNkd()
       Текущий НКД.
       
      .tinkoff.public.invest.api.contract.v1.MoneyValue current_nkd = 6;
      Specified by:
      hasCurrentNkd in interface PortfolioPositionOrBuilder
      Returns:
      Whether the currentNkd field is set.
    • getCurrentNkd

      public MoneyValue getCurrentNkd()
       Текущий НКД.
       
      .tinkoff.public.invest.api.contract.v1.MoneyValue current_nkd = 6;
      Specified by:
      getCurrentNkd in interface PortfolioPositionOrBuilder
      Returns:
      The currentNkd.
    • getCurrentNkdOrBuilder

      public MoneyValueOrBuilder getCurrentNkdOrBuilder()
       Текущий НКД.
       
      .tinkoff.public.invest.api.contract.v1.MoneyValue current_nkd = 6;
      Specified by:
      getCurrentNkdOrBuilder in interface PortfolioPositionOrBuilder
    • hasAveragePositionPricePt

      public boolean hasAveragePositionPricePt()
       Deprecated Средняя цена позиции в пунктах (для фьючерсов). **Возможна задержка до секунды для пересчёта**.
       
      .tinkoff.public.invest.api.contract.v1.Quotation average_position_price_pt = 7;
      Specified by:
      hasAveragePositionPricePt in interface PortfolioPositionOrBuilder
      Returns:
      Whether the averagePositionPricePt field is set.
    • getAveragePositionPricePt

      public Quotation getAveragePositionPricePt()
       Deprecated Средняя цена позиции в пунктах (для фьючерсов). **Возможна задержка до секунды для пересчёта**.
       
      .tinkoff.public.invest.api.contract.v1.Quotation average_position_price_pt = 7;
      Specified by:
      getAveragePositionPricePt in interface PortfolioPositionOrBuilder
      Returns:
      The averagePositionPricePt.
    • getAveragePositionPricePtOrBuilder

      public QuotationOrBuilder getAveragePositionPricePtOrBuilder()
       Deprecated Средняя цена позиции в пунктах (для фьючерсов). **Возможна задержка до секунды для пересчёта**.
       
      .tinkoff.public.invest.api.contract.v1.Quotation average_position_price_pt = 7;
      Specified by:
      getAveragePositionPricePtOrBuilder in interface PortfolioPositionOrBuilder
    • hasCurrentPrice

      public boolean hasCurrentPrice()
      Текущая цена за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента..
       
      .tinkoff.public.invest.api.contract.v1.MoneyValue current_price = 8;
      Specified by:
      hasCurrentPrice in interface PortfolioPositionOrBuilder
      Returns:
      Whether the currentPrice field is set.
    • getCurrentPrice

      public MoneyValue getCurrentPrice()
      Текущая цена за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента..
       
      .tinkoff.public.invest.api.contract.v1.MoneyValue current_price = 8;
      Specified by:
      getCurrentPrice in interface PortfolioPositionOrBuilder
      Returns:
      The currentPrice.
    • getCurrentPriceOrBuilder

      public MoneyValueOrBuilder getCurrentPriceOrBuilder()
      Текущая цена за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента..
       
      .tinkoff.public.invest.api.contract.v1.MoneyValue current_price = 8;
      Specified by:
      getCurrentPriceOrBuilder in interface PortfolioPositionOrBuilder
    • hasAveragePositionPriceFifo

      public boolean hasAveragePositionPriceFifo()
      Средняя цена позиции по методу FIFO. **Возможна задержка до секунды для пересчёта**.
       
      .tinkoff.public.invest.api.contract.v1.MoneyValue average_position_price_fifo = 9;
      Specified by:
      hasAveragePositionPriceFifo in interface PortfolioPositionOrBuilder
      Returns:
      Whether the averagePositionPriceFifo field is set.
    • getAveragePositionPriceFifo

      public MoneyValue getAveragePositionPriceFifo()
      Средняя цена позиции по методу FIFO. **Возможна задержка до секунды для пересчёта**.
       
      .tinkoff.public.invest.api.contract.v1.MoneyValue average_position_price_fifo = 9;
      Specified by:
      getAveragePositionPriceFifo in interface PortfolioPositionOrBuilder
      Returns:
      The averagePositionPriceFifo.
    • getAveragePositionPriceFifoOrBuilder

      public MoneyValueOrBuilder getAveragePositionPriceFifoOrBuilder()
      Средняя цена позиции по методу FIFO. **Возможна задержка до секунды для пересчёта**.
       
      .tinkoff.public.invest.api.contract.v1.MoneyValue average_position_price_fifo = 9;
      Specified by:
      getAveragePositionPriceFifoOrBuilder in interface PortfolioPositionOrBuilder
    • hasQuantityLots

      public boolean hasQuantityLots()
      Deprecated Количество лотов в портфеле.
       
      .tinkoff.public.invest.api.contract.v1.Quotation quantity_lots = 10;
      Specified by:
      hasQuantityLots in interface PortfolioPositionOrBuilder
      Returns:
      Whether the quantityLots field is set.
    • getQuantityLots

      public Quotation getQuantityLots()
      Deprecated Количество лотов в портфеле.
       
      .tinkoff.public.invest.api.contract.v1.Quotation quantity_lots = 10;
      Specified by:
      getQuantityLots in interface PortfolioPositionOrBuilder
      Returns:
      The quantityLots.
    • getQuantityLotsOrBuilder

      public QuotationOrBuilder getQuantityLotsOrBuilder()
      Deprecated Количество лотов в портфеле.
       
      .tinkoff.public.invest.api.contract.v1.Quotation quantity_lots = 10;
      Specified by:
      getQuantityLotsOrBuilder in interface PortfolioPositionOrBuilder
    • getBlocked

      public boolean getBlocked()
      Заблокировано на бирже.
       
      bool blocked = 21;
      Specified by:
      getBlocked in interface PortfolioPositionOrBuilder
      Returns:
      The blocked.
    • getPositionUid

      public String getPositionUid()
      position_uid-идентификатора инструмента
       
      string position_uid = 24;
      Specified by:
      getPositionUid in interface PortfolioPositionOrBuilder
      Returns:
      The positionUid.
    • getPositionUidBytes

      public com.google.protobuf.ByteString getPositionUidBytes()
      position_uid-идентификатора инструмента
       
      string position_uid = 24;
      Specified by:
      getPositionUidBytes in interface PortfolioPositionOrBuilder
      Returns:
      The bytes for positionUid.
    • getInstrumentUid

      public String getInstrumentUid()
      instrument_uid-идентификатора инструмента
       
      string instrument_uid = 25;
      Specified by:
      getInstrumentUid in interface PortfolioPositionOrBuilder
      Returns:
      The instrumentUid.
    • getInstrumentUidBytes

      public com.google.protobuf.ByteString getInstrumentUidBytes()
      instrument_uid-идентификатора инструмента
       
      string instrument_uid = 25;
      Specified by:
      getInstrumentUidBytes in interface PortfolioPositionOrBuilder
      Returns:
      The bytes for instrumentUid.
    • hasVarMargin

      public boolean hasVarMargin()
      Вариационная маржа
       
      .tinkoff.public.invest.api.contract.v1.MoneyValue var_margin = 26;
      Specified by:
      hasVarMargin in interface PortfolioPositionOrBuilder
      Returns:
      Whether the varMargin field is set.
    • getVarMargin

      public MoneyValue getVarMargin()
      Вариационная маржа
       
      .tinkoff.public.invest.api.contract.v1.MoneyValue var_margin = 26;
      Specified by:
      getVarMargin in interface PortfolioPositionOrBuilder
      Returns:
      The varMargin.
    • getVarMarginOrBuilder

      public MoneyValueOrBuilder getVarMarginOrBuilder()
      Вариационная маржа
       
      .tinkoff.public.invest.api.contract.v1.MoneyValue var_margin = 26;
      Specified by:
      getVarMarginOrBuilder in interface PortfolioPositionOrBuilder
    • hasExpectedYieldFifo

      public boolean hasExpectedYieldFifo()
      Текущая рассчитанная доходность позиции.
       
      .tinkoff.public.invest.api.contract.v1.Quotation expected_yield_fifo = 27;
      Specified by:
      hasExpectedYieldFifo in interface PortfolioPositionOrBuilder
      Returns:
      Whether the expectedYieldFifo field is set.
    • getExpectedYieldFifo

      public Quotation getExpectedYieldFifo()
      Текущая рассчитанная доходность позиции.
       
      .tinkoff.public.invest.api.contract.v1.Quotation expected_yield_fifo = 27;
      Specified by:
      getExpectedYieldFifo in interface PortfolioPositionOrBuilder
      Returns:
      The expectedYieldFifo.
    • getExpectedYieldFifoOrBuilder

      public QuotationOrBuilder getExpectedYieldFifoOrBuilder()
      Текущая рассчитанная доходность позиции.
       
      .tinkoff.public.invest.api.contract.v1.Quotation expected_yield_fifo = 27;
      Specified by:
      getExpectedYieldFifoOrBuilder in interface PortfolioPositionOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static PortfolioPosition parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static PortfolioPosition parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static PortfolioPosition parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static PortfolioPosition parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static PortfolioPosition parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static PortfolioPosition parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static PortfolioPosition parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static PortfolioPosition parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static PortfolioPosition parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static PortfolioPosition parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static PortfolioPosition parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static PortfolioPosition parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public PortfolioPosition.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static PortfolioPosition.Builder newBuilder()
    • newBuilder

      public static PortfolioPosition.Builder newBuilder(PortfolioPosition prototype)
    • toBuilder

      public PortfolioPosition.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected PortfolioPosition.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static PortfolioPosition getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<PortfolioPosition> parser()
    • getParserForType

      public com.google.protobuf.Parser<PortfolioPosition> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public PortfolioPosition getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder