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

# Get Flows by Chain (Netflow, Inflow, or Outflow)

> Returns chain-level inflows, outflows, or netflows for a set of source chains over a date range. Use `flowType` to select which view: `inflow` (capital entering each chain), `outflow` (capital leaving), or `netflow` (the difference). Chain identifiers should match the full chain names from [List Supported Assets](/docs/api-reference/core-artemis-assets/list-supported-assets).




## OpenAPI

````yaml /openapi.documented.json get /flows/top/
openapi: 3.1.0
info:
  title: Artemis API
  version: 1.0.0
  description: >
    Enterprise API for Artemis metrics, stablecoins, and flows.


    ## Authentication


    All endpoints authenticate via an API key. The simplest pattern when using
    the Python SDK is to set the `ARTEMIS_API_KEY` environment variable — the
    SDK will pick it up automatically:


    ```bash

    export ARTEMIS_API_KEY="your-key-here"

    ```


    ```python

    from artemis import Artemis

    client = Artemis()  # reads ARTEMIS_API_KEY from env

    ```


    Endpoints under `/data/api/*` and `/flows/top/` also accept the key as an
    `APIKey` query parameter — the snippets below pass
    `api_key=os.environ["ARTEMIS_API_KEY"]` to populate it explicitly.
servers:
  - url: https://data-svc.artemisxyz.com
