The Accounts API allows you to create, retrieve, update, and delete investor accounts. These endpoints are part of the DeepAlpha API and require authentication.

📋 Authentication

All endpoints require JWT authentication. The API uses JWT tokens for secure authentication. For detailed information on how to obtain and use JWT tokens, please refer to the Public API Authentication.

As described in the document about authentication, include your issued JWT token in the request headers:

Authorization: Bearer eyJ...

🌐 Base URL

There are two public-facing environments available:

Examples below will be referring to QA - just replace the URL if needed to use the production environment.

📚 Endpoints

  1. List All Investor Accounts

    GET /v1/investor/{investor_id}/accounts

    Retrieves a list of all accounts for a specific investor.

    Path Parameters:

    Response:

    Example Request:

    curl -X GET "<https://api.qa.deepalpha.app/v1/investor/{investor_id}/accounts>" -H "Authorization: Bearer YOUR_API_TOKEN"
    
  2. Create Account

    POST /v1/investor/{investor_id}/accounts

    Creates a new account for a specific investor. Only one account can be created per request.

    Path Parameters:

    Request Body:

    {
      "accountName": "Main Investment Account",
      "accountNumber": "ACC-12345",
      "cashAmount": 10000.00,
      "country": "NO",
      "currency": "NOK",
      "investorId": "uuid-of-investor",
      "monthlyDeposit": 500.00,
      "type": "investment",
      "vendor": "your-vendor",
      "vendorId": "vendor-ref-123",
      "positions": []
    }
    

    Response:

    Example Request:

    curl -X POST "<https://api.qa.deepalpha.app/v1/investor/{investor_id}/accounts>" -H "Authorization: Bearer eyJ..." -H "Content-Type: application/json" -d '{"accountNumber": "ACC-12345", "cashAmount": 10000, ...}'
    
  3. Get Account Details

    GET /v1/investor/{investor_id}/account/{account_id}

    Retrieves the details of a specific account by its UUID.

    Path Parameters:

    Response:

    Example Request:

    curl -X GET "<https://api.qa.deepalpha.app/v1/investor/{investor_id}/account/{account_id}>" -H "Authorization: Bearer YOUR_API_TOKEN"