A python wrapper for the Nomics API
Project description
nomics-python
A Python wrapper for the Nomics API
Disclaimer
Although the api call descriptions are from the official documentation, this is an unofficial API wrapper.
Contents
Getting Started
Before using the Nomics API, sign up for a free API key here.
Every api call requires this api key. Make sure to use this key when getting started.
import nomics
nomics = nomics.Nomics("This-Is-A-Fake-Key-123")
Code Examples
Here are a few calls that this package provides. For more detailed information, please see the associated Nomics API documentation.
- Currencies
- get_currencies
- get_metadata
- get_sparkline
- ExchangeRates
- get_exchange_rates
- get_history
- get_interval
- Markets
- get_markets
- Volume
- get_volume_history
Currencies
get_currencies - Price, volume, market cap, and rank for all currencies across 1 hour, 1 day, 7 day, 30 day, 365 day, and year to date intervals. Current prices are updated every 10 seconds.
Input
Optional Parameters
- ids: Comma separated list of Nomics Currency IDs to filter result rows.
- interval: Comma separated time interval of the ticker(s). Default is 1d,7d,30d,365d,ytd
- convert: Currency to quote ticker price, market cap, and volume values. May be a Fiat Currency or Cryptocurrency. Default is USD.
- include-transparency: Whether to include Transparent Volume information for currencies. Default is false. Only available to paid API plans
nomics.Currencies.get_currencies(
ids = ["BTC", "ETH"],
interval = ["1d", "ytd"],
convert = "EUR"
)
get_metadata - The currencies endpoint returns all the currencies and their metadata that Nomics supports.
Input
Optional Parameters
- ids: Comma separated list of Nomics Currency IDs to filter result rows.
- attributes: Comma separated list of currency attributes to filter result columns
nomics.Currencies.get_metadata(
ids = ["BTC", "ETH"],
attributes = ["id", "name", "logo_url"]
)
get_sparkline - The currencies sparkline endpoint returns prices for all currencies within a customizable time interval suitable for sparkline charts.
Input
Required Parameters
- start: Start time of the interval in ISO or RFC3339 format
Optional Parameters
- end: End time of the interval in ISO or RFC3339 format
nomics.Currencies.get_sparkline(
start = "2018-04-14T00:00:00Z",
end = "2018-06-14T00:00:00Z"
)
ExchangeRates
get_exchange_rates - The exchange rates endpoint returns the current exchange rates used by Nomics to convert prices from markets into USD. This contains Fiat currencies as well as a BTC and ETH quote prices.
nomics.ExchangeRates.get_exchange_rates()
get_history - Exchange rates for every point in a time range. This endpoint can be used with other interval endpoints to convert values into a desired quote currency.
Input
Required Parameters
- currency: Currency ID
- start: Start time of the interval in ISO or RFC3339 format
Optional Parameters
- end: End time of the interval in ISO or RFC3339 format
nomics.ExchangeRates.get_history(
currency = "ETH",
start = "2018-04-14T00:00:00Z",
end = "2018-06-14T00:00:00Z"
)
get_interval - Exchange rates to convert from USD over a time interval.
Input
Required Parameters
- start: Start time of the interval in ISO or RFC3339 format
Optional Parameters
- end: End time of the interval in ISO or RFC3339 format
nomics.ExchangeRates.get_interval(
start = "2018-04-14T00:00:00Z",
end = "2018-06-14T00:00:00Z"
)
Markets
get_markets - The markets endpoint returns information on the exchanges and markets that Nomics supports, in addition to the Nomics currency identifiers for the base and quote currency.
Input
Optional Paramters
- exchange: Nomics Exchange ID to filter by
- base: Comma separated list of base currencies to filter by
- quote: Comma separated list of quote currencies to filter by
nomics.Markets.get_markets(
exchange = "binance",
base = ["BTC", "ETH", "LTC"],
quote = ["BNB"]
)
get_market_cap_history - MarketCap History is the total market cap for all cryptoassets at intervals between the requested time period.
Input
Required Parameters
- start: Start time of the interval in ISO or RFC3339 format
Optional Parameters
- end: End time of the interval in ISO or RFC3339 format
nomics.Markets.get_market_cap_history(
start = "2018-04-14T00:00:00Z",
end = "2018-06-14T00:00:00Z"
)
Volume
get_volume_history - Volume History is the total volume for all cryptoassets in USD at intervals between the requested time period.
Input
Optional Parameters
- start: Start time of the interval in ISO or RFC3339 format
- end: End time of the interval in ISO or RFC3339 format
nomics.Volume.get_volume_history(
start = "2018-04-14T00:00:00Z",
end = "2018-06-14T00:00:00Z"
)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for nomics_python-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01939709d211f64347e29de221cbbffce7cf35d19ba95df2db3f3f5fd6355dcf |
|
MD5 | 57c520a6d1080f3286690b0159920b53 |
|
BLAKE2b-256 | c8840f8d382f217ca5221d83f397f08383ca710256d469119930b50726753d70 |