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

# Start risk analysis

> Starts an asynchronous risk analysis for a wallet address on a specific chain and date range.

> [!NOTE]
>
> This endpoint starts an asynchronous analysis job. The response includes a `jobId` that you must poll to retrieve the results.

## Polling for results

After starting an analysis, poll the [Get risk analysis result](https://docs.wavynode.com/api-reference/endpoint/get-risk-result.md) endpoint with the `jobId` to check for completion:

```javascript theme={null}
const jobId = "abc123...";

async function pollResult(jobId) {
  while (true) {
    const res = await fetch(`https://api.wavynode.com/v1/risk/${jobId}`, {
      headers: { "x-api-key": "ApiKey wavy_..." }
    });
    const { data } = await res.json();

    if (data.status === "completed") return data.result;
    if (data.status === "failed") throw new Error(data.error);
    await new Promise(r => setTimeout(r, 1000));
  }
}
```

## Related resources

> [card] [Quick risk](https://docs.wavynode.com/api-reference/endpoint/get-risk-quick.md)
>
> Synchronous risk check for fast single-address analysis.

> [card] [Get risk result](https://docs.wavynode.com/api-reference/endpoint/get-risk-result.md)
>
> Poll for the result of an async risk analysis job.

> [card] [Risk scores](https://docs.wavynode.com/concepts/risk.md)
>
> Learn how risk scores are calculated and interpreted.


## OpenAPI

````yaml POST /risk
openapi: 3.1.0
info:
  title: Wavy Node API
  description: >-
    Compliance, fraud prevention, and risk analysis API for payment providers
    and cryptocurrency exchanges in Latin America.
  version: 1.0.0
  contact:
    name: Wavy Node Support
    email: support@wavynode.com
servers:
  - url: https://api.wavynode.com/v1
    description: Production
security:
  - apiKeyAuth: []
paths:
  /risk:
    post:
      tags:
        - Risk Analysis
      summary: Start risk analysis
      description: >-
        Starts an asynchronous risk analysis for a wallet address on a specific
        chain and date range. Returns a job ID to poll for results.
      operationId: startRiskAnalysis
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - address
                - fromDate
                - toDate
                - chainId
              properties:
                address:
                  type: string
                  description: The EVM wallet address to analyze
                fromDate:
                  type: string
                  description: Start date for the analysis window
                toDate:
                  type: string
                  description: End date for the analysis window
                chainId:
                  type: integer
                  description: Blockchain chain ID
      responses:
        '200':
          description: Risk analysis job started
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      jobId:
                        type: string
                        description: Job ID to poll for results
        '400':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          description: Error code
        message:
          type: string
          description: Error description
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Enter the full value with the `ApiKey` prefix. Example: `ApiKey
        wavy_your-api-key`. The prefix is required for authentication.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.