Quandlex 0.1 released: Quandle API client for Elixir/Erlang

in #utopian-io6 years ago (edited)

<p dir="auto">I'm releasing Quandlex, a new Elixir/Erlang library for Quandl API. Quandl provides unified access to multiple sources for financial, economic, and alternative datasets . <h2>Links <ul> <li><a href="http://github.com/ontofractal/quandlex" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Repo <li><a href="https://github.com/ontofractal/quandlex/compare/ca47f56601f5ccf4f4254afaa24f957e195eccdd...12630d303cf777c0c8315f98e982971514597d61" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Commits and changes <h2>Installation <p dir="auto">The package can be installed by adding <code>quandlex to your list of dependencies in <code>mix.exs: <pre><code>def deps do [ {:quandlex, "~> 0.1.0"} ] end <h2>Quandlex.Timeseries <p dir="auto">Quandlex.Timeseries includes several functions that match API endpoints: <ul> <li><code>get_data: returns both data and dataset metadata <li><code>get_dataset_metadata: returns only dataset metadata <li><code>get_database_metadata: returns database metadata <pre><code>iex> {:ok, %{data: data, type: type}} = Quandlex.Timeseries.get_data("CHRIS", "MGEX_IH1") iex> is_list(hd(data)) and is_list(data) and type == "Time Series" true iex> {:ok, %{name: name, id: id}} = Quandlex.Timeseries.get_database_metadata("CHRIS") iex> name == "Wiki Continuous Futures" and id == 596 true <h3>Response example <pre><code> {:ok, %{ collapse: nil, column_index: nil, column_names: ["Date", "Open", "High", "Low", "Last", "Volume", "Open Interest"], data: [ [~D[2019-04-30], nil, 486.0, 486.0, 486.0, 0.0, 0.0], [~D[2018-04-30], nil, 486.0, 486.0, 486.0, 0.0, 0.0], [~D[2018-04-27], nil, 474.0, 474.0, 474.0, 0.0, 0.0], [...], ... ], database_code: "CHRIS", database_id: 596, dataset_code: "MGEX_IH1", description: "Historical Futures Prices: Minneapolis HRWI Hard Red Wheat Futures, Continuous Contract #1. Non-adjusted price based on spot-month continuous contract calculations. Raw data from MGEX.", end_date: "2019-04-30", frequency: "daily", id: 9774107, limit: nil, name: "Minneapolis HRWI Hard Red Wheat Futures, Continuous Contract #1 (IH1) (Front Month)", newest_available_date: "2019-04-30", oldest_available_date: "2005-01-03", order: nil, premium: false, refreshed_at: "2018-05-08T18:27:06.846Z", start_date: "2005-01-03", transform: nil, type: "Time Series" }} <h2>Quandlex.Forex <p dir="auto">Quandlex.Forex is a utility module that makes fetching historical data of foreign exchange rates simpler and easier. <p dir="auto">Quandl provides free (albeit limited for non-registered users) data of forex rates sourced from Bank of England, Federal Reserve and European Central Bank. <p dir="auto"><a href="https://blog.quandl.com/api-for-currency-data" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">More about Quandle Forex API <p dir="auto">You can use get_rates/2 or get_rates/3 function without wasting time on searching for special currency codes for every bank database. <p dir="auto">For example, instead of using <code>Quandlex.Timeseries.get_data("BOE", "XUDLJYD") you can call <code>Quandlex.Forex.get_rates("USD", "JPY", source: "BOE") <h3>Examples <pre><code>iex> {:ok, %{data: data, type: type, database_code: database_code}} = Quandlex.Forex.get_rates("HKD", "USD") iex> database_code === "FRED" and is_list(data) and type == "Time Series" true iex> {:ok, %{data: data, type: type, database_code: database_code}} = Quandlex.Forex.get_rates("HKD", "USD", source: "BOE") iex> database_code === "BOE" and is_list(data) and type == "Time Series" true iex> {:ok, %{data: data, type: type, database_code: database_code}} = Quandlex.Forex.get_rates("THB", "EUR", source: "ECB") iex> database_code === "ECB" and is_list(data) and type == "Time Series" true <h2>Response example <pre><code> {:ok, %{ collapse: nil, column_index: nil, column_names: ["Date", "Value"], data: [ [~D[2018-05-18], 7.8498], [~D[2018-05-17], 7.8496], [~D[2018-05-16], 7.8499], [...], ... ], database_code: "FRED", database_id: 118, dataset_code: "DEXHKUS", description: "Hong Kong Dollars to One U.S. Dollar Not Seasonally Adjusted, Noon buying rates in New York City for cable transfers payable in foreign currencies. ", end_date: "2018-05-18", frequency: "daily", id: 121063, limit: nil, name: "Hong Kong / U.S. Foreign Exchange Rate", newest_available_date: "2018-05-18", oldest_available_date: "1981-01-02", order: nil, premium: false, refreshed_at: "2018-05-27T03:10:46.002Z", start_date: "1981-01-02", transform: nil, type: "Time Series" }} """ <h2>Roadmap <ul> <li>[ ] Add datatables module <li>[ ] Add structs for return values <li>[ ] Investigate developer experience improvements using rate limiting utilities and caching <p dir="auto"><center> (*`□)<炎炎炎炎
Sort:  

Thank you for your contribution.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.



Chat with us on Discord.
[utopian-moderator]Need help? Write a ticket on https://support.utopian.io/.


Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!Hey @ontofractal

Contributing on Utopian
Learn how to contribute on our website or by watching this tutorial on Youtube.

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!