Skip to content

Conversation

@danielgnh
Copy link
Owner

This pull request introduces a new Data API client to the codebase, enabling access to market analytics, user positions, trade history, leaderboards, and other data-centric endpoints. The changes include the addition of a dedicated Data client, integration into the main Client class, and resource classes for each Data API feature. An example usage script is also provided to demonstrate the new functionality.

New Data API client integration:

  • Added the Data client (src/Data.php) to handle Data API operations such as positions, trades, analytics, leaderboards, and health checks.
  • Integrated the Data client into the main Client class, including support for custom HTTP clients and lazy instantiation. [1] [2] [3] [4]
  • Updated the Config class to support a separate Data API base URL via the new dataBaseUrl property. [1] [2]

Data API resource classes:

  • Added resource classes for Data API endpoints: Positions, Trades, Activity, Analytics, Leaderboards, and Health, each providing typed methods for their respective API operations. [1] [2] [3] [4] [5] [6]

Documentation and examples:

  • Added an example script (examples/data-api-positions.php) demonstrating how to use the Data API client to fetch user positions, analytics, trade history, leaderboard data, and API health status.

@danielgnh danielgnh self-assigned this Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants