Skip to content

Releases: fcsapi/rest-api-php

4.0.0

25 Dec 11:57

Choose a tag to compare

FCS REST API PHP v4.0.0

First Release - PHP REST API client for Forex, Cryptocurrency, and Stock market data from FCS API.

What's New

Initial release with complete REST API implementation:

  • Forex API - 4,000+ currency pairs, commodities, real-time rates, historical data
  • Crypto API - 50,000+ coins, market cap data, top exchanges (Binance, Coinbase, etc.)
  • Stock API - 125,000+ global stocks, earnings, dividends, financial statements
  • 4 Authentication Methods - API key, config file, IP whitelist, token-based
  • Technical Analysis - Moving averages, RSI, MACD, pivot points
  • PSR-4 Autoloading - Composer compatible with modern PHP standards
  • Easy Integration - Simple method calls for all API endpoints

Installation

Composer:

composer require fcsapi/rest-api

Manual:

require_once 'path/to/rest-api-php/src/FcsApi.php';

Quick Start

<?php
require 'vendor/autoload.php';

use FcsApi\FcsApi;

$fcsapi = new FcsApi('YOUR_API_KEY');

// Get EUR/USD price
$response = $fcsapi->forex->getLatestPrice('EURUSD');

// Get Bitcoin price
$response = $fcsapi->crypto->getLatestPrice('BINANCE:BTCUSDT');

// Get Apple stock
$response = $fcsapi->stock->getLatestPrice('NASDAQ:AAPL');

// Check response
if ($fcsapi->isSuccess()) {
    print_r($response['response']);
}

Examples Included

  • forex-example.php - Forex prices, conversion, historical data
  • crypto-example.php - Bitcoin, top 100 coins, market cap
  • stock-example.php - Stock prices, earnings, indices

Requirements

  • PHP 7.4 or higher
  • cURL extension enabled

Documentation

Get API Key

Sign up for free at https://fcsapi.com