# 📘 Fund APIs – Quick Reference

Base URL:

```
https://api.omidbi.ir
```

Pattern:

```
/api/{tenant}/v0/...
```

---

# 🔐 دریافت توکن (الزامی قبل از تمام APIها)

تمام APIهای این فایل نیاز به Bearer Token دارند.

---

## دریافت توکن

```
POST /api/{tenant}/v0/User/signin
```

```bash
curl --location 'https://api.omidbi.ir/api/pwa/v0/User/signin' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-Tenant-ID: pwa' \
--data '{
  "username":"USERNAME",
  "password":"PASSWORD"
}'
```

---

## استفاده در همه APIها

```
Authorization: Bearer YOUR_ACCESS_TOKEN
```

مثال:

```bash
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

⚠️ بدون توکن معتبر، هیچ Endpoint صندوق قابل استفاده نیست.

---

# 📋 API Index

| عنوان                     | متد  | مسیر                                             | لینک                              |
| ------------------------- | ---- | ------------------------------------------------ | --------------------------------- |
| دریافت لیست صندوق‌ها      | GET  | /Fund                                            | [مشاهده](#get-funds)              |
| دریافت NAV روز            | GET  | /Fund/{seoRegisterNo}/nav                        | [مشاهده](#get-nav)                |
| دریافت Last NAV           | GET  | /Fund/{seoRegisterNo}/LastNav                    | [مشاهده](#get-last-nav)           |
| دریافت All NAV            | GET  | /Fund/{seoRegisterNo}/AllNav                     | [مشاهده](#get-all-nav)            |
| ثبت درخواست صدور          | POST | /fund/{FundSeoRegisterNo}/Request/issuance       | [مشاهده](#post-issuance)          |
| ثبت درخواست ابطال         | POST | /fund/{FundSeoRegisterNo}/Request/redemption     | [مشاهده](#post-redemption)        |
| دریافت دارایی سرمایه‌گذار | GET  | /fund/{FundSeoRegisterNo}/Investor/InvestorAsset | [مشاهده](#get-investor-asset)     |
| استعلام وضعیت صدور        | GET  | /Request/{RequestId}/IssuanceReceiptData         | [مشاهده](#get-issuance-receipt)   |
| استعلام وضعیت ابطال       | GET  | /Request/{RequestId}/RedemptionReceiptData       | [مشاهده](#get-redemption-receipt) |

---

---

<a id="get-funds"></a>

# 🔹 1. دریافت لیست صندوق‌ها

```
GET /api/{tenant}/v0/Fund
```

```bash
curl -X GET "https://api.omidbi.ir/api/YOUR_TENANT/v0/Fund" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

```
{
  "items": [
    {
      "fundRegisterCode": "11141",
      "fundName": " مشترک نوید انصار",
      "minimumCapitalUnit": 1,
      "liquidityGurantor1": "تامین سرمایه امید",
      "liquidityGurantor2": "مرکزی مرکزی",
      "guaranteeRate": 0,
      "marketMaker": null,
      "profitGurantor": "",
      "dailyReturn": 0.9207288122212323,
      "weeklyReturn": -1.5228283196528958,
      "monthlyReturn": -6.108009523827821,
      "overallReturn": 6253.096174735344,
      "quarterReturn": 9.715196136164023,
      "annualReturn": 16.78129794046036,
      "profitPeriod": 0,
      "maximumCapitalUnit": 1000000,
      "issuanceWage": 20000,
      "redemtionWage": 0,
      "semiYearly": 31.11045670207148,
      "profitDay": 0,
      "fundTypeTitle": "سهامی",
      "managerName": "تامین سرمایه امید",
      "investmentManager": "احمد کاظمی",
      "auditor": "موسسه حسابرسی کاربرد تحقیق",
      "custodian": "مشاور سرمایه گذاری ایرانیان تحلیل فارابی",
      "registrationManager": "تامین سرمایه امید",
      "publishDate": "2026-02-17T00:00:00",
      "remainedUnit": 657650,
      "startDate": "2013-03-03T00:00:00",
      "nav": {
        "seoRegisterNo": null,
        "date": "2026-02-17T00:00:00",
        "localDate": null,
        "cancelNav": 6353302,
        "subscriptionNav": 6401669,
        "statisticNav": 6300195,
        "totalNetAssetValue": 2175052922167,
        "totalUnit": 342350,
        "totalInvestor": 212,
        "totalCancelUnit": 0,
        "totalSubscriptionUnit": 0,
        "groupId": 0,
        "groupName": null
      },
      "wageSettings": [
        {
          "name": "IssuanceFixedWage",
          "value": "20000",
          "description": "کارمزد ثابت صدور"
        },
        {
          "name": "RedemptionFixedWage",
          "value": "20000",
          "description": "کارمزد ثابت ابطال"
        },
        {
          "name": "IssuanceVariableWageRate",
          "value": "0",
          "description": "کارمزد متغیر صدور"
        },
        {
          "name": "IssuanceMaxVariableWage",
          "value": "500000",
          "description": "سقف کارمزد متغیر"
        },
        {
          "name": "Penalty1Percent",
          "value": "5",
          "description": "درصد پنالتی 1"
        },
        {
          "name": "Penalty1ToDay",
          "value": "7",
          "description": "روز پنالتی 1"
        },
        {
          "name": "Penalty2Percent",
          "value": "4",
          "description": "درصد پنالتی 2"
        },
        {
          "name": "Penalty2ToDay",
          "value": "15",
          "description": "روز پنالتی 2"
        },
        {
          "name": "Penalty3Percent",
          "value": "3",
          "description": "درصد پنالتی 3"
        },
        {
          "name": "Penalty3ToDay",
          "value": "30",
          "description": "روز پنالتی 3"
        },
        {
          "name": "Penalty4Percent",
          "value": "2",
          "description": "درصد پنالتی 4"
        },
        {
          "name": "Penalty4ToDay",
          "value": "60",
          "description": "روز پنالتی 4"
        },
        {
          "name": "Penalty5Percent",
          "value": "1",
          "description": "درصد پنالتی 5"
        },
        {
          "name": "Penalty5ToDay",
          "value": "90",
          "description": "روز پنالتی 5"
        },
        {
          "name": "PenaltyDayOnMinimumNav",
          "value": "0",
          "description": "پنالتی 6 تا روز (براساس کمترین مقدار خالص ارزش دارایی)"
        }
      ],
      "navAdjustSetting": [
        {
          "splitRate": 10,
          "rateDate": "2022-09-17T00:00:00"
        }
      ],
      "websiteAddress": "navidansarfund.ir"
    },
  ],
  "pageNumber": 1,
  "pageSize": 3,
  "totalPageCount": 1,
  "totalItemCount": 3,
  "hasNextPage": false,
  "hasPreviousPage": false,
  "isFirstPage": true,
  "isLastPage": true,
  "firstItemOnPage": 1,
  "lastItemOnPage": 3
}
```

