Skip to main content

Portföy

Portföy Oluşturma​

Description​

Portföy oluşturmak için kullanılır. En az 3 sembol verilmelidir. Oluşturulan onaylanmaya hazır, status bilgisi "calculating" olan portföyün bilgileri gelir. Portföy onaylanmaya hazır olduğunda Portföy Sorgulama servisinde statu bilgisi "pendingApproval" görünür. Portföy Onaylama servisi ile onaylanan portföy statu bilgisi "approved" olarak görünür.

Endpoint​

HTTP POST

Endpoint https://apitest.matriksdata.com/dumrul/v1/magnus-portfolio

Request Body Parameters​

ParameterTypeRequiredDescription
namestringtruePortföy adını belirler
currencystringtruePortföyün para birimini belirler. "TRY", "USD," "EUR" değerlerini alabilir.
investmentintegertruePortföy büyüklüğünü belirler.
riskstringtruePortföy için risk değerini belirler. conservative, moderate, growth, aggressive değerlerini alabilir
symbolsarraytrueEn az 3 sembol verilmelidir. Matriks sembol kodları kullanılmalıdır.

Sample Request-Response​

https://apitest.matriksdata.com/dumrul/v1/magnus-portfolio

Request Body:

{
"name": "test",
"currency": "TRY",
"investment": 100000,
"risk": "aggressive",
"symbols": [
"AKBNK",
"GARAN",
"ASELS"
]
}

Response:

{
"id": "6909d6efb9b04e1db58bb6d7",
"name": "test",
"status": "calculating",
"plannedInvestment": 100000,
"currency": "TRY",
"tickers": [
"AKBNK.E.BISTPP",
"GARAN.E.BISTPP",
"ASELS.E.BISTPP"
],
"riskProfile": "aggressive",
"createdAt": "2025-11-04T10:35:27.778Z"
}

Portföy Onaylama​

Description​

Statu bilgisi "pendingApproval" olan portföyün onaylanması için kullanılır. Portföy onaylandıktan sonra portföy sorgulamada servis cevabı değişir.

Endpoint​

HTTP PUT

Endpoint https://apitest.matriksdata.com/dumrul/v1/magnus-portfolio/approve

Request Body Parameters​

ParameterTypeRequiredDescription
idstringtruePortföy id bilgisi

Sample Request-Response​

https://apitest.matriksdata.com/dumrul/v1/magnus-portfolio/approve

Request Body:

{
"id": "6909d6efb9b04e1db58bb6d7"
}

Response:

{
"success": true
}

Transaction Onaylama​

Description​

"pendingTransaction" olan portföyün bilgilerinin onaylanması için kullanılır. Transaction tamamlandıktan sonra portföy sorgulamada servis cevabı değişir. Body'de bulunan "completed" ve "canceled" dizileri boş olsa bile gönderilmelidir.

Endpoint​

HTTP POST

Endpoint https://apitest.matriksdata.com/dumrul/v1/magnus-portfolio/complete-transaction

Request Body Parameters​

ParameterTypeRequiredDescription
idstringtruePortföy id bilgisi
symbolstringtrueSembol Kodu
amountstringtrueAdet Bilgisi
pricestringtrueFiyat Bilgisi

Sample Request-Response​

https://apitest.matriksdata.com/dumrul/v1/magnus-portfolio/complete-transaction

Request Body:

{
"id": "6904b0755a9ad9104b63afa3",
"completed": [
{
"symbol": "AKBNK",
"amount": 378,
"price": 59.4
},
{
"symbol": "GARAN",
"amount": 298,
"price": 116.6
},
{
"symbol": "ASELS",
"amount": 296,
"price": 144.2
}
],
"canceled": [
"EREGL","AKBNK"
]
}

Response:

{
"success": true
}

Portföy Silme​

Description​

Portföy silmek için kullanılır.

Endpoint​

HTTP DELETE

Endpoint https://apitest.matriksdata.com/dumrul/v1/magnus-portfolio

Request Body Parameters​

ParameterTypeRequiredDescription
idstringtruePortföy id bilgisi

Sample Request-Response​

