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

# Your swaps, newest first

> Every swap built through one of your keys, newest first, with its status (BUILT, SUBMITTED, CONFIRMED, FAILED, EXPIRED), the pair, the input amount and which key built it. No fee, share or revenue figure is ever on this response; your earnings are GET /api/partner/earnings.

**Live alerts.** Poll every 15 seconds (the response is cacheable for that long) with `updatedSince` set to the newest `updatedAt` you have already seen. You get back only the swaps that changed since then, in every status. Keep the latest row per `swapId` and react to the ones whose status became CONFIRMED (or SUBMITTED, if you want to announce earlier). `swapId` is null while a swap is only BUILT, because the wallet has not submitted a transaction yet.

**Recovering after downtime.** Call with `updatedSince` set to the last `updatedAt` you stored before the outage and page through `nextCursor` until it is null. The filter is inclusive, so the boundary row is delivered again; that is the same upsert by `swapId` as above. Nothing is lost: a swap that changed status while you were down carries the later `updatedAt` and is returned.

**Browsing history.** Omit `updatedSince` and page with `cursor`. Pages are newest first and `nextCursor` walks towards older swaps; it is opaque, pass it back unchanged.

Times are ISO-8601 instants in UTC. Amounts are integer strings in the input token's base units (lovelace for ADA). Callable with a browser session or an ordinary API key; a public partner key is refused, because a key that lives in a web page must not enumerate your swaps.



## OpenAPI

````yaml https://nexus.gerowallet.io/v3/api-docs get /api/partner/swaps
openapi: 3.1.0
info:
  title: Nexus API
  description: >-
    Multi-chain blockchain data API for Cardano (and Apex), Bitcoin, and
    Midnight.


    ## Blockchains & Networks

    Endpoints are grouped by **blockchain**. Pick the target **network** with
    the

    `network` query parameter. A network is an environment *within* a
    blockchain,

    not a separate endpoint family.


    - **Cardano & Apex**: one shared set of UTxO endpoints serves
    `CARDANO_MAINNET`,
      `CARDANO_PREPROD`, `CARDANO_PREVIEW`, `APEX_PRIME_MAINNET`, `APEX_VECTOR_MAINNET`,
      `APEX_VECTOR_TESTNET`
    - **Bitcoin**: `BITCOIN_MAINNET`, `BITCOIN_TESTNET4`

    - **Midnight**: `MIDNIGHT_MAINNET`, `MIDNIGHT_PREPROD`, `MIDNIGHT_STAGENET`


    These are the values published on each operation's `network` schema, and
    what

    generated clients send. A kebab-case alias (`cardano-mainnet`) is also
    accepted,

    and matching is case-insensitive — see the note on the parameter itself.


    ### Key scope: one chain, one network

    Each API key is scoped to **one chain and one network**, fixed at creation
    time.

    A `CARDANO_MAINNET` key cannot query `CARDANO_PREPROD`, and it cannot query

    Bitcoin or Midnight at all. Create one key per chain and network under the
    same

    account. Sending a `network` value that does not match the key returns

    **400 Network Mismatch**; omit the parameter and the request runs against
    the

    key's own network.


    What is uniform across chains is the integration surface, not the
    credential:

    one account, one base URL, one auth header, one docs site.


    ## Authentication

    Send your API key in the `X-Api-Key` header. This is the credential for

    programmatic access (create one in the dashboard; keys start with `nxs_`).

    `Authorization: Bearer <token>` is only for JWT **session** tokens issued by

    `/api/auth/login` (browser/mobile apps), not for API keys.


    ## Add-ons

    Capability is gated separately from network scope. Market data, wallet
    analytics,

    transaction building, MCP, and IPFS are paid add-ons; those endpoints return

    **402 Payment Required** on a key whose plan does not carry the matching
    add-on,

    even when the chain and network match.
  contact:
    name: Nexus Team
    url: https://nexus.gerowallet.io/support
    email: nexus@gerowallet.io
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
servers:
  - url: https://nexus.gerowallet.io
    description: API Server
security:
  - apiKeyAuth: []
  - bearerAuth: []
