sample.env


Overview

The `sample.env` file serves as a template for configuring secret environment variables required by the application. It lists key placeholders for API keys and secrets that the system uses to authenticate and interact with various third-party services such as Elliptic, CoinGecko, Zerion, and 0x (ZRX). This file is **not** meant to contain actual sensitive information; instead, it provides a clear reference for developers and deployment engineers to know which environment variables must be set in their development, staging, or production environments.


Purpose and Functionality


Environment Variables Listed

Variable Name

Description

Example Usage

`ELLIPTIC_API_KEY`

API key to authenticate requests with the Elliptic service.

Used to fetch blockchain analytics data.

`ELLIPTIC_API_SECRET`

Secret key paired with the Elliptic API key for secure access.

Used alongside the API key to sign requests.

`COINGECKO_API_KEY`

API key for accessing CoinGecko's cryptocurrency data APIs.

Enables fetching of market data, price info etc.

`ZERION_API_KEY`

API key to interact with Zerion's portfolio and DeFi APIs.

Used to retrieve portfolio balances and DeFi data.

`ZRX_API_KEY`

API key for the 0x protocol services.

Used to submit and query decentralized exchange orders.


Usage Instructions

  1. Copy the file:
    Copy sample.env to .env in the root of your project directory.

  2. Fill in your credentials:
    Replace the empty values with your actual API keys and secrets:

    ELLIPTIC_API_KEY=your_elliptic_api_key_here
    ELLIPTIC_API_SECRET=your_elliptic_api_secret_here
    COINGECKO_API_KEY=your_coingecko_api_key_here
    ZERION_API_KEY=your_zerion_api_key_here
    ZRX_API_KEY=your_zrx_api_key_here
    
  3. Load environment variables:
    Use environment variable loading libraries (e.g., dotenv in Node.js or Python) to make these available to the application at runtime.

  4. Do not commit .env:
    Ensure .env is included in .gitignore or other VCS ignore files to prevent leaking secrets.


Implementation Details


Interaction with the System


Visual Diagram

The diagram below shows the role of `sample.env` within the application’s configuration and API interaction flow:

flowchart TD
    A[sample.env (Template)] --> B[Developer Copies to .env]
    B --> C[Application Loads Env Variables]
    C --> D[API Clients Initialized]
    D --> E[External APIs]
    E --> F[Elliptic, CoinGecko, Zerion, 0x Services]

    style A fill:#f9f,stroke:#333,stroke-width:1px
    style B fill:#bbf,stroke:#333,stroke-width:1px
    style C fill:#afa,stroke:#333,stroke-width:1px
    style D fill:#ffd,stroke:#333,stroke-width:1px
    style E fill:#fcc,stroke:#333,stroke-width:1px
    style F fill:#cfc,stroke:#333,stroke-width:1px

Summary


Additional Notes