Client Management Systems API

Request to retrieve


The following input parameters are available in the request.

Parameter

Mandatory

Description

SessionID

Y

SessionID returned by the Login Request

AccountNumber

N

The Account number to retrieve positions from.
The Account number OR the Counterpart id must be supplied.

CounterpartId

N

The Counterpar id to retrieve positions from.
The Account number OR the Counterpart id must be supplied.

InstrumentTypes

Y

The instruments to include
An array of strings

SOAP 1.2 Definition

Request

 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.saxobank.com/service/cms/2013/08" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
   <soapenv:Header>
     <ns:SessionId>string</ns:SessionId>
   </soapenv:Header>
   <soapenv:Body>
     <ns:GetPositionsRequest>
       <!-Optional:->
       <ns:AccountNumber>string</ns:AccountNumber>
       <!-Optional:->
       <ns:CounterpartId>int</ns:CounterpartId>
       <!-Optional:->
       <ns:InstrumentTypes>
         <!-Zero or more repetitions:->
         <arr:string>string</arr:string>
       </ns:InstrumentTypes>
     </ns:GetPositionsRequest>
   </soapenv:Body>
 </soapenv:Envelope>


Response

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Header>
     <ActivityId CorrelationId="05b91941-3642-4dd7-a33a-20ccec5153e7" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">e199f48c-d2ce-4f2a-afc7-c19c382cff92</ActivityId>
   </s:Header>
   <s:Body>
     <GetPositionsResponse xmlns="http://www.saxobank.com/service/cms/2013/08">
       <Positions xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
         <Position>
           <CounterpartId>int</CounterpartId>
           <AccountNumber>string</AccountNumber>
           <OrderId>int</OrderId>
           <BackOfficeId>int</BackOfficeId>
           <BuySell>string</BuySell>
           <Instrument>string</Instrument>
           <CurrencyCode>string</CurrencyCode>
           <Amount>decimal</Amount>
           <OpenSwap>decimal</OpenSwap>
           <OpenPrice>decimal</OpenPrice>
           <ExecutionTime>DateTime</ExecutionTime>
           <PriceDecimals>int</PriceDecimals>
           <SpotDate>DateTime</SpotDate>
           <ValueDate>DateTime</ValueDate>
           <ExpiryDate>DateTime</ExpiryDate>
           <StrikePrice>decimal</StrikePrice>
           <LowerBarrier>decimal</LowerBarrier>
           <UpperBarrier>decimal</UpperBarrier>
           <ExpiryCut>string</ExpiryCut>
           <BarrierEventTime>DateTime</BarrierEventTime>
         </Position>
       </Positions>
     </GetPositionsResponse>
   </s:Body>
 </s:Envelope>

Code Examples

Code example 38: GetPositions Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.saxobank.com/service/cms/2013/08" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
   <soapenv:Header>
     <ns:SessionId>QAs01NW22ajBAsjFZTGM</ns:SessionId>
   </soapenv:Header>
   <soapenv:Body>
     <ns:GetPositionsRequest>
       <ns:CounterpartId>3006888</ns:CounterpartId>
       <ns:InstrumentTypes>
         <arr:string>All</arr:string>
       </ns:InstrumentTypes>
     </ns:GetPositionsRequest>
   </soapenv:Body>
 </soapenv:Envelope>



Code example 39: GetPositions Response

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Header>
     <ActivityId CorrelationId="05b91941-3642-4dd7-a33a-20ccec5153e7" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">e199f48c-d2ce-4f2a-afc7-c19c382cff92</ActivityId>
   </s:Header>
   <s:Body>
     <GetPositionsResponse xmlns="http://www.saxobank.com/service/cms/2013/08">
       <Positions xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <Position>
           <CounterpartId>3006888</CounterpartId>
           <AccountNumber>33930/FUSD</AccountNumber>
           <OrderId>1021821300</OrderId>
           <BackOfficeId>766085898</BackOfficeId>
           <BuySell>B</BuySell>
           <Instrument>CASHINTR</Instrument>
           <CurrencyCode>USD</CurrencyCode>
           <Amount>2</Amount>
           <OpenSwap>0</OpenSwap>
           <OpenPrice>1</OpenPrice>
           <ExecutionTime>2015-01-13T13:52:50.633</ExecutionTime>
           <PriceDecimals>4</PriceDecimals>
           <SpotDate>2015-01-13T00:00:00</SpotDate>
           <ValueDate>2015-01-13T00:00:00</ValueDate>
           <ExpiryDate>1899-12-30T00:00:00</ExpiryDate>
           <StrikePrice>0</StrikePrice>
           <LowerBarrier>0</LowerBarrier>
           <UpperBarrier>0</UpperBarrier>
           <ExpiryCut></ExpiryCut>
           <BarrierEventTime>1899-12-30T00:00:00</BarrierEventTime>
         </Position>
         <Position>
           <CounterpartId>3006888</CounterpartId>
           <AccountNumber>33930/FUSD</AccountNumber>
           <OrderId>1021833640</OrderId>
           <BackOfficeId>766088665</BackOfficeId>
           <BuySell>B</BuySell>
           <Instrument>CASHINTR</Instrument>
           <CurrencyCode>USD</CurrencyCode>
           <Amount>1</Amount>
           <OpenSwap>0</OpenSwap>
           <OpenPrice>1</OpenPrice>
           <ExecutionTime>2015-01-28T12:14:38.863</ExecutionTime>
           <PriceDecimals>4</PriceDecimals>
           <SpotDate>2015-01-28T00:00:00</SpotDate>
           <ValueDate>2015-01-28T00:00:00</ValueDate>
           <ExpiryDate>1899-12-30T00:00:00</ExpiryDate>
           <StrikePrice>0</StrikePrice>
           <LowerBarrier>0</LowerBarrier>
           <UpperBarrier>0</UpperBarrier>
           <ExpiryCut></ExpiryCut>
           <BarrierEventTime>1899-12-30T00:00:00</BarrierEventTime>
         </Position>
       </Positions>
     </GetPositionsResponse>
   </s:Body>
 </s:Envelope>