Code Monkey home page Code Monkey logo

eodhistoricaldata.net's Introduction

EOD Historical Data API Client Wrapper for Laravel/PHP

Build Status Latest Stable Version Total Downloads License

Installation

To install this package via the composer require command:

$ composer require radicalloop/eodhistoricaldata

Or add it to composer.json manually:

"require": {
    "radicalloop/eodhistoricaldata": "~1.0"
}

Laravel

No configuration required for Laravel >= 5.5+, It will use the auto-discovery function.

In Laravel <= 5.4 (or if you are not using auto-discovery) register the service provider by adding it to the providers key in config/app.php. Also register the facade by adding it to the aliases key in config/app.php.

'providers' => [
    ...
    RadicalLoop\Eod\EodServiceProvider::class,
],

'aliases' => [
    ...
    'Eod' => RadicalLoop\Eod\Facades\Eod::class,
]

Configuration

To get started, you'll need to publish all vendor assets:

$ php artisan vendor:publish --provider="RadicalLoop\Eod\EodServiceProvider"

This will create a config/eod.php file in your app that you can modify to set your configuration.

Set your Eod historical data API token in the file:

return [
    'api_token' => 'put your token here'
];

Usage

Here you can see an example of just how simple this package is to use.

Stocks API

use Eod;

$stock = Eod::stock();

// JSON 
$stock->realTime('AAPL.US')->json();
$stock->eod('AAPL.US')->json();

// Download CSV 
$stock->realTime('AAPL.US' ['s' => ['VTI','EUR','FX']])->download();
$stock->eod('AAPL.US')->download();

// Save CSV to specific path
$stock->realTime('AAPL.US')->save('path/to/save/csv/stock.csv');

// For other parameters, for ex. dividend api with other params
$stock->dividend('AAPL.US', ['from' => '2017-01-01'])->json();

To check other Stock API usages, refer Test Cases here.

Exchanges API

use Eod;

$exchange = Eod::exchange();

// JSON 
$exchange->symbol('US')->json();
$exchange->multipleTicker('US')->json();

// Download CSV 
$exchange->symbol('US')->download();
$exchange->multipleTicker('US')->download();

// Save CSV to specific path
$exchange->symbol('US')->save('path/to/save/csv/stock.csv');

To check other Exchanges API usages, refer Test Cases here.

PHP

For PHP you can create an object like below.

use RadicalLoop\Eod\Config;
use RadicalLoop\Eod\Eod;

$stock    = (new Eod(new Config($apiToken)))->stock();
$exchange = (new Eod(new Config($apiToken)))->exchange();

Support

Contact: www.radicalloop.com โ€” [email protected]

eodhistoricaldata.net's People

Contributors

andrasfuchs avatar brunocabral88 avatar clintonrocksmith avatar deios0 avatar glingt avatar going-striker avatar kavatari avatar scidec avatar svenskrabal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

eodhistoricaldata.net's Issues

Missing "Holders" information.

Missing holder information. Sample JSON is as follows.

"Holders": {
"Institutions": {
"0": {
"name": "Vanguard Group Inc",

GetFundamentalStock throwing an exception/error

Error when using GetFundamentalStock on non-US stock symbols.

Examples:
var fundamentals = client.GetFundamentalStock("NOKIA.HE");
var fundamentals = client.GetFundamentalStock("STB.OL");
var fundamentals = client.GetFundamentalStock("HH.CO");

image

csproj + option class

issue 1:
hello,

the first time i open you solution i get:

D:\prog\IG\EODHistoricalData.NET-master\EODHistoricalData.NET-master\EODHistoricalData.NET\EODHistoricalData.NET.csproj : error : The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format

######################

issue 2 : it lacks some files like the 'Option' class definition
see attached

could you checkout from a new Labtop and try to compile ?

2019-11-01 15 32 34
2019-11-01 15 53 27

EODHistoricalData.NET cannot be referenced by a .NET Standard class library

I want to reference EODHistoricalData.NET from another class library, that targets .NET Standard project.
Currently that is not possible since EODHistoricalData.NET is targetting .NET Core.

See this thread
https://stackoverflow.com/questions/46087573/convert-net-core-2-0-class-libraries-to-net-standard

Retargetting EODHistoricalData.NET from .NET Core to .NET Standard would make it referencable from both .NET Framework and .NET Core apps.

The solution is to change a section in the .csproj file like this

from

 <PropertyGroup>
    <TargetFramework>netcoreapp2.0</TargetFramework>
  </PropertyGroup>

to

<PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
  </PropertyGroup>

I'd be happy to open a pull request that retargets the project and opening it up for both .NET Core and .NET Framework platforms.

Update to use Json.Net

It is a performance boost to move to Json.Net rather than Newtonsoft.Json

Is this something that you would like me to do?

How to contribute to this lib?

Hey @deios0
I want to contribute to this lib and make sure that all unit tests are passing locally. But, to achieve this I need a api key - using a free one is not possible.
Do you have any idea on this one?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.