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

# List all trades

> List all trades



## OpenAPI

````yaml https://imx-openapiv3-mr-sandbox.s3.us-east-2.amazonaws.com/openapi.json get /v1/chains/{chain_name}/trades
openapi: 3.0.3
info:
  title: Immutable zkEVM API
  version: 1.0.0
  description: Immutable Multi Rollup API
  contact:
    name: Immutable API Support
    email: support@immutable.com
    url: https://support.immutable.com
servers:
  - url: https://api.sandbox.immutable.com
security: []
tags:
  - name: activities
    description: Activities Endpoints
    x-displayName: activities
  - name: chains
    description: Chains Endpoints
    x-displayName: chains
  - name: collections
    description: Collections Endpoints
    x-displayName: collections
  - name: nfts
    description: NFTs Endpoints
    x-displayName: nfts
  - name: nft owners
    description: NFT Owner Endpoints
    x-displayName: nft owners
  - name: metadata
    description: NFT Metadata Endpoints
    x-displayName: metadata
  - name: tokens
    description: ERC20 Token Endpoints
    x-displayName: tokens
  - name: demopage
    description: Temporary HTML endpoint for demo purposes
    x-displayName: demopage
  - name: verification
    x-displayName: verification
  - name: operatorallowlist
    x-displayName: operatorallowlist
  - name: crafting
    x-displayName: crafting
  - name: listings
    description: Listings Endpoints
    x-displayName: listings
  - name: orders
    x-displayName: orders
  - name: passport
    description: Passport operations
    x-displayName: passport
  - name: gamefi
    description: team gamefi
    x-displayName: gamefi
  - name: health
    x-displayName: health
  - name: passport profile
    description: Passport Profile endpoints
    x-displayName: passport profile
  - name: feed-items
    x-displayName: feed-items
  - name: assets
    x-displayName: assets
  - name: guardian
    description: Guardian endpoints
    x-displayName: guardian
  - name: pricing
    description: Pricing Endpoints
    x-displayName: pricing
  - name: metadata-search
    x-displayName: metadata-search