tags:
  - name: Cardano · Blocks
    description: Cardano Block API
  - name: Cardano · Policy
    description: Cardano Policy API
  - name: IPFS
    description: IPFS Content Resolution API
  - name: Bitcoin · Ordinals
    description: Ordinals + runes metadata (ord indexer)
  - name: Partner
    description: Aggregator revenue share for partner key holders
  - name: Cardano · Metadata
    description: Label-scoped transaction metadata API
  - name: Cardano · Assets
    description: Token Registry Metadata
  - name: Cardano · Transactions
    description: Cardano Transactions API
  - name: Midnight · Transactions
    description: Midnight-specific transaction endpoints (unshielded UTXOs)
  - name: Bitcoin · Mempool
    description: Bitcoin mempool snapshot
  - name: Midnight · DUST
    description: DUST registration + generation status
  - name: Cardano · Stake Pools
    description: >-
      Cardano stake pool information including registrations, retirements, and
      pool metadata
  - name: Cardano · Network
    description: Cardano Network API - Query static network / genesis parameters
  - name: Cardano · Addresses
    description: Cardano Address API
  - name: Bitcoin · Addresses
    description: >-
      Bitcoin address-keyed queries: stats / balance / UTxOs via electrs;
      ordinals via ord
  - name: Bitcoin · Transactions
    description: Bitcoin transaction lookup and submission
  - name: Cardano · Governance
    description: >-
      Cardano on-chain governance: DReps, governance actions + votes,
      constitutional committee, constitution
  - name: Cardano · DReps
    description: >-
      Cardano delegate representatives (DReps): voting power, status, metadata,
      delegators
  - name: Cardano · Transaction Builder
    description: >-
      Cardano transaction building API. Builds unsigned transactions server-side
      for client-side signing and submission. Network can be specified in the
      request body or as a query parameter. Body takes precedence over query
      parameter.
  - name: Cardano · Assets
    description: Cardano Asset API
  - name: Cardano · Accounts
    description: Cardano Account API
  - name: Bitcoin · Fees
    description: Bitcoin fee-rate estimates by confirmation block target
  - name: Bitcoin · Blocks
    description: Bitcoin block lookup
  - name: Cardano · Handles
    description: ADA Handle resolution
  - name: Cardano Market Data
    description: Endpoints from cardano-market-data
  - name: Midnight · Indexer
    description: Transparent proxy to the Midnight GraphQL indexer
  - name: Cardano · Scripts
    description: Cardano script & datum API
  - name: Cardano · Epochs
    description: Cardano Epoch API - Query protocol parameters and epoch information
  - name: Bitcoin · Chain
    description: Bitcoin chain-tip and sync state
