Skip to content

chore: improve API latency of v1/get_trades #3810

@m-sz

Description

@m-sz

Background

During high user activity, the latency of v1/get_trades deteriorates. The API call does not support pagination, so it can cause slowdowns if a lot of trades are happening for a particular user.

Details

The OpenAPI spec for GET on v1/trades allows one to specify either an order uid or owner address. The returned results are not paginated and can potentially query a lot of data.

Implement pagination for the v1/get_trades in orderbook.

Acceptance criteria

  • Pagination feature implemented and merged
  • Tested on production traffic that the API latency spike no longer occurs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions