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

# List an account's trades

> Returns buy and sell fills with a trade date from `from` to `to`, newest first. A range can include at most 1,000 records.



## OpenAPI

````yaml /openapi.json get /v1/accounts/{account}/trades
openapi: 3.1.0
info:
  title: Matamba Gateway
  version: '1'
  description: >-
    Open brokerage accounts for your customers, fund them from your wallet,
    place and track orders, and read each account's records at the broker. All
    amounts are integers in kobo, and every error includes a `code` you can use
    in your logic.
servers:
  - url: https://{host}
    description: The sandbox and live environments each have their own host and API keys.
    variables:
      host:
        default: sandbox-host.invalid
        description: We send you the host along with your API keys.
security:
  - bearer: []
tags:
  - name: Accounts
    description: The accounts you can trade for, and the broker's records for each one.
  - name: Orders
    description: >-
      Estimate, place, retrieve and cancel orders. We store each order before we
      send it to the exchange, and we send it only once.
  - name: Events
    description: >-
      Each change to your orders creates an event. We send the same event bodies
      to your webhook endpoint. See [Webhooks](/webhooks) for how to verify
      them.
  - name: Applications
    description: Open a brokerage account for your customer.
  - name: Reference
    description: Code lists from the broker that you use in account applications.
  - name: Wallet
    description: >-
      Your wallet, and the allocations you make from it to your customers'
      accounts.
paths:
  /v1/accounts/{account}/trades:
    parameters:
      - $ref: '#/components/parameters/Account'
    get:
      tags:
        - Accounts
      summary: List an account's trades
      description: >-
        Returns buy and sell fills with a trade date from `from` to `to`, newest
        first. A range can include at most 1,000 records.
      operationId: listTrades
      parameters:
        - $ref: '#/components/parameters/From'
        - $ref: '#/components/parameters/To'
      responses:
        '200':
          $ref: '#/components/responses/TradeList'
        '400':
          $ref: '#/components/responses/Error'
          description: >-
            `invalid_request`: an invalid or unknown parameter, or more than
            1,000 records in the range (`param` is `from`). `unknown_account`
        '401':
          $ref: '#/components/responses/Error'
          description: '`unauthorized`'
        '409':
          $ref: '#/components/responses/Error'
          description: '`account_not_at_broker`: contact us.'
        '429':
          $ref: '#/components/responses/Error'
          description: '`rate_limited`'
        '500':
          $ref: '#/components/responses/Error'
          description: '`internal_error`'
        '502':
          $ref: '#/components/responses/Error'
          description: '`exchange_error`: retrying won''t help.'
        '503':
          $ref: '#/components/responses/Error'
          description: >-
            `exchange_unavailable`: retry shortly. `settlement_lockout`: retry
            after `Retry-After` seconds. `service_unavailable`
