> ## Documentation Index
> Fetch the complete documentation index at: https://developer.9squid.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Welcome to 9Squid

> Programmatic control over the full deal lifecycle — from loan tape ingestion through deal structuring, secondary market activity, and portfolio analytics.

**9Squid** is a structured finance platform for originators and investors. The API gives you programmatic control over the full deal lifecycle — from loan tape ingestion and eligibility validation through deal structuring, secondary market activity, and portfolio analytics.

***

## What can you build?

<CardGroup cols={2}>
  <Card title="Originator Workflows" href="/workflows/create-a-deal" icon="file-arrow-up" iconType="duotone">
    Submit loan tapes, run eligibility checks, manage pools, and track deals through review and approval
  </Card>

  <Card title="Investor Workflows" href="/workflows/investor-deal-subscription" icon="chart-mixed" iconType="duotone">
    Browse the deal marketplace, allocate to tranches, and monitor portfolio performance in real time
  </Card>

  <Card title="Event-Driven Integrations" href="/workflows/webhooks" icon="webhook" iconType="duotone">
    React to platform events — deal approvals, trade settlements, SC completions — via webhooks
  </Card>

  <Card title="Analytics & Reporting" href="/workflows/alm-analytics" icon="wave-pulse" iconType="duotone">
    Run ALM analysis including duration, convexity, NII sensitivity, and stress testing on any deal
  </Card>
</CardGroup>

***

## Quickstart

<CardGroup cols={2}>
  <Card title="1. Get a Token" href="/authentication" icon="key" iconType="duotone">
    Contact [support@9squid.com](mailto:support@9squid.com) to obtain your Bearer token. All API requests require it.
  </Card>

  <Card title="2. Create a Deal" href="/workflows/create-a-deal" icon="plus" iconType="duotone">
    Initiate a loan tape upload, push your CSV or XLSX, and submit the deal for review in three API calls
  </Card>

  <Card title="3. Run Selection Criteria" href="/workflows/run-selection-criteria" icon="filter-list" iconType="duotone">
    Validate your deal against underwriting eligibility rules and inspect any exceptions
  </Card>

  <Card title="4. Explore the Reference" href="/api-reference/originator-loans/loanscontroller_initiateloan" icon="code-simple" iconType="duotone">
    Browse all \~40 endpoints with full request schemas, response shapes, and live try-it-out
  </Card>
</CardGroup>

***

## Recipes

Step-by-step guides for common integration patterns.

<CardGroup cols={2}>
  <Card title="Create a Deal" href="/recipes/create-a-deal" icon="file-arrow-up" iconType="duotone">
    Initiate → Upload → Complete. Full originator loan tape submission flow with status lifecycle
  </Card>

  <Card title="Run Selection Criteria" href="/recipes/run-selection-criteria" icon="filter-list" iconType="duotone">
    Trigger an eligibility run, fetch results per deal, and drill into exception detail
  </Card>

  <Card title="Bulk Loan Upload" href="/recipes/bulk-loan-upload" icon="files" iconType="duotone">
    Submit multiple loan tapes in one job — per-deal upload URLs with independent status tracking
  </Card>

  <Card title="ALM Analytics" href="/recipes/alm-analytics" icon="wave-pulse" iconType="duotone">
    Run duration, convexity, NII sensitivity, EVE, VaR, and stress tests on any deal
  </Card>

  <Card title="Pool Analytics" href="/recipes/pool-analytics" icon="chart-bar" iconType="duotone">
    Inspect aggregate pool statistics — weighted averages, delinquency breakdown, geographic distribution
  </Card>

  <Card title="Investor Deal Subscription" href="/recipes/investor-deal-subscription" icon="handshake" iconType="duotone">
    Browse the marketplace, submit IOI, commit to a subscription, and track allocation status
  </Card>

  <Card title="Investor Portfolio Reports" href="/recipes/investor-portfolio" icon="chart-mixed" iconType="duotone">
    Fetch current holdings, trade history, tranche performance metrics, and pool analytics
  </Card>

  <Card title="Webhooks" href="/recipes/webhooks" icon="webhook" iconType="duotone">
    Subscribe, verify signatures, replay failed deliveries — full event-driven integration guide
  </Card>
</CardGroup>

***

## Base URL

```
https://api.9squid.com/v1/api
```