paths:
  /v1/chains/{chain_name}/trades:
    get:
      tags:
        - orders
      summary: List all trades
      description: List all trades
      operationId: ListTrades
      parameters:
        - name: chain_name
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/ChainName'
        - name: account_address
          in: query
          required: false
          schema:
            type: string
            description: >-
              Account address to filter trades by (includes buy and sell wallet
              address)
            example: '0x784578949A4A50DeA641Fb15dd2B11C72E76919a'
            pattern: ^0x[a-fA-F0-9]{40}$
        - name: sell_item_contract_address
          in: query
          required: false
          schema:
            type: string
            description: Sell item contract address to filter by
            example: '0x784578949A4A50DeA641Fb15dd2B11C72E76919a'
            pattern: ^0x[a-fA-F0-9]{40}$
        - name: from_indexed_at
          in: query
          description: From indexed at including given date
          required: false
          schema:
            type: string
            format: date-time
            example: '2022-03-09T05:00:50.52Z'
        - name: page_size
          in: query
          description: Maximum number of trades to return per page
          schema:
            $ref: '#/components/schemas/PageSize'
        - name: sort_by
          in: query
          description: Trade field to sort by
          required: false
          schema:
            type: string
            enum:
              - indexed_at
            description: Trade field to sort by
            example: indexed_at
          example: indexed_at
        - name: sort_direction
          in: query
          description: Ascending or descending direction for sort
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            description: Ascending or descending direction for sort
            example: asc
          example: asc
        - name: page_cursor
          in: query
          description: >-
            Page cursor to retrieve previous or next page. Use the value
            returned in the response.
          required: false
          schema:
            $ref: '#/components/schemas/PageCursor'
      responses:
        '200':
          description: OK response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTradeResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    ChainName:
      type: string
      description: The name of chain
      example: imtbl-zkevm-testnet
    PageSize:
      type: integer
      format: int32
      description: Maximum number of items to return
      minimum: 1
      default: 100
      maximum: 200
      example: 10
    PageCursor:
      type: string
      description: >-
        Encoded page cursor to retrieve previous or next page. Use the value
        returned in the response.
      example: >-
        ewogICJ0eXBlIjogInByZXYiLAogICJpdGVtIjogewogICAgImlkIjogNjI3NTEzMCwKICAgICJjcmVhdGVkX2F0IjogIjIwMjItMDktMTNUMTc6MDQ6MTIuMDI0MTI2WiIKICB9Cn0=
    ListTradeResult:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Page'
        result:
          type: array
          items:
            $ref: '#/components/schemas/Trade'
          minItems: 0
          maxItems: 200
      required:
        - page
        - result
      example:
        page:
          previous_cursor: MjAyMy0wMS0yM1QwMTo1NToyNy4zNTM2MzA
          next_cursor: MjAyMy0wMS0yM1QwMTo1NToyNy4zNTM2MzA
        result:
          - buy:
              - type: ERC20
                amount: '9750000000000000000'
                contract_address: '0x0165878A594ca255338adfa4d48449f69242Eb8F'
            buyer_address: '0xFC99a706C0D05B8C71E1fAAC91b3E1343aC34D40'
            buyer_fees: []
            chain:
              id: eip155:11155111
              name: sepolia
            created_at: '2022-03-07T07:20:50.52Z'
            id: 018792C9-4AD7-8EC4-4038-9E05C598534A
            sell:
              - type: ERC721
                contract_address: '0x692edAd005237c7E737bB2c0F3D8ccCc10D3479E'
                token_id: '1'
            seller_address: '0x002b9B1cbf464782Df5d48870358FA6c09f1b19D'
            maker_address: '0x002b9B1cbf464782Df5d48870358FA6c09f1b19D'
            taker_address: '0xFC99a706C0D05B8C71E1fAAC91b3E1343aC34D40'
            updated_at: '2022-03-07T07:20:50.52Z'
          - buy:
              - type: ERC20
                amount: '9750000000000000000'
                contract_address: '0x0165878A594ca255338adfa4d48449f69242Eb8F'
            buyer_address: '0x017406f3F27d507a1491976B7835CE5CD0fA647a'
            buyer_fees: []
            chain:
              id: eip155:11155111
              name: sepolia
            created_at: '2022-03-07T07:20:50.52Z'
            id: 018792C9-4AD7-8EC4-4038-9E05C598534A
            sell:
              - type: ERC721
                contract_address: '0x692edAd005237c7E737bB2c0F3D8ccCc10D3479E'
                token_id: '1'
            seller_address: '0xC73349c545C1D757eb650cDc463A2f6dF1Ec41cb'
            maker_address: '0xC73349c545C1D757eb650cDc463A2f6dF1Ec41cb'
            taker_address: '0x017406f3F27d507a1491976B7835CE5CD0fA647a'
            updated_at: '2022-03-07T07:20:50.52Z'
    Page:
      type: object
      description: Pagination properties
      properties:
        previous_cursor:
          type: string
          nullable: true
          description: First item as an encoded string
          example: >-
            ewogICJ0eXBlIjogInByZXYiLAogICJpdGVtIjogewogICAgImlkIjogNjI3NTEzMCwKICAgICJjcmVhdGVkX2F0IjogIjIwMjItMDktMTNUMTc6MDQ6MTIuMDI0MTI2WiIKICB9Cn0=
        next_cursor:
          type: string
          nullable: true
          description: Last item as an encoded string
          example: >-
            ewogICJ0eXBlIjogInByZXYiLAogICJpdGVtIjogewogICAgImlkIjogNjI3NTEzMCwKICAgICJjcmVhdGVkX2F0IjogIjIwMjItMDktMTNUMTc6MDQ6MTIuMDI0MTI2WiIKICB9Cn0=
      required:
        - previous_cursor
        - next_cursor
    Trade:
      type: object
      properties:
        buy:
          description: Buy items are transferred from the taker to the maker.
          type: array
          items:
            $ref: '#/components/schemas/Item'
          example:
            - type: NATIVE
              amount: '9750000000000000000'
              contract_address: '0x0165878A594ca255338adfa4d48449f69242Eb8F'
          minItems: 1
          maxItems: 1
        buyer_address:
          description: >-
            Deprecated. Use maker and taker addresses instead of buyer and
            seller addresses.
          type: string
          example: '0xFC99a706C0D05B8C71E1fAAC91b3E1343aC34D40'
        buyer_fees:
          description: Deprecated. Use fees instead. The taker always pays the fees.
          type: array
          items:
            $ref: '#/components/schemas/Fee'
          example: []
          minItems: 0
          maxItems: 1
        fees:
          type: array
          items:
            $ref: '#/components/schemas/Fee'
          example: []
          minItems: 0
          maxItems: 1
        chain:
          $ref: '#/components/schemas/Chain'
        order_id:
          type: string
          example: 7df3e99e-f7b3-459c-bef6-ffb66a18bb59
        blockchain_metadata:
          $ref: '#/components/schemas/TradeBlockchainMetadata'
        indexed_at:
          type: string
          description: Time the on-chain trade event is indexed by the order book system
          format: date-time
          example: '2022-03-07T07:20:50.52Z'
        id:
          type: string
          description: Global Trade identifier
          example: 018792C9-4AD7-8EC4-4038-9E05C598534A
        sell:
          description: Sell items are transferred from the maker to the taker.
          type: array
          items:
            $ref: '#/components/schemas/Item'
          example:
            - type: ERC721
              contract_address: '0x692edAd005237c7E737bB2c0F3D8ccCc10D3479E'
              token_id: '1'
          minItems: 1
          maxItems: 1
        seller_address:
          description: >-
            Deprecated. Use maker and taker addresses instead of buyer and
            seller addresses.
          type: string
          example: '0x002b9B1cbf464782Df5d48870358FA6c09f1b19D'
        maker_address:
          type: string
          example: '0x002b9B1cbf464782Df5d48870358FA6c09f1b19D'
        taker_address:
          type: string
          example: '0xFC99a706C0D05B8C71E1fAAC91b3E1343aC34D40'
      example:
        buy:
          - type: NATIVE
            amount: '9750000000000000000'
            contract_address: '0x0165878A594ca255338adfa4d48449f69242Eb8F'
        buyer_address: '0xFC99a706C0D05B8C71E1fAAC91b3E1343aC34D40'
        buyer_fees: []
        fees: []
        chain:
          id: eip155:11155111
          name: sepolia
        indexed_at: '2022-03-07T07:20:50.52Z'
        id: 018792C9-4AD7-8EC4-4038-9E05C598534A
        sell:
          - type: ERC721
            contract_address: '0x692edAd005237c7E737bB2c0F3D8ccCc10D3479E'
            token_id: '1'
        seller_address: '0x002b9B1cbf464782Df5d48870358FA6c09f1b19D'
        maker_address: '0x002b9B1cbf464782Df5d48870358FA6c09f1b19D'
        taker_address: '0xFC99a706C0D05B8C71E1fAAC91b3E1343aC34D40'
      required:
        - id
        - order_id
        - buy
        - buyer_address
        - sell
        - seller_address
        - buyer_fees
        - fees
        - chain
        - maker_address
        - taker_address
        - indexed_at
        - blockchain_metadata
    APIError400:
      allOf:
        - $ref: '#/components/schemas/BasicAPIError'
        - type: object
          properties:
            code:
              type: string
              description: Error Code
              enum:
                - VALIDATION_ERROR
              example: VALIDATION_ERROR
            details:
              type: object
              nullable: true
              description: Additional details to help resolve the error
          required:
            - code
            - details
    APIError404:
      allOf:
        - $ref: '#/components/schemas/BasicAPIError'
        - type: object
          properties:
            code:
              type: string
              description: Error Code
              enum:
                - RESOURCE_NOT_FOUND
              example: RESOURCE_NOT_FOUND
            details:
              type: object
              nullable: true
              description: Additional details to help resolve the error
          required:
            - code
            - details
    APIError500:
      allOf:
        - $ref: '#/components/schemas/BasicAPIError'
        - type: object
          properties:
            code:
              type: string
              description: Error Code
              enum:
                - INTERNAL_SERVER_ERROR
              example: INTERNAL_SERVER_ERROR
            details:
              type: object
              nullable: true
              description: Additional details to help resolve the error
          required:
            - code
            - details
    Item:
      oneOf:
        - $ref: '#/components/schemas/NativeItem'
        - $ref: '#/components/schemas/ERC20Item'
        - $ref: '#/components/schemas/ERC721Item'
        - $ref: '#/components/schemas/ERC1155Item'
        - $ref: '#/components/schemas/ERC721CollectionItem'
        - $ref: '#/components/schemas/ERC1155CollectionItem'
      discriminator:
        propertyName: type
        mapping:
          NATIVE:
            $ref: '#/components/schemas/NativeItem'
          ERC20:
            $ref: '#/components/schemas/ERC20Item'
          ERC721:
            $ref: '#/components/schemas/ERC721Item'
          ERC1155:
            $ref: '#/components/schemas/ERC1155Item'
          ERC721_COLLECTION:
            $ref: '#/components/schemas/ERC721CollectionItem'
          ERC1155_COLLECTION:
            $ref: '#/components/schemas/ERC1155CollectionItem'
    Fee:
      type: object
      properties:
        amount:
          type: string
          description: Fee payable to recipient upon settlement
          example: '2250000000000000000'
          pattern: \d+
        type:
          type: string
          description: Fee type
          example: ROYALTY
          enum:
            - ROYALTY
            - MAKER_ECOSYSTEM
            - TAKER_ECOSYSTEM
            - PROTOCOL
        recipient_address:
          type: string
          description: Wallet address of fee recipient
          example: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92233'
          pattern: ^0x[a-fA-F0-9]{40}$
      example:
        amount: '2250000000000000000'
        type: ROYALTY
        recipient_address: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92233'
      required:
        - type
        - amount
        - recipient_address
    Chain:
      type: object
      description: The chain details
      properties:
        id:
          type: string
          description: The id of chain
          example: eip155:13372
        name:
          type: string
          description: The name of chain
          example: imtbl-zkevm-testnet
      required:
        - id
        - name
    TradeBlockchainMetadata:
      description: The metadata related to the transaction in which the activity occurred
      nullable: true
      type: object
      properties:
        transaction_hash:
          type: string
          description: The transaction hash of the trade
          example: '0x68d9eac5e3b3c3580404989a4030c948a78e1b07b2b5ea5688d8c38a6c61c93e'
        block_number:
          description: EVM block number (uint64 as string)
          type: string
          example: '1'
        transaction_index:
          description: Transaction index in a block (uint32 as string)
          type: string
          example: '1'
        log_index:
          description: The log index of the fulfillment event in a block (uint32 as string)
          type: string
          example: '1'
      required:
        - transaction_hash
        - block_number
        - transaction_index
        - log_index
    BasicAPIError:
      type: object
      properties:
        message:
          type: string
          description: Error Message
          example: all fields must be provided
        link:
          type: string
          description: Link to IMX documentation that can help resolve this error
          example: https://docs.x.immutable.com/reference/#/
        trace_id:
          type: string
          description: Trace ID of the initial request
          example: e47634b79a5cd6894ddc9639ec4aad26
      required:
        - message
        - link
        - trace_id
    NativeItem:
      type: object
      properties:
        type:
          type: string
          description: >-
            Token type user is offering, which in this case is the native IMX
            token
          example: NATIVE
          enum:
            - NATIVE
        amount:
          type: string
          description: >-
            A string representing the price at which the user is willing to sell
            the token. This value is provided in the smallest unit of the token
            (e.g., wei for Ethereum).
          example: '9750000000000000000'
          pattern: \d+
      required:
        - type
        - amount
    ERC20Item:
      type: object
      properties:
        type:
          type: string
          description: Token type user is offering, which in this case is ERC20
          example: ERC20
          enum:
            - ERC20
        contract_address:
          type: string
          description: Address of ERC20 token
          example: '0x0165878A594ca255338adfa4d48449f69242Eb8F'
          pattern: ^0x[a-fA-F0-9]{40}$
        amount:
          type: string
          description: >-
            A string representing the price at which the user is willing to sell
            the token. This value is provided in the smallest unit of the token
            (e.g., wei for Ethereum).
          example: '9750000000000000000'
          pattern: \d+
      required:
        - type
        - contract_address
        - amount
    ERC721Item:
      type: object
      properties:
        type:
          type: string
          description: Token type user is offering, which in this case is ERC721
          example: ERC721
          enum:
            - ERC721
        contract_address:
          type: string
          description: Address of ERC721 token
          example: '0x692edAd005237c7E737bB2c0F3D8ccCc10D3479E'
          pattern: ^0x[a-fA-F0-9]{40}$
        token_id:
          type: string
          description: ID of ERC721 token
          example: '1'
          pattern: \d+
      required:
        - type
        - contract_address
        - token_id
    ERC1155Item:
      type: object
      properties:
        type:
          type: string
          description: Token type user is offering, which in this case is ERC1155
          example: ERC1155
          enum:
            - ERC1155
        contract_address:
          type: string
          description: Address of ERC1155 token
          example: '0x692edAd005237c7E737bB2c0F3D8ccCc10D3479E'
          pattern: ^0x[a-fA-F0-9]{40}$
        token_id:
          type: string
          description: ID of ERC1155 token
          example: '1'
          pattern: \d+
        amount:
          type: string
          description: >-
            A string representing the price at which the user is willing to sell
            the token. This value is provided in the smallest unit of the token
            (e.g., wei for Ethereum).
          example: '9750000000000000000'
          pattern: \d+
      required:
        - type
        - contract_address
        - token_id
        - amount
    ERC721CollectionItem:
      type: object
      properties:
        type:
          type: string
          description: Token type user is offering, which in this case is ERC721
          example: ERC721_COLLECTION
          enum:
            - ERC721_COLLECTION
        contract_address:
          type: string
          description: Address of ERC721 collection
          example: '0x692edAd005237c7E737bB2c0F3D8ccCc10D3479E'
          pattern: ^0x[a-fA-F0-9]{40}$
        amount:
          type: string
          description: >-
            A string representing the price at which the user is willing to sell
            the token. This value is provided in the smallest unit of the token
            (e.g., wei for Ethereum).
          example: '9750000000000000000'
          pattern: \d+
      required:
        - type
        - contract_address
        - amount
    ERC1155CollectionItem:
      type: object
      properties:
        type:
          type: string
          description: Token type user is offering, which in this case is ERC1155
          example: ERC1155_COLLECTION
          enum:
            - ERC1155_COLLECTION
        contract_address:
          type: string
          description: Address of ERC1155 collection
          example: '0x692edAd005237c7E737bB2c0F3D8ccCc10D3479E'
          pattern: ^0x[a-fA-F0-9]{40}$
        amount:
          type: string
          description: >-
            A string representing the price at which the user is willing to sell
            the token. This value is provided in the smallest unit of the token
            (e.g., wei for Ethereum).
          example: '9750000000000000000'
          pattern: \d+
      required:
        - type
        - contract_address
        - amount
  responses:
    BadRequest:
      description: Bad Request (400)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/APIError400'
    NotFound:
      description: The specified resource was not found (404)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/APIError404'
    InternalServerError:
      description: Internal Server Error (500)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/APIError500'

````