---

<a id="get-nav"></a>

# 🔹 2. دریافت NAV روز صندوق

```
GET /api/{tenant}/v0/Fund/{seoRegisterNo}/nav
```

```bash
curl -X GET "https://api.omidbi.ir/api/YOUR_TENANT/v0/Fund/12345/nav" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

---

<a id="get-last-nav"></a>

# 🔹 3. دریافت Last NAV

```
GET /api/{tenant}/v0/Fund/{seoRegisterNo}/LastNav
```

```bash
curl -X GET "https://api.omidbi.ir/api/YOUR_TENANT/v0/Fund/12345/LastNav" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

---

<a id="get-all-nav"></a>

# 🔹 4. دریافت All NAV

```
GET /api/{tenant}/v0/Fund/{seoRegisterNo}/AllNav
```

```bash
curl -X GET "https://api.omidbi.ir/api/YOUR_TENANT/v0/Fund/12345/AllNav" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

---

<a id="post-issuance"></a>

# 🔹 5. ثبت درخواست صدور

```
POST /api/{tenant}/v0/fund/{FundSeoRegisterNo}/Request/issuance
```

```bash
curl -X POST "https://api.omidbi.ir/api/YOUR_TENANT/v0/fund/12345/Request/issuance" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "InvestorNationalCode": "{{nationalCode}}",
    "Amount": 25000,
    "BankBillCode": "153",
    "BankBillImageFile": null,
    "BankBillImageFileName": null,
    "FundBankAccountNumber": "5922599548",
    "IsInstantPayment": true,
    "FormSerial": "5252356212",
    "PaymentMethod": 1,
    "SettlementBranchCode": "1428",
    "IsGuarantee": false
  }'
```

---

<a id="post-redemption"></a>

# 🔹 6. ثبت درخواست ابطال

```
POST /api/{tenant}/v0/fund/{FundSeoRegisterNo}/Request/redemption
```

```bash
curl -X POST "https://api.omidbi.ir/api/YOUR_TENANT/v0/fund/12345/Request/redemption" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
      "count": 1223123,
      "ReasonId": "255",
      "Reason": "test",
      "nationalCode": "{{nationalCode}}"
  }'
```

---

<a id="get-investor-asset"></a>

---

# 🔹 7. دریافت دارایی سرمایه‌گذار (نسخه معتبرتر)

```
GET /api/{tenant}/v0/Investor/{InvestorId}/Fund/{FundSeoRegisterNo}/AssetData
```

```bash
curl -X GET "https://api.omidbi.ir/api/YOUR_TENANT/v0/Investor/INV-001/Fund/12345/AssetData" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

⭐ اعلام‌شده در پیام رسمی تدبیر – اولویت با این Endpoint است.

---

# 🔹 7.1 نسخه جایگزین (استخراج‌شده از فایل)

```
GET /api/{tenant}/v0/fund/{FundSeoRegisterNo}/Investor/InvestorAsset
```

```bash
curl -X GET "https://api.omidbi.ir/api/YOUR_TENANT/v0/fund/12345/Investor/InvestorAsset?investorId=INV-001" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

⚠️ در صورت مغایرت، نسخه بالایی ملاک است.

---

<a id="get-issuance-receipt"></a>

# 🔹 8. استعلام وضعیت صدور

```
GET /api/{tenant}/v0/Fund/{FundSeoRegisterNo}/Request/{RequestId}/IssuanceReceiptData
```

```bash
curl -X GET "https://api.omidbi.ir/api/YOUR_TENANT/v0/Fund/12345/Request/987654/IssuanceReceiptData" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

---

<a id="get-redemption-receipt"></a>

# 🔹 9. استعلام وضعیت ابطال

```
GET /api/{tenant}/v0/Fund/{FundSeoRegisterNo}/Request/{RequestId}/RedemptionReceiptData
```

```bash
curl -X GET "https://api.omidbi.ir/api/YOUR_TENANT/v0/Fund/12345/Request/999999/RedemptionReceiptData" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```