security: []
tags:
  - name: Core Artemis Assets
    description: Endpoints for general asset data
  - name: Stablecoins
    description: Endpoints for stablecoin-specific metrics
  - name: Flows
    description: Endpoints for inflows, outflows, and netflows
  - name: Equities
    description: >
      Typed convenience endpoints for equity coverage, scoped to metrics that
      are **comparable across equities** (valuation ratios, core P&L line items,
      price). Symbols are prefixed with `eq-` — e.g. `eq-nvda`, `eq-meta`,
      `eq-coin`. Discover valid symbols via [List Supported
      Assets](#tag/Core-Artemis-Assets/operation/listAssetSymbols).


      Three methods:


      - [`fetch_price`](#tag/Equities/operation/fetchEquityPrice) — daily
      closing price

      - [`fetch_financials`](#tag/Equities/operation/fetchEquityFinancials) — 7
      quarterly P&L line items (Revenue, Net Income, EBITDA, Operating Income,
      FCF, Basic EPS, Diluted EPS)

      -
      [`fetch_valuation_metrics`](#tag/Equities/operation/fetchEquityValuationMetrics)
      — 7 valuation ratios (EV/Revenue, EV/Earnings, EV/EBITDA, EV/FCF, P/FCF,
      Earnings Yield, FCF Yield)


      **The long tail lives elsewhere.** Artemis tracks many more equity metrics
      under the hood — company-specific KPIs (Trading Volume for COIN, DAP/ARPP
      for META, Data Center Revenue for NVDA), regional breakdowns,
      segment-level revenue, and so on. Discover what's available for a given
      symbol via [List Available
      Metrics](#tag/Core-Artemis-Assets/operation/listSupportedMetrics), then
      query via the generic [Fetch
      Metrics](#tag/Core-Artemis-Assets/operation/fetchMetrics) endpoint.
  - name: Insights
    description: >
      Pre-computed insight cards across Artemis's coverage — "asset X's metric Y
      hit a new all-time high", growth streaks, decline streaks, and
      accelerating trends. Each endpoint returns a feed of cards covering crypto
      protocols, stablecoins, and equities in one response. This is the same
      data rendered on [artemis.ai/insights](https://www.artemis.ai/insights).


      Five card-producing endpoints, all parameterless `GET`s:


      - [`list_all_time_highs`](#tag/Insights/operation/listAthInsights) — new
      ATH events

      - [`list_all_time_lows`](#tag/Insights/operation/listAtlInsights) — new
      ATL events

      - [`list_growth_streaks`](#tag/Insights/operation/listStreakInsights) — N
      consecutive periods of growth

      -
      [`list_decline_streaks`](#tag/Insights/operation/listDeclineStreakInsights)
      — N consecutive periods of decline

      -
      [`list_acceleration_signals`](#tag/Insights/operation/listAccelerationInsights)
      — rate of change itself accelerating


      **Caching.** Each endpoint is cached server-side for one hour. The first
      call after cache expiry can take up to a minute as the underlying
      Snowflake query runs; subsequent calls within the hour are sub-second.
paths:
  /flows/top/:
    get:
      tags:
        - Flows
      summary: Get Flows by Chain (Netflow, Inflow, or Outflow)
      description: >
        Returns chain-level inflows, outflows, or netflows for a set of source
        chains over a date range. Use `flowType` to select which view: `inflow`
        (capital entering each chain), `outflow` (capital leaving), or `netflow`
        (the difference). Chain identifiers should match the full chain names
        from [List Supported
        Assets](/docs/api-reference/core-artemis-assets/list-supported-assets).
      operationId: getFlows
      parameters:
        - in: query
          name: startDate
          schema:
            type: string
            format: date
          required: true
          description: Start date in YYYY-MM-DD format
          example: '2026-01-01'
        - in: query
          name: endDate
          schema:
            type: string
            format: date
          required: true
          description: End date in YYYY-MM-DD format
          example: '2026-02-01'
        - $ref: '#/components/parameters/Granularity'
        - in: query
          name: sourceChains
          schema:
            type: string
          required: true
          description: >-
            Comma-separated list of blockchain identifiers. Use full chain names
            for best compatibility.
          example: >-
            aptos,arbitrum,avalanche,base,berachain,bitcoin,blast,bsc,celo,ethereum,hyperliquid,injective,ink,linea,mantle,near,optimism,polygon,sei,solana,sonic,starknet,sui,unichain,worldchain,zksync
        - in: query
          name: breakdown
          schema:
            type: string
            enum:
              - chains
          required: true
          description: Breakdown type for the flow data
          example: chains
        - in: query
          name: flowType
          schema:
            type: string
            enum:
              - netflow
              - inflow
              - outflow
          required: true
          description: Type of flow to retrieve
          example: netflow
        - in: query
          name: limit
          schema:
            type: integer
            default: 20
          description: >-
            Optional parameter. May cause issues with certain sourceChains
            combinations.
          example: 20
        - in: query
          name: APIKey
          schema:
            type: string
          required: true
          description: Your Artemis API key
      responses:
        '200':
          description: Flows data based on flowType parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowsResponse'
              example:
                inflow:
                  ethereum: 88869217.4
                  arbitrum: 79059259.03
                  base: 35071676.44
                netflow:
                  ethereum: -20650296.17
                  arbitrum: -5265571.05
                  base: 25915867.22
                outflow:
                  ethereum: 109519513.58
                  arbitrum: 84324830.08
                  base: 9155809.21
      x-codeSamples:
        - lang: python
          source: |
            import os
            from datetime import date
            from artemis import Artemis

            client = Artemis()
            response = client.flow.get_top(
                api_key=os.environ["ARTEMIS_API_KEY"],
                breakdown="chains",
                end_date=date(2026, 2, 1),
                flow_type="netflow",
                source_chains="ethereum,arbitrum,base",
                start_date=date(2026, 1, 1),
            )
            print(response.netflow)
components:
  parameters:
    Granularity:
      name: granularity
      in: query
      description: Time-bucket granularity for returned series.
      schema:
        type: string
        enum:
          - DAY
          - WEEK
          - MONTH
          - QUARTER
          - YEAR
        default: DAY
  schemas:
    FlowsResponse:
      type: object
      properties:
        netflow:
          $ref: '#/components/schemas/FlowsChainData'
        inflow:
          $ref: '#/components/schemas/FlowsChainData'
        outflow:
          $ref: '#/components/schemas/FlowsChainData'
      description: >-
        Response containing flow data by chain. Properties present depend on
        flowType parameter.
    FlowsChainData:
      type: object
      additionalProperties:
        type: number
      description: Object where keys are chain names and values are flow amounts

````