/lionshare

Python and Node.js wrappers for the Lionshare API

Primary LanguagePythonMIT LicenseMIT

lionshare

Lionshare is a Python/Node.js wrapper for the Lionshare API. You can get prices and market info on various cryptocurrencies.

Installation

Python - only installs what is in the python folder

pip install lionshare

Node.js - only installs what is in the js folder

npm install lionshare

Usage

Python

from lionshare import Lionshare
lionshare = Lionshare()

# All responses are in json

# Get historical prices for cryptocurrencies
prices = lionshare.get_prices()
# Optional period parameter (hour, day, week, month, year)
prices = lionshare.get_prices('hour')

# Get current market info for cryptocurrencies
market_info = lionshare.get_markets()

Node.js

const Lionshare = require('lionshare');
const client = new Lionshare();

// All responses are in json

// Get historical prices for cryptocurrencies
var prices = client.getPrices();
// Optional period parameter (hour, day, week, month, year)
prices = client.getPrices('hour');

// Get current market info for cryptocurrencies
var marketInfo = client.getMarkets();

Node.js documentation

Table of Contents

_get

Gets data from Lionshare API

Parameters

  • endpoint string endpoint for HTTP API request
  • query string? optional query string (optional, default '')

Returns Object JSON information

getPrices

Gets prices for cryptocurrencies

Parameters

  • period string? period to get hisoric prices (hour, day, week, month, year) (optional, default '')

Returns Object JSON price information

getMarkets

Gets market info for cryptocurrencies

Returns Object JSON market information