paths:
  /api/partner/swaps:
    get:
      tags:
        - Partner
      summary: Your swaps, newest first
      description: >-
        Every swap built through one of your keys, newest first, with its status
        (BUILT, SUBMITTED, CONFIRMED, FAILED, EXPIRED), the pair, the input
        amount and which key built it. No fee, share or revenue figure is ever
        on this response; your earnings are GET /api/partner/earnings.


        **Live alerts.** Poll every 15 seconds (the response is cacheable for
        that long) with `updatedSince` set to the newest `updatedAt` you have
        already seen. You get back only the swaps that changed since then, in
        every status. Keep the latest row per `swapId` and react to the ones
        whose status became CONFIRMED (or SUBMITTED, if you want to announce
        earlier). `swapId` is null while a swap is only BUILT, because the
        wallet has not submitted a transaction yet.


        **Recovering after downtime.** Call with `updatedSince` set to the last
        `updatedAt` you stored before the outage and page through `nextCursor`
        until it is null. The filter is inclusive, so the boundary row is
        delivered again; that is the same upsert by `swapId` as above. Nothing
        is lost: a swap that changed status while you were down carries the
        later `updatedAt` and is returned.


        **Browsing history.** Omit `updatedSince` and page with `cursor`. Pages
        are newest first and `nextCursor` walks towards older swaps; it is
        opaque, pass it back unchanged.


        Times are ISO-8601 instants in UTC. Amounts are integer strings in the
        input token's base units (lovelace for ADA). Callable with a browser
        session or an ordinary API key; a public partner key is refused, because
        a key that lives in a web page must not enumerate your swaps.
      operationId: swaps
      parameters:
        - name: updatedSince
          in: query
          description: >-
            Only swaps whose last status change is at or after this ISO-8601
            instant. Set it to the newest updatedAt you have seen; the boundary
            row is delivered again.
          required: false
          schema:
            type: string
            default: ''
          example: '2026-09-17T10:00:00Z'
        - name: cursor
          in: query
          description: >-
            The nextCursor of the previous page, unchanged. Omit for the newest
            page.
          required: false
          schema:
            type: string
            default: ''
        - name: limit
          in: query
          description: Rows per page, 1 to 200. Default 50.
          required: false
          schema:
            type: string
            default: ''
          example: 50
      responses:
        '200':
          description: A page of your swaps, newest first
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PartnerSwapsResponse'
        '400':
          description: Malformed updatedSince, cursor or limit
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PartnerSwapsResponse'
        '401':
          description: No session or API key
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PartnerSwapsResponse'
        '403':
          description: Called with a public partner key
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PartnerSwapsResponse'
        '503':
          description: >-
            The swap engine cannot be reached (errorCode
            AGGREGATOR_METRICS_UNAVAILABLE). Retry; never treat it as an empty
            list
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PartnerSwapsResponse'
components:
  schemas:
    PartnerSwapsResponse:
      type: object
      default: null
      description: A page of your swaps, newest first.
      properties:
        swaps:
          type: array
          items:
            $ref: '#/components/schemas/PartnerSwapEvent'
        nextCursor:
          type: string
          default: ''
          description: Opaque cursor for the next (older) page, or null on the last page.
    PartnerSwapEvent:
      type: object
      default: null
      description: >-
        One swap built through one of your keys. No fee, share or revenue field
        is ever present here.
      properties:
        swapId:
          type: string
          default: ''
          description: >-
            Identity for deduplication across polls: the transaction hash. Null
            while the swap is only BUILT. Keep the latest row per swapId.
        txHash:
          type: string
          default: ''
          description: Transaction hash, null until the wallet submitted.
        status:
          type: string
          default: ''
          description: BUILT, SUBMITTED, CONFIRMED, FAILED or EXPIRED.
          example: CONFIRMED
        createdAt:
          type: string
          format: date-time
          default: ''
          description: When the transaction was built.
        updatedAt:
          type: string
          format: date-time
          default: ''
          description: >-
            The last status change. Poll with updatedSince set to the newest
            value you have seen.
        confirmedAt:
          type: string
          format: date-time
          default: ''
          description: Set once the status is CONFIRMED.
        dex:
          type: string
          default: ''
          description: The venue the swap was routed to.
          example: MINSWAP_V2
        tokenIn:
          $ref: '#/components/schemas/PartnerSwapTokenRef'
        tokenOut:
          $ref: '#/components/schemas/PartnerSwapTokenRef'
        amountIn:
          type: string
          default: ''
          description: >-
            Input amount as an integer string in tokenIn's base units (lovelace
            for ADA).
          example: '250000000'
        keyPrefix:
          type: string
          default: ''
          description: Which of your keys built the swap.
          example: nxs_uSU6Eiod
    PartnerSwapTokenRef:
      type: object
      default: null
      description: >-
        One side of a swap: the token unit, plus its ticker and name when the
        token registry knows them.
      properties:
        unit:
          type: string
          default: ''
          description: 'Token unit: ''lovelace'' for ADA, otherwise policyId + assetNameHex.'
          example: 279c909f348e533da5808898f87f9a14bb2c3dfbbacccd631d927a3f534e454b
        ticker:
          type: string
          default: ''
          description: Registry ticker, or null when the registry does not know the unit.
          example: SNEK
        name:
          type: string
          default: ''
          description: Registry name, or null when the registry does not know the unit.
          example: Snek
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      description: >-
        ### API key (programmatic access — recommended)

        Send your API key in the `X-Api-Key` header. Keys start with `nxs_` and
        are

        created in the dashboard (or via **POST /api/keys** with a session JWT).


        Each key is scoped to **one chain and one network** (for example

        `CARDANO_MAINNET`), fixed at creation time. It cannot query a different
        network

        on the same chain, and it cannot query a different chain at all. A
        mismatched

        `network` parameter returns **400 Network Mismatch**. Create one key per
        chain

        and network under the same account.


        This is the credential most integrations should use.
      name: X-Api-Key
      in: header
    bearerAuth:
      type: http
      description: >-
        ### JWT session token (browser / mobile apps)

        A short-lived JWT issued by `/api/auth/login` or `/api/auth/device`,
        sent as

        `Authorization: Bearer <token>`. This is the **session** credential for
        the web

        dashboard and mobile apps, not for server-to-server API access.


        For programmatic API access use an **API key** in the `X-Api-Key` header

        instead — do **not** put an `nxs_` API key in this Bearer field.
      scheme: bearer
      bearerFormat: JWT

````