Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

GetPositions returns holdings of securities and cash positions on accounts. Each entry (GetPositionResponseRow) in the answer contains identifier for the Account and Asset, ie cash or instrument.

Each field is explained in the definition of GetPositionResponseRow below:


Filter inputs

NameTypeDescriptionMandatoryAvailable from version
BalanceDateDateTime?Balance dateYes
DisplayCurrencyCode

String

ISO-code for DisplayCurrency. For explanation look at the fields in the table for the response rows.

Yes


AccountDimensionKey String"T" for traded, "S" for settled and "A" for accountingYes
Accounts Guid[]Filter by array of accounts, to show holdings.

AccountTypeKeys String[]Filter by array of AccountTypeKeys

AccountNo StringFilter by array of account number (LIKE)

AccountOwnerGuid?Filter by array of account owner

Assets Guid[] Filter by array of assets (Cash or Instrument)

Asset Guid?Filter by single asset (Cash or Instrument)

AssetTypeKeysstring[]Filter by array of asset type keys (Cash or Instrument)

InstrumentTypes int[]Filter by array of instrument types

Response rows (Array)

NameTypeDescriptionAvailable from version
Account GuidThe account id
Asset GuidThe id of the cach or instrument
AssetTypeStringCash means currency assets like SEK, EUR etc. while GenericInstrument means securities like Stocks, Bonds etc. The type of asset can then be found by sending the Asset GUID as the AssetID to GetInstruments
BalanceDateDateTimeBalance date
Amount Decimal Size of the amount (amount for cash and number of shares of the instrument)
AcquisitionValue Double Acquisition value of the position, in the instruments currency.
AcquisitionValueAccountCurrency Double Acquisition value of the account currency.
Opened DateTimeTime when the position was created
AccountDimensionKey StringAccount dimension, "T"=trade balance, "S" = settle balance, "A"=booked balance
Price Double 

Price of the asset. Cash is always 1.0. If 'BalanceDate' is todays date will current price be used (yesterday's closing price) or else the closing price for 'BalanceDate' or if the price is missing from BalanceDate, previous closing price.


FxRate Double The exchange rate of the instrument/cash
BaseRate Double The exchange rate of the accounts base rate.
DisplayCurrencyCode String Display currency
DisplayRate Double Exchange rate for the base rate
MarketValueDouble Market value of the instrument /cash currency. For cash it´s always the same as amount.
MarketValueAccountCurrencyDouble Market value in the account currency
MarketValueDisplayCurrency Double Market value in the display currency
PreviousMarketValue Double Value of the position of the previous closing price.
PreviousMarketValueDisplayCurrency Double Value of the position of the previous closing price (display currency)
MarketValueChangeDouble Market value change between the previous closing price and the last closing price.
AcquisitionValueDisplayCurrency Double Acquisition value in display currency
AcquisitionPriceDouble AcquisitionPrice
AcquisitionPriceAccountCurrency Double Acquisition price in the base rate of the account 
AcquisitionPriceDisplayCurrencyDouble Acquisition price in the base rate
ReturnValue Double Return Value, acquisition price
ReturnValueAccountCurrency Double Return value in the base rate of the account 
ReturnValueDisplayCurrency Double Return value in the display currancy.
ReturnPercentage Double Return value diveded with the acquisition price
ReturnPercentageAccountCurrencyDouble Return value diveded with the acquisition price in the base rate of the account 
ReturnPercentageDisplayCurrency Double Return value diveded with the acquisition price
ReservedAmount DecimalReserved amount. Amount of current availability reserved. Cash is reserved to buy orders and instrument is reserved to sell orders. 
AvailableAmount DecimalAvailable amount
Account_AccountNostringThe account number
DisplayPercentagePriceBoolIf price is in persentage of MinimumLotSizeshould be displayed in percentage terms2.02



Code Block
languagexml
themeRDark
titleXML request example
collapsetrue
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <GetPositions xmlns="http://tempuri.org/">
      <req>
        <Credentials>
          <UserName>yourusername</UserName>
          <Password>yourpassword</Password>
        </Credentials>
        <identify>youridentifier</identify>
        <Args>
          <BalanceDate>2015-10-23T16:21:59.1659611+02:00</BalanceDate>
          <DisplayCurrencyCode>SEK</DisplayCurrencyCode>
          <AccountNo>95708006170</AccountNo>
          <AccountOwner xsi:nil="true" />
          <Asset xsi:nil="true" />
          <InstrumentType xsi:nil="true" />
        </Args>
        <Fields>
          <Account>true</Account>
          <Asset>true</Asset>
          <BalanceDate>false</BalanceDate>
          <Amount>true</Amount>
          <AcquisitionValue>true</AcquisitionValue>
          <AcquisitionValueAccountCurrency>true</AcquisitionValueAccountCurrency>
          <Opened>false</Opened>
          <AccountDimensionKey>false</AccountDimensionKey>
          <Price>true</Price>
          <FxRate>false</FxRate>
          <BaseRate>false</BaseRate>
          <DisplayCurrency>false</DisplayCurrency>
          <MarketValue>true</MarketValue>
          <MarketValueAccountCurrency>true</MarketValueAccountCurrency>
          <MarketValueDisplayCurrency>true</MarketValueDisplayCurrency>
          <PreviousMarketValue>false</PreviousMarketValue>
          <PreviousMarketValueDisplayCurrency>false</PreviousMarketValueDisplayCurrency>
          <MarketValueChange>false</MarketValueChange>
          <AcquisitionValueDisplayCurrency>false</AcquisitionValueDisplayCurrency>
          <AcquisitionPrice>true</AcquisitionPrice>
          <AcquisitionPriceAccountCurrency>true</AcquisitionPriceAccountCurrency>
          <AcquisitionPriceDisplayCurrency>false</AcquisitionPriceDisplayCurrency>
          <ReturnValue>true</ReturnValue>
          <ReturnValueAccountCurrency>false</ReturnValueAccountCurrency>
          <ReturnValueDisplayCurrency>false</ReturnValueDisplayCurrency>
          <ReturnPercentage>false</ReturnPercentage>
          <ReturnPercentageAccountCurrency>false</ReturnPercentageAccountCurrency>
          <ReturnPercentageDisplayCurrency>false</ReturnPercentageDisplayCurrency>
          <DisplayRate>false</DisplayRate>
          <ReservedAmount>false</ReservedAmount>
          <AvailableAmount>false</AvailableAmount>
          <AssetType>true</AssetType>
          <Account_AccountNo>true</Account_AccountNo>
        </Fields>
      </req>
    </GetPositions>
  </s:Body>
</s:Envelope>


Blog Posts
sortcreation
contenttitles
labelsCreateAccounts