components:
  parameters:
    Account:
      name: account
      in: path
      required: true
      description: One of your account codes, from GET /v1/accounts.
      schema:
        $ref: '#/components/schemas/AccountCode'
    From:
      name: from
      in: query
      required: false
      description: >-
        The first trade date, in Lagos time. Defaults to 30 days before `to`.
        Can't be after `to`.
      schema:
        type: string
        format: date
    To:
      name: to
      in: query
      required: false
      description: >-
        The last trade date, in Lagos time. Defaults to today. Can't be after
        today.
      schema:
        type: string
        format: date
  responses:
    TradeList:
      description: All trades in the range.
      headers:
        x-request-id:
          $ref: '#/components/headers/RequestId'
        Cache-Control:
          $ref: '#/components/headers/CacheControl'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TradeList'
          example:
            object: list
            has_more: false
            next_cursor: null
            data:
              - object: trade
                ticket: T100001-1
                order_id: ord_62jxryztxctob7uopekg
                exchange_order_id: '100001'
                symbol: DANGCEM
                name: DANGCEM
                side: buy
                quantity: 10
                price_kobo: 47500
                trade_date: '2026-09-25'
    Error:
      description: >-
        An error. Use `error.code` in your logic. A path that doesn't exist
        returns 404 `not_found`, and a method the path doesn't support returns
        405 `method_not_allowed` with an `Allow` header.
      headers:
        x-request-id:
          $ref: '#/components/headers/RequestId'
        Cache-Control:
          $ref: '#/components/headers/CacheControl'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        WWW-Authenticate:
          $ref: '#/components/headers/WWWAuthenticate'
        Allow:
          $ref: '#/components/headers/Allow'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    AccountCode:
      type: string
      pattern: ^[A-Za-z0-9]{1,64}$
      description: An account code. Case-insensitive on input, and returned in uppercase.
    TradeList:
      type: object
      description: Always the complete list.
      required:
        - object
        - has_more
        - next_cursor
        - data
      properties:
        object:
          type: string
          const: list
        has_more:
          type: boolean
          const: false
        next_cursor:
          type: 'null'
        data:
          type: array
          items:
            $ref: '#/components/schemas/Trade'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - type
            - code
            - message
            - doc_url
          properties:
            type:
              type: string
              description: The category of the error.
              enum:
                - authentication_error
                - invalid_request_error
                - idempotency_error
                - order_error
                - application_error
                - wallet_error
                - limit_error
                - rate_limit_error
                - api_error
            code:
              type: string
              description: The error code. Use it in your logic; it doesn't change.
              enum:
                - unauthorized
                - not_found
                - method_not_allowed
                - unsupported_media_type
                - request_too_large
                - invalid_request
                - missing_required_field
                - unknown_account
                - duplicate_order
                - order_not_found
                - exchange_unavailable
                - order_not_sent
                - order_rejected
                - similar_order_unresolved
                - order_not_cancelable
                - cancel_unconfirmed
                - settlement_lockout
                - account_not_at_broker
                - exchange_error
                - application_rejected
                - duplicate_application
                - application_not_found
                - application_not_sent
                - wallet_too_low
                - allocation_rejected
                - duplicate_allocation
                - allocation_not_found
                - allocation_not_sent
                - rate_limited
                - unknown_symbol
                - limit_exceeded
                - service_unavailable
                - internal_error
            message:
              type: string
              description: >-
                A human-readable description of the error, for your logs. The
                wording can change.
            param:
              type: string
              description: >-
                The field, parameter or header that caused the error. Absent
                when the error isn't tied to a single field.
            reject_reason:
              type: string
              description: >-
                Why the exchange or broker rejected the request. Included with
                `order_rejected`, `application_rejected` and
                `allocation_rejected`, and takes the same values as the
                `reject_reason` field on the order, application or allocation.
            doc_url:
              type: string
              format: uri
              description: A link to the documentation for this error code.
    Trade:
      type: object
      required:
        - object
        - ticket
        - order_id
        - exchange_order_id
        - symbol
        - name
        - side
        - quantity
        - price_kobo
        - trade_date
      properties:
        object:
          type: string
          const: trade
        ticket:
          type: string
          description: The broker's ticket number for the fill.
        order_id:
          type:
            - string
            - 'null'
          description: >-
            The `id` of the order that placed this trade, if it came through the
            gateway. Null otherwise.
        exchange_order_id:
          type: string
        symbol:
          type: string
        name:
          type: string
        side:
          type: string
          enum:
            - buy
            - sell
        quantity:
          type: integer
          format: int64
        price_kobo:
          type: integer
          format: int64
        trade_date:
          type: string
          format: date
          description: The trade date, in Lagos time.
  headers:
    RequestId:
      description: A unique identifier for this request. Include it when you contact us.
      schema:
        type: string
    CacheControl:
      description: Always `no-store`.
      schema:
        type: string
        const: no-store
    RetryAfter:
      description: >-
        The number of seconds to wait before you retry. Sent with 429 (`1`) and
        with 503 `settlement_lockout` (`60`).
      schema:
        type: integer
    WWWAuthenticate:
      description: 'Sent with 401: `Bearer realm="Matamba Gateway"`.'
      schema:
        type: string
    Allow:
      description: Sent with 405. Lists the methods the path supports.
      schema:
        type: string
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: >-
        `Authorization: Bearer <key>`. Sandbox keys start with `mgw_test_` and
        live keys start with `mgw_live_`. Each key works only in its own
        environment, and a live key works only from the IP addresses or ranges
        registered for it.

````