Skip to Content
Welcome to Level2 Help Center
APIEndpointsGet all trades of a user

Get all trades of a user

GET https://hub2.trylevel2.com/broker/get_all_trades_by_user_deployments

Retrieves a paginated list of all trades associated with a user’s deployments, identified by their email address.

Request:

QUERY PARAMETERS

Required & Optional Parameters

ParameterTypeRequirementDescription
user_emailemailRequiredThe registered email address of the user.
pageintegerOptionalThe specific page number you wish to query.
sizeintegerOptionalThe number of records to return per page.

Parameter Constraints

Adhere to the following system boundaries when configuring your request:

  • Page (page): * Must be greater than or equal to 1.
    • Default value is 1.
  • Size (size): * Must be greater than or equal to 1 and is typically capped at 100.
    • Default value is 50.

Responces:

Successful response with performance metrics 200

SCHEMA

Trade Object Array

Each entry in the array represents a single completed transaction.

ParameterTypeDescriptionExample
trade_idstringThe unique identifier for the specific trade.t789
strategy_keygenuuidThe unique keygen of the strategy that triggered the trade.58d2a371-b84c-4928-99e4-8f0561c5696c
timestampdate-timeThe ISO 8601 timestamp of when the trade was executed.2025-10-17T16:00:00Z
amountnumberThe total monetary value or size of the trade.1000.5

Pagination Metadata

Use these fields to manage the data display in your UI or reporting tools.

ParameterTypeDescriptionExample
totalintegerThe total number of trades found for the user.200
pageintegerThe current page number of the result set.1
sizeintegerThe number of records returned in this specific page.50

EXAMPLE

{ "trades": [ { "trade_id": "t789", "strategy_keygen": "58d2a371-b84c-4928-99e4-8f0561c5696c", "timestamp": "2025-10-17T16:00:00Z", "amount": 1000.5 } ], "total": 200, "page": 1, "size": 50 }

Responces:

Internal Server Error 500

SCHEMA

ParameterTypeDescription
errorstringA descriptive message detailing the specific issue encountered.

EXAMPLE

{ "error": "An unexpected error occurred" }
Last updated on