| Environment | Base URL                                |
| ----------- | --------------------------------------- |
| Sandbox     | `https://sandbox.api.9squid.com/v1/api` |
| Production  | `https://api.9squid.com/v1/api`         |

***

## Authentication

All requests require a Bearer token in the `Authorization` header.

```http theme={null}
Authorization: Bearer <your_token>
```

To obtain a token, contact [support@9squid.com](mailto:support@9squid.com).

***

## Rate Limits

The API enforces a limit of **100 requests per 60 seconds** per token. Every response includes rate limit headers so you can monitor your usage:

```http theme={null}
x-ratelimit-limit: 100
x-ratelimit-remaining: 87
x-ratelimit-reset: 56
```

| Header                  | Description                                 |
| ----------------------- | ------------------------------------------- |
| `x-ratelimit-limit`     | Total requests allowed per 60-second window |
| `x-ratelimit-remaining` | Requests remaining in the current window    |
| `x-ratelimit-reset`     | Seconds until the current window resets     |

When the limit is exceeded the API returns `429 Too Many Requests` with a `Retry-After` header. Wait for the specified duration before retrying. See the [Error Handling](/error-handling#429-too-many-requests) guide for a retry strategy.

***

## Standard Response Format

Every response — success or error — follows the same envelope.

**Success**

```json theme={null}
{
  "success": true,
  "message": "Operation completed successfully",
  "data": {}
}
```

**Error**

```json theme={null}
{
  "success": false,
  "message": "Descriptive error message",
  "statusCode": 400
}
```

Common status codes:

| Code  | Meaning                                        |
| ----- | ---------------------------------------------- |
| `400` | Bad request — check your request body          |
| `401` | Unauthorized — missing or invalid Bearer token |
| `403` | Forbidden — endpoint is outside your role      |
| `404` | Resource not found                             |
| `500` | Internal server error — contact support        |

***

## Role-Based Access

Your token is scoped to a role. Calling an endpoint outside your role returns `403 Forbidden`.

| Role           | Access                                                                     |
| -------------- | -------------------------------------------------------------------------- |
| **Originator** | Loan management, pools, analytics, selection criteria, deal room documents |
| **Investor**   | Deal marketplace, portfolio, subscriptions, allocations, reports           |
| **Both**       | Alerts, webhooks                                                           |

***

## Recent Releases

<CardGroup cols={3}>
  <Card title="Platform API Gateway" href="/api-reference/originator-loans/loanscontroller_initiateloan" icon="rocket-launch" iconType="duotone">
    Unified entry point for all Originator and Investor workflows — single base URL, consistent response format
  </Card>

  <Card title="Bulk Loan Tape Upload" href="/api-reference/originator-loans/loanscontroller_initiatebulkloan" icon="files" iconType="duotone">
    Submit multiple loan tapes in one job with per-deal upload URLs and independent status tracking
  </Card>

  <Card title="Webhooks" href="/api-reference/webhooks/subscriptionscontroller_create" icon="bullhorn" iconType="duotone">
    Subscribe to real-time platform events — deal updates, loan approvals, trade settlements, SC completions
  </Card>

  <Card title="Investor Portfolio Reports" href="/api-reference/investor-portfolio/portfoliocontroller_getreports" icon="chart-mixed" iconType="duotone">
    Holdings, trade history, tranche performance analytics, and pool metrics in a single endpoint
  </Card>

  <Card title="ALM Analytics" href="/api-reference/originator-analytics/analyticscontroller_runalmanalysis" icon="wave-pulse" iconType="duotone">
    TCT Risk ALM analysis — duration, convexity, NII sensitivity, and stress testing on any deal
  </Card>

  <Card title="Deal Room Documents" href="/api-reference/deal-room-documents/documentscontroller_getuploadurl" icon="folder-open" iconType="duotone">
    Generic document upload supporting W9 forms, with additional document types coming soon
  </Card>
</CardGroup>

***

## Support

* **API access / tokens:** [support@9squid.com](mailto:support@9squid.com)
* **Platform:** [app.9squid.com](https://app.9squid.com)
* **API Reference:** [Platform API Gateway](/api-reference/originator-loans/loanscontroller_initiateloan)
* **Service Status:** [status.9squid.com](https://status.9squid.com)
* **CLI:** [9Squid/cli-releases](https://github.com/9Squid/cli-releases) — see the [9squid CLI](/cli) guide
