Giter Club home page Giter Club logo

stooqapi's Introduction

StooqApi

Build status NuGet license

A .NET wrapper for Stooq, based on .NET Standard 2.0

Feature

  • Get historical data from Stooq.com

Installation

PM> Install-Package StooqApi

Usage

Add Reference

using StooqApi;

Get Historical Data

var candles = await Stooq.GetHistoricalAsync("aapl", Period.Daily, new DateTime(2017, 1, 3));
Console.WriteLine($"DateTime: {candles[0].DateTime}, Open: {candles[0].Open}, High: {candles[0].High}, Low: {candles[0].Low}, Close: {candles[0].Close}");

Powered by

  • Flurl (@tmenier) - A simple & elegant fluent-style REST api library

stooqapi's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

stooqapi's Issues

Mono compatibility

Hi

First of all, thanks for the great work.
I'm currently using StooqApi to get some futures quotes as Stooq has a nice continuous historical data for commodities futures.

Works as a charm with .NET + Visual Studio Community 2017, but when I tried scheduling my app using Docker Mono image, I get an issue associated with FLurl :

Flurl.Http.FlurlHttpException: Call failed. Field not found: System.Func2<System.IO.Stream, System.Threading.Tasks.Task> System.Net.HttpWebRequest.ResendContentFactory Due to: Could not find field in class GET https://stooq.com/q/d/l/?s=CB.F&d1=20181101&d2=20181101&i=d ---> System.MissingFieldException: Field not found: System.Func2<System.IO.Stream, System.Threading.Tasks.Task> System.Net.HttpWebRequest.ResendContentFactory Due to: Could not find field in class
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].Start[TStateMachine] (TStateMachine& stateMachine) [0x0002c] in <3833a6edf2074b959d3dab898627f0ac>:0

Looks to me that Mono default version of Http lacks some classes

Did you experience it by any means ? Did you test on Mono ? Is there a specific version of http I should use ?

Thanks & regards

Commo price - OK browser - KO API

Hi

First, thanks for the work.
I use the API for a personal project of portfolio management using Stooq market data.

I had an issue recently for the date of 2019-03-19

When I paste URL "https://stooq.com/q/d/l/?s=CB.F&d1=20190319&d2=20190319&i=d"
in my browser, I get the csv with the correct line value

But using the API with parameters :

IList candles = Stooq.GetHistoricalAsync(instrument.Symbol, Period.Daily, quotationDate, quotationDate).Result;

The result returned is empty

Do you have any advice on the matter ?

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.