Skip to main content

Installation

The Market Data PHP SDK can be installed via Composer, the standard PHP dependency manager.

Requirements

  • PHP 8.2 or higher
  • Composer

Installing with Composer

Install the SDK using Composer:

composer require marketdataapp/sdk-php

This will install the SDK and all required dependencies.

Dependencies

The SDK depends on the following packages, which are automatically installed by Composer:

  • guzzlehttp/guzzle - HTTP client for making API requests
  • vlucas/phpdotenv - Environment variable loading from .env files
  • psr/log - PSR-3 logger interface
  • nesbot/carbon - Date/time handling
  • monolog/monolog - PSR-3 compatible logging (optional)

Verifying Installation

After installation, you can verify the SDK is working by creating a simple test script:

<?php

require_once 'vendor/autoload.php';

use MarketDataApp\Client;

// Create client (uses MARKETDATA_TOKEN environment variable)
$client = new Client();

// Test the connection
$status = $client->utilities->api_status();
echo "API Status Response: {$status->status}\n";

if (!empty($status->services)) {
$service = $status->services[0];
echo "Service Check: {$service->service} is {$service->status}\n";
}

Updating the SDK

To update to the latest version:

composer update marketdataapp/sdk-php

Next Steps

After installing the SDK, set up your authentication token to start making API calls.