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

# Get Exchange Transactions

> Get transaction data for a specific exchange by portfolioId.

<Note>**4** credits per request</Note><hr />
<Info> Make sure the exchange is synced first by calling [PATCH /sync](/openapi/exchange-sync-status) for up to date infromation.</Info>

<Accordion title="Required">
  * portfolioId: Identifier of an exchange portfolio you have connected.
  * Exchange must be synced first via PATCH /exchange/sync.
</Accordion>

<Accordion title="Optional">
  * page & limit: Control pagination of the transaction list.
  * coinId: Filter transactions by coin.
</Accordion>


## OpenAPI

````yaml /api-reference/openapi.json get /v1/exchange/transactions
openapi: 3.0.0
info:
  title: CoinStats Public API
  description: >-
    CoinStats Public API — programmatic access to market data, news, NFTs,
    wallets, exchange connections, and user portfolios. Authenticate every
    request with the `X-API-KEY` header (or an OAuth Bearer token in the
    `Authorization` header). Generate keys at https://openapi.coinstats.app.
  version: '1.0'
  contact: {}
servers:
  - url: https://openapiv1.coinstats.app
security: []
tags:
  - name: CoinStats
    description: ''
  - name: Market Data
    description: >-
      The Market Data section of the API provides endpoints to access a wide
      range of market-related information, including cryptocurrency coins,
      ticker data, and fiat currency rates. This category offers comprehensive
      data to help users monitor and analyze the cryptocurrency market, track
      prices, and gain insights into market trends
  - name: News
    description: >-
      The News section of the API allows you to access news articles and updates
      related to cryptocurrencies and the blockchain industry. It provides
      valuable information from various sources to keep you informed about the
      latest developments
  - name: NFTs
    description: >-
      The NFT section of the API provides endpoints to interact with
      Non-Fungible Tokens (NFTs), which are unique digital assets stored on a
      blockchain. These endpoints allow you to retrieve information about NFTs,
      including collections, assets, trending NFTs, and specific assets
      associated with wallet addresses.
  - name: Wallet Data
    description: >-
      The Wallet section of the API provides a comprehensive set of endpoints to
      manage and interact with wallets. It enables users to retrieve wallet
      balances, monitor syncing status, fetch transaction data, and synchronize
      wallet information with the blockchain. By integrating these endpoints
      into your application, you can offer robust wallet functionality to your
      users.
  - name: Exchange Connection
    description: >-
      The Exchange Connection section of the API provides a comprehensive set of
      endpoints to manage and interact with exchanges. It enables users to
      retrieve exchange balances, monitor syncing status, fetch transaction
      data. By integrating these endpoints into your application, you can offer
      robust exchange portfolio tracking functionality to your users.
  - name: User Portfolio
    description: >-
      The Portfolio section of the API provides a comprehensive set of endpoints
      to manage and interact with Share Portfolios. It enables users to retrieve
      current Portfolio Coins and Transactions.
  - name: Usage
    description: The Usage section provides account-level API usage data.
  - name: Status
    description: The Status section provides API availability checks.
