PHP 5.5 and later
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/equibles/stocks-php.git"
}
],
"require": {
"equibles/stocks-php": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php
:
require_once('/path/to/EquiblesStocks/vendor/autoload.php');
To run the unit tests:
composer install
./vendor/bin/phpunit
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Query String
$config = EquiblesStocks\Configuration::getDefaultConfiguration()->setApiKey('apiKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = EquiblesStocks\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apiKey', 'Bearer');
$apiInstance = new EquiblesStocks\Clients\ExchangesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$apiKey = "apiKey_example"; // string |
try {
$result = $apiInstance->callList($apiKey);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ExchangesApi->callList: ', $e->getMessage(), PHP_EOL;
}
// Configure API key authorization: Query String
$config = EquiblesStocks\Configuration::getDefaultConfiguration()->setApiKey('apiKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = EquiblesStocks\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apiKey', 'Bearer');
$apiInstance = new EquiblesStocks\Clients\ExchangesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$apiKey = "apiKey_example"; // string |
try {
$result = $apiInstance->currencies($apiKey);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ExchangesApi->currencies: ', $e->getMessage(), PHP_EOL;
}
// Configure API key authorization: Query String
$config = EquiblesStocks\Configuration::getDefaultConfiguration()->setApiKey('apiKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = EquiblesStocks\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apiKey', 'Bearer');
$apiInstance = new EquiblesStocks\Clients\ExchangesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$apiKey = "apiKey_example"; // string |
$operatingMic = "operatingMic_example"; // string | The operating MIC of the exchange to search.
try {
$result = $apiInstance->stocks($apiKey, $operatingMic);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ExchangesApi->stocks: ', $e->getMessage(), PHP_EOL;
}
?>
All URIs are relative to https://api.equibles.com
Class | Method | HTTP request | Description |
---|---|---|---|
ExchangesApi | callList | GET /stocks/exchanges/list | List Exchanges |
ExchangesApi | currencies | GET /stocks/exchanges/currencies | List Currencies |
ExchangesApi | stocks | GET /stocks/exchanges/stocks | List Stocks |
FundamentalsApi | dividends | GET /stocks/fundamentals/dividends | Dividends |
FundamentalsApi | financialReports | GET /stocks/fundamentals/financialreports | Financial Statements |
MetricsApi | priceToEarnings | GET /stocks/metrics/pricetoearnings | Historical P/E |
NewsApi | callList | GET /stocks/news/list | List News |
NewsApi | publishers | GET /stocks/news/publishers | List Publishers |
PerformanceApi | callList | GET /stocks/performance/list | Performance |
PricesApi | endOfDay | GET /stocks/prices/endofday | End Of Day Prices |
PricesApi | intraday | GET /stocks/prices/intraday | Intraday Prices |
PricesApi | summary | GET /stocks/prices/summary | Latest trading day summary |
SectorsApi | callList | GET /stocks/sectors/list | List Sectors |
SectorsApi | searchStocks | GET /stocks/sectors/searchstocks | List Stocks |
StocksApi | callList | GET /stocks/list | List Stocks |
StocksApi | officers | GET /stocks/officers | Officers |
StocksApi | profile | GET /stocks/profile | Profile |
StocksApi | screener | POST /stocks/screener | Screener |
StocksApi | search | GET /stocks/search | Search |
StocksApi | splits | GET /stocks/splits | Splits |
TransactionsApi | insiders | GET /stocks/transactions/insiders | Insider Transactions |
TransactionsApi | institutional | GET /stocks/transactions/institutional | Institutional Transactions |
- AssetType
- BalanceSheet
- CashFlowStatement
- CurrenciesResponse
- Currency
- ErrorResponse
- Exchange
- ExchangesResponse
- FinancialAssetsResponse
- FinancialReport
- FiscalPeriod
- FundamentalsResponse
- Image
- IncomeStatement
- Industry
- MetricNullablePointsResponse
- News
- NewsResponse
- NullablePoint
- Officer
- OfficersResponse
- Performance
- PerformanceResponse
- Price
- PriceSummary
- PriceSummaryResponse
- PricesResponse
- Publisher
- PublishersResponse
- Recommendation
- ResponseStatus
- ScreenerRequest
- Sector
- SectorsResponse
- Sort
- SplitsResponse
- StockProfile
- StockProfileResponse
- StockProfilesResponse
- StockSplit
- Transaction
- TransactionType
- TransactionsResponse
- Type: API key
- API key parameter name: apiKey
- Location: URL query string