https://apitest.matriksdata.com/dumrul/v1/magnus-portfolio

Request Body:

{
"id": "68f89c697a0aeecddb9b9ffa"
}

Response:

{
"success": true
}

Portföy Sorgulama​

Description​

Bu serviste kullanıcı adına kurulmuş olan portföy bilgileri döner. Portföy kullanıcı tokenında bulunan sub ve iss bilgisine göre kurulur.

Endpoint​

HTTP GET

Endpoint https://apitest.matriksdata.com/dumrul/v1/magnus-portfolio

Query Parameters​

ParameterTypeRequiredExampleDescription
idstringfalse6909d6efb9b04e1db58bb6d7Verildiğinde ilgili portföye ait detayları döner. Verilmediğinde kullanıcı adına kurulmuş tüm portföyleri döner.

Sample Request-Response​

https://apitest.matriksdata.com/dumrul/v1/magnus-portfolio?id=6909d6efb9b04e1db58bb6d7

[
{
"id": "6909d6efb9b04e1db58bb6d7",
"name": "test",
"status": "pendingApproval",
"plannedInvestment": 100000,
"currency": "TRY",
"tickers": [
"AKBNK.E.BISTPP",
"GARAN.E.BISTPP",
"ASELS.E.BISTPP"
],
"state": {
"balance": 0,
"capital": 0,
"yield": 0,
"averageReturn": 0,
"variance": 0,
"standardDeviation": 0,
"sharpeRatio": 0,
"totalTransactionCost": 0,
"credit": 0,
"revenue": 0,
"investment": 0,
"return": 0,
"_id": "6909d6efb9b04e1db58bb6e5",
"assets": []
},
"rebalancing": {
"threshold": {
"active": true,
"value": 0.05
},
"period": {
"active": false,
"value": 7
},
"drift": {
"active": false,
"value": 0.1
},
"outperform": {
"active": false,
"value": {
"symbols": [],
"value": 0.15
}
},
"jump": {
"active": false,
"value": 0.15
}
},
"riskProfile": "aggressive",
"createdAt": "2025-11-04T10:35:27.778Z",
"pendingOptimization": {
"id": "6909d6efb9b04e1db58bb6e9",
"status": "finished",
"model": "static_magnus_algorithm",
"constraint": {
"type": "no_short"
},
"objective": {
"type": "maximize_quadratic_utility",
"riskAversion": 1
},
"startDate": "2025-05-06T10:35:27.775Z",
"endDate": "2025-11-04T10:35:27.775Z",
"weights": [
{
"symbol": "AKBNK.E.BISTPP",
"weight": 0.3079642314185234,
"price": 60.95,
"priceTime": "2025-11-03T00:00:00+03:00"
},
{
"symbol": "GARAN.E.BISTPP",
"weight": 0.22254096615633048,
"price": 133.6,
"priceTime": "2025-11-03T00:00:00+03:00"
},
{
"symbol": "ASELS.E.BISTPP",
"weight": 0.4694948024251462,
"price": 198,
"priceTime": "2025-11-03T00:00:00+03:00"
}
],
"startedAt": "2025-11-04T10:35:27.781Z",
"finishedAt": "2025-11-04T10:35:29.909Z"
}
}
]

Yeni Optimizasyon​

Description​

Optimizasyonu onaylanmış portföy için yeni optimizasyon istenirse çalıştırılabilir. Çalıştırıldığında portföyün içerisinde "pendingOptimization" alanı gelir ve portföyün yeniden onaylanması gerekmektedir. Ardından onaylanan optimizasyon için "pendingTransaction" oluşur.

Endpoint​

HTTP PUT

Endpoint https://apitest.matriksdata.com/dumrul/v1/magnus-portfolio/new-optimization

Request Body Parameters​

ParameterTypeRequiredDescription
idstringtruePortföy id bilgisi

Sample Request-Response​

https://apitest.matriksdata.com/dumrul/v1/magnus-portfolio/new-optimization

Request Body:

{
"id": "6904b0755a9ad9104b63afa3"
}

Response:

{
"success": true
}
Son güncelleme: 14 Temmuz 2026