paths:
  /v1/exchange/transactions:
    get:
      tags:
        - Exchange Connection
      summary: Get transaction data for a specific exchange by portfolioId.
      operationId: get-exchange-transactions
      parameters:
        - name: page
          required: false
          in: query
          description: Page number to retrieve (1-based indexing)
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items to return per page
          schema:
            example: 20
            type: number
        - name: from
          required: false
          in: query
          description: Please include the date in ISO 8601 format
          schema:
            format: date-time
            example: '2026-06-19T05:47:13.351Z'
            type: string
        - name: to
          required: false
          in: query
          description: Please include the date in ISO 8601 format
          schema:
            format: date-time
            example: '2026-06-20T07:47:13.351Z'
            type: string
        - name: currency
          required: false
          in: query
          schema:
            example: USD
            type: string
        - name: types
          required: false
          in: query
          description: >-
            Comma separated values of
            (deposit,withdraw,approve,executed,balance,fee)
          schema:
            type: string
        - name: portfolioId
          required: true
          in: query
          description: >-
            The identifier of portfolio, which you received from [Exchange
            Balance](/openapi/get-exchange-balance) response.
          schema:
            example: 618f0bb0f2cf07dce25bc5007750bf1646825509bb63519bd491ab6a56daa419
            type: string
      responses:
        '200':
          description: Get exchange transactions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionResponseDto'
        '400':
          description: Bad Request
          content:
            application/json:
              example:
                statusCode: 400
                message: Bad Request
                requestId: 11111111-2222-3333-4444-555555555555
                path: <requested-endpoint>
        '401':
          description: Unauthorized
          content:
            application/json:
              example:
                statusCode: 401
                message: Unauthorized
                requestId: 11111111-2222-3333-4444-555555555555
                path: <requested-endpoint>
        '403':
          description: Forbidden
          content:
            application/json:
              example:
                statusCode: 403
                message: Forbidden
                requestId: 11111111-2222-3333-4444-555555555555
                path: <requested-endpoint>
        '404':
          description: Not Found
          content:
            application/json:
              example:
                statusCode: 404
                message: Not Found
                requestId: 11111111-2222-3333-4444-555555555555
                path: <requested-endpoint>
        '409':
          description: Conflict (for some endpoints)
          content:
            application/json:
              example:
                statusCode: 409
                message: Transactions not synced
                requestId: 11111111-2222-3333-4444-555555555555
                path: <requested-endpoint>
        '429':
          description: Too Many Requests
          content:
            application/json:
              example:
                statusCode: 429
                message: Rate limit exceeded
                requestId: 11111111-2222-3333-4444-555555555555
                path: <requested-endpoint>
        '503':
          description: Service Unavailable
          content:
            application/json:
              example:
                statusCode: 503
                message: Service Unavailable. Please Contact Support
      security:
        - X-API-KEY: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://openapiv1.coinstats.app/v1/exchange/transactions?portfolioId=618f0bb0f2cf07dce25bc5007750bf1646825509bb63519bd491ab6a56daa419' \
              --header 'X-API-KEY: <api-key>'
        - lang: python
          label: Python
          source: >-
            import requests


            url =
            "https://openapiv1.coinstats.app/v1/exchange/transactions?portfolioId=618f0bb0f2cf07dce25bc5007750bf1646825509bb63519bd491ab6a56daa419"


            headers = {"X-API-KEY": "<api-key>"}


            response = requests.request("GET", url, headers=headers)


            print(response.json())
        - lang: javascript
          label: JavaScript
          source: >-
            const options = {method: 'GET', headers: {'X-API-KEY':
            '<api-key>'}};


            fetch('https://openapiv1.coinstats.app/v1/exchange/transactions?portfolioId=618f0bb0f2cf07dce25bc5007750bf1646825509bb63519bd491ab6a56daa419',
            options)
              .then((response) => response.json())
              .then((response) => console.log(response))
              .catch((err) => console.error(err));
        - lang: php
          label: PHP
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://openapiv1.coinstats.app/v1/exchange/transactions?portfolioId=618f0bb0f2cf07dce25bc5007750bf1646825509bb63519bd491ab6a56daa419",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => [
                "X-API-KEY: <api-key>"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\turl := \"https://openapiv1.coinstats.app/v1/exchange/transactions?portfolioId=618f0bb0f2cf07dce25bc5007750bf1646825509bb63519bd491ab6a56daa419\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"X-API-KEY\", \"<api-key>\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n}"
        - lang: java
          label: Java
          source: >-
            HttpResponse<String> response =
            Unirest.get("https://openapiv1.coinstats.app/v1/exchange/transactions?portfolioId=618f0bb0f2cf07dce25bc5007750bf1646825509bb63519bd491ab6a56daa419")
              .header("X-API-KEY", "<api-key>")
              .asString();
