You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 3
Next »
It is possible to call the derivatives api and get real time status of all contracts belonging to a customer via method GetCustomerContracts(string customerId, string status, string dateFrom, string dateTo), by either adding a service reference to the web service and call from code or call directly from url in browser.
Parameter name | Description | Value format |
---|
customerId | The ssn of the customer | e.g 1412753219, no hyphens or spaces |
status | The status of the contract (optional) | if omitted or null passed, it will return all contracts belonging to customer within date span, 0 for only open contracts and 1 for only closed contracts. |
dateFrom | The date from which to query contracts (optional) | If omitted or null is passed it uses min date. The form should be 2020-05-21 |
dateTo | The date to which to query contracts (optional) | If omitted or null is passed it uses date today. The form should be 2020-05-21 |
The api method returns a string on json format, see example below:
[{
"ContractId" : 2081-0,
"Status" : New,
"Broker" : Sjóður 1,
"DateCreated" : 2020-01-13T12:09:59.953,
"SettlementDate" : 2020-01-14T00:00:00,
"MaturityDate" : 2020-03-17T00:00:00,
"TradeDate" : 2020-01-10T00:00:00,
"FinalInterestDate" : 2020-03-19T00:00:00,
"ExpiryDate" : 2020-03-17T00:00:00,
"Side" : BUY,
"Currency" : ISK,
"CurrencyRate" : 1,
"Symbol" : ICEAIR,
"Quantity" : 500000,
"CleanPrice" : 10,
"DirtyPrice" : 10,
"CollateralMargin" : 0,
"Signed" : false,
"SignedReceipt" : false,
"Interests" : 4.45,
"InterestFee" : 0,
"OpeningFee" : 20000,
"ExecutionFee" : 5,
"TransactionFee" : 0,
"OtherFee" : 0,
"ChangeOfTermsFee" : 0,
"ClosingAmount" : 0,
"ClosingCleanPrice" : 0,
"ClosingDate" : ,
"ClosingDirtyPrice" : 0,
"ClosingDirtyPriceInclFee" : 0,
"ClosingFee" : 0,
"ClosingForwardPayments" : ,
"ClosingInterestAmount" : ,
"ClosingNetValue" : ,
"ClosingPnL" : 0,
"ClosingQuantity" : 0,
"ClosingSettlementDate" : ,
"ClosingTaxAmount" : ,
"ClosingTaxPercentage" : ,
"Pnl" : -1262454.7256944436,
"StartPrice" : 10.044999999999998,
"CurrentPrice" : 10.244909451388887,
"LoanObligation" : 5122454.725694443,
"ShareObligation" : 3860000,
"ContractAmount" : 5022499.999999999,
"ForwardPrice" : 10.130675479166666,
"InterestAmount" : -99954.72569444442
},
{
"ContractId" : 2085-0,
"Status" : Closed,
"Broker" : Sjóður 1,
"DateCreated" : 2020-01-21T13:42:45.377,
"SettlementDate" : 2020-01-14T00:00:00,
"MaturityDate" : 2020-03-17T00:00:00,
"TradeDate" : 2020-01-10T00:00:00,
"FinalInterestDate" : 2020-03-19T00:00:00,
"ExpiryDate" : 2020-03-17T00:00:00,
"Side" : BUY,
"Currency" : ISK,
"CurrencyRate" : 1,
"Symbol" : ICEAIR,
"Quantity" : 500000,
"CleanPrice" : 10,
"DirtyPrice" : 10,
"CollateralMargin" : 0,
"Signed" : false,
"SignedReceipt" : false,
"Interests" : 4.45,
"InterestFee" : 0,
"OpeningFee" : 20000,
"ExecutionFee" : 5,
"TransactionFee" : 2500,
"OtherFee" : 0,
"ChangeOfTermsFee" : 0,
"ClosingAmount" : -5500000,
"ClosingCleanPrice" : 11,
"ClosingDate" : 2020-01-21T00:00:00,
"ClosingDirtyPrice" : 11,
"ClosingDirtyPriceInclFee" : 11,
"ClosingFee" : 4506,
"ClosingForwardPayments" : 0,
"ClosingInterestAmount" : -5587.531249999999,
"ClosingNetValue" : 464906.46875000093,
"ClosingPnL" : 464906.46875000093,
"ClosingQuantity" : -500000,
"ClosingSettlementDate" : 2020-01-23T00:00:00,
"ClosingTaxAmount" : 0,
"ClosingTaxPercentage" : 0.22,
"Pnl" : -1262454.7256944436,
"StartPrice" : 10.044999999999998,
"CurrentPrice" : 10.244909451388887,
"LoanObligation" : 5122454.725694443,
"ShareObligation" : 3860000,
"ContractAmount" : 5022499.999999999,
"ForwardPrice" : 10.130675479166666,
"InterestAmount" : -99954.72569444442
}]