Portfolio transactions
This is suitable to be used in a report that is run against portfolio(s).
Query
query Transactions($ids: [Long], $startDate: String, $endDate: String) { portfoliosByIds( ids: $ids ) { transactions(status:"OK", startDate: $startDate, endDate: $endDate) { portfolio:parentPortfolio { name shortName type { code name } primaryContact { name contactId } currency { code:securityCode name } } type { code: typeCode name: typeName } transactionDate settlementDate paymentDate tradeTime extId security { name code:securityCode isinCode type { name code } } currency { name code:securityCode } account { name number } quantity: amount unitPrice:unitPriceView cost cost2 tax tax2 totalCost tradeAmount cashFlow cashFlowInAccountCurrency cashFlowInPortfolioCurrency extInfo } } }
Variables
{ "ids": [1092], "startDate": "2020-01-01", "endDate": "2020-11-01" }
Result
{ "data": { "portfoliosByIds": [ { "transactions": [ { "portfolio": { "name": "Investment portfolio", "shortName": "123", "type": { "code": "INV", "name": "Investment portfolio" }, "primaryContact": { "name": "Colin Customer", "contactId": "010180-123B" }, "currency": { "code": "EUR", "name": "EUR" } }, "type": { "code": "B", "name": "Buy" }, "transactionDate": "2020-10-15", "settlementDate": "2020-10-15", "paymentDate": null, "tradeTime": "00:00:00", "extId": "636", "security": { "name": "Ericsson AB B", "code": "ERIC B", "isinCode": "SE0000108656", "type": { "name": "Stock", "code": "STOCK" } }, "currency": { "name": "SEK", "code": "SEK" }, "account": null, "quantity": 10776665621, "unitPrice": 98, "cost": 0, "cost2": 0, "tax": 0, "tax2": 0, "totalCost": 0, "tradeAmount": 1056113230858, "cashFlow": 0, "cashFlowInAccountCurrency": 0, "cashFlowInPortfolioCurrency": 0, "extInfo": "Settlement instructions to pay ASAP" } ] } ] } }