components:
  schemas:
    TransactionResponseDto:
      type: object
      properties:
        meta:
          description: >-
            Pagination metadata including total count and current page
            information
          example:
            page: 1
            limit: 10
          allOf:
            - $ref: '#/components/schemas/PageMetaSimpleDto'
        result:
          description: Array of transaction records
          example:
            - type: Sent
              date: '2025-06-07T11:58:11.000Z'
              mainContent:
                coinIcons:
                  - https://static.coinstats.app/coins/1650455629727.png
                coinAssets: []
              coinData:
                count: -0.00636637
                symbol: ETH
                currentValue: 29.21596436513665
              profitLoss:
                profit: -13.414468590167441
                profitPercent: -84.44241338814263
                currentValue: 29.21596436513665
              transactions:
                - action: Sent
                  items:
                    - id: >-
                        publicApi_0_0x3f1A9B2c5E4C7d9F8E23bC19A8A6c77B10e62E5dGROUP436a0bddwithdraw
                      count: -0.00636637
                      totalWorth: 15.88593699768782
                      coin:
                        id: ethereum
                        name: Ethereum
                        symbol: ETH
                        icon: https://static.coinstats.app/coins/1650455629727.png
              fee:
                coin:
                  id: ethereum
                  name: Ethereum
                  symbol: ETH
                  icon: https://static.coinstats.app/coins/1650455629727.png
                count: 0.000033840249219
                totalWorth: 0.08444122271861178
              hash:
                id: >-
                  0xc969639a5c08179c32326b5d9e8bb73f34beeb5566b7e7a6a411d38ee4c77ba4
                explorerUrl: >-
                  https://etherscan.io/tx/0xc969639a5c08179c32326b5d9e8bb73f34beeb5566b7e7a6a411d38ee4c77ba4
          type: array
          items:
            $ref: '#/components/schemas/TransactionDto'
      required:
        - meta
        - result
    PageMetaSimpleDto:
      type: object
      properties:
        page:
          type: number
          description: The current page number
          example: 1
        limit:
          type: number
          description: The number of items per page
          example: 10
      required:
        - page
        - limit
    TransactionDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - deposit
            - withdraw
            - approve
            - executed
            - balance
            - fee
          description: Type of transaction (e.g., Sent, Received, Swap)
          example: Sent
        date:
          format: date-time
          type: string
          description: Timestamp of the transaction
          example: '2025-06-07T11:58:11.000Z'
        mainContent:
          description: Visual content related to the transaction
          allOf:
            - $ref: '#/components/schemas/TransactionMainContent'
        coinData:
          description: >-
            Aggregated coin data for the transaction. Only present if
            transaction involves cryptocurrencies.
          allOf:
            - $ref: '#/components/schemas/TransactionCoinData'
        profitLoss:
          description: >-
            Profit/loss information for the transaction. Only present if
            transaction involves cryptocurrencies.
          allOf:
            - $ref: '#/components/schemas/TransactionProfitLoss'
        transactions:
          description: Detailed breakdown of the transaction components
          type: array
          items:
            $ref: '#/components/schemas/Transaction'
        fee:
          description: Transaction fee details if applicable
          allOf:
            - $ref: '#/components/schemas/TransactionFee'
        hash:
          description: Blockchain transaction details if applicable
          allOf:
            - $ref: '#/components/schemas/TransactionHash'
      required:
        - type
        - date
        - mainContent
        - transactions
    TransactionMainContent:
      type: object
      properties:
        coinIcons:
          description: Array of coin icons URLs involved in the transaction
          example:
            - https://static.coinstats.app/coins/1650455629727.png
          type: array
          items:
            type: string
        coinAssets:
          description: Array of NFT asset URLs involved in the transaction
          example: []
          type: array
          items:
            type: string
      required:
        - coinIcons
        - coinAssets
    TransactionCoinData:
      type: object
      properties:
        count:
          type: number
          description: >-
            The amount of coins involved in the transaction (negative for
            outgoing)
          example: -0.00636637
        symbol:
          type: string
          description: The symbol of the coin
          example: ETH
        currentValue:
          type: number
          description: Current value of the transaction in the selected currency
          example: 29.21596436513665
      required:
        - count
        - symbol
        - currentValue
    TransactionProfitLoss:
      type: object
      properties:
        profit:
          type: number
          description: Profit/loss amount in the selected currency
          example: -13.414468590167441
        profitPercent:
          type: number
          description: Profit/loss percentage
          example: -84.44241338814263
        currentValue:
          type: number
          description: Current value in the selected currency
          example: 29.21596436513665
      required:
        - profit
        - profitPercent
    Transaction:
      type: object
      properties:
        action:
          type: string
          enum:
            - Sent
            - Received
          description: Type of action performed in the transaction
          example: Sent
        items:
          description: List of items involved in the transaction
          type: array
          items:
            $ref: '#/components/schemas/TransactionItem'
      required:
        - action
        - items
    TransactionFee:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the fee transaction
        coin:
          description: Coin used for the transaction fee
          allOf:
            - $ref: '#/components/schemas/TransactionItemCoinData'
        count:
          type: number
          description: Amount of fee paid
          example: 0.000033840249219
        totalWorth:
          type: number
          description: Total worth of fee in the selected currency
          example: 0.08444122271861178
      required:
        - coin
        - count
        - totalWorth
    TransactionHash:
      type: object
      properties:
        id:
          type: string
          description: Transaction hash/ID on the blockchain
          example: '0xc969639a5c08179c32326b5d9e8bb73f34beeb5566b7e7a6a411d38ee4c77ba4'
        explorerUrl:
          type: string
          description: URL to view the transaction on blockchain explorer
          example: >-
            https://etherscan.io/tx/0xc969639a5c08179c32326b5d9e8bb73f34beeb5566b7e7a6a411d38ee4c77ba4
      required:
        - id
        - explorerUrl
    TransactionItem:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the transaction item
          example: >-
            publicApi_0_0x3f1A9B2c5E4C7d9F8E23bC19A8A6c77B10e62E5dGROUP436a0bddwithdraw
        coin:
          description: Coin details if the transaction involves a cryptocurrency
          allOf:
            - $ref: '#/components/schemas/TransactionItemCoinData'
        nft:
          description: NFT details if the transaction involves an NFT
          allOf:
            - $ref: '#/components/schemas/TransactionItemNFTData'
        count:
          type: number
          description: Amount involved in the transaction (negative for outgoing)
          example: -0.00636637
        totalWorth:
          type: number
          description: Total worth in the selected currency at the time of transaction
          example: 15.88593699768782
        toAddress:
          type: string
          description: Destination address of the transaction
          example: '0x42382d7853beb8d0ec968de4184a6a3c89cf6b5f'
        fromAddress:
          type: string
          description: Source address of the transaction
          example: '0x8ac77cbf06b44ec918e4ed99698e83a0be222e0e'
      required:
        - id
        - count
        - totalWorth
    TransactionItemCoinData:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the coin
          example: ethereum
        name:
          type: string
          description: Full name of the coin
          example: Ethereum
        symbol:
          type: string
          description: Symbol of the coin
          example: ETH
        icon:
          type: string
          description: URL of the coin icon
          example: https://static.coinstats.app/coins/1650455629727.png
      required:
        - id
        - name
        - symbol
        - icon
    TransactionItemNFTData:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the NFT
          example: bored-ape-123
        name:
          type: string
          description: Name of the NFT
          example: 'Bored Ape #123'
        icon:
          type: string
          description: URL of the NFT image
          example: https://static.coinstats.app/nfts/bored-ape-123.png
      required:
        - id
        - name
        - icon
  securitySchemes:
    X-API-KEY:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        API key required to access the endpoints. Generate one from your
        dashboard at https://openapi.coinstats.app and pass it in the
        `X-API-KEY` request header. Never expose your key in client-side code.

````