Skip to main content

Sharpe API

Project description

sharpe-api

Institutional-grade crypto market data API. Access funding rates, futures, options, arbitrage opportunities, narratives, ecosystems, and more.

Authentication is supported via three methods:

  1. Bearer token in the Authorization header: Authorization: Bearer sk_...
  2. X-API-Key header: X-API-Key: sk_...
  3. Query parameter: ?api_key=sk_... (useful for webhooks, browser links, and environments where setting headers is not possible)

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Generator version: 7.21.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://sharpe.ai

Requirements.

Python 3.9+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import sharpe_api

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import sharpe_api

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import sharpe_api
from sharpe_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.sharpe.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = sharpe_api.Configuration(
    host = "https://api.sharpe.ai"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization: BearerAuth
configuration = sharpe_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)


# Enter a context with an instance of the API client
with sharpe_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sharpe_api.AccountApi(api_client)

    try:
        # API usage and quota
        api_response = api_instance.get_usage()
        print("The response of AccountApi->get_usage:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AccountApi->get_usage: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.sharpe.ai

Class Method HTTP request Description
AccountApi get_usage GET /v1/usage API usage and quota
ArbitrageApi get_cross_exchange_arbitrage GET /v1/arbitrage/cross-exchange Cross-exchange arbitrage
ArbitrageApi get_spot_perp_arbitrage GET /v1/arbitrage/spot-perp Spot-perp arbitrage
CategoriesApi get_ecosystems_data GET /v1/ecosystems/data Ecosystems data
CategoriesApi get_memecoins_data GET /v1/memecoins/data Memecoins data
CategoriesApi get_narratives_data GET /v1/narratives/data Narratives data
DerivativesApi get_funding_rates GET /v1/funding/rates Funding rates
DerivativesApi get_futures_coins GET /v1/futures/coins Available futures coins
DerivativesApi get_futures_data GET /v1/futures/data Futures chart data
DerivativesApi get_options_data GET /v1/options/data Options chart data
ExchangeListingsApi get_listings_data GET /v1/listings/data Exchange listings hub data
ExchangeListingsApi get_listings_recent GET /v1/listings/recent Recent exchange listings
MarketDataApi get_correlation_matrix GET /v1/correlation/matrix Correlation matrix
MarketDataApi get_derivatives_overview GET /v1/market/derivatives-overview Market-wide derivatives overview
MarketDataApi get_gem_finder_data GET /v1/gem-finder/data Gem finder
MarketDataApi get_heatmap_data GET /v1/heatmap/data Market heatmap
MarketDataApi get_market_overview GET /v1/tracker/market-overview Market overview
MarketDataApi get_news_feed GET /v1/news/feed News feed
MarketDataApi get_price_prediction_data GET /v1/price-prediction/data Price prediction
MarketDataApi search_market_cap GET /v1/market-cap/search Market cap search
SystemApi get_coverage GET /v1/meta/coverage API data coverage
SystemApi get_health GET /v1/health Health check

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

BearerAuth

  • Type: Bearer authentication

ApiKeyAuth

  • Type: API key
  • API key parameter name: X-API-Key
  • Location: HTTP header

Author

support@sharpe.ai

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

sharpe_api-1.0.0.tar.gz (45.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sharpe_api-1.0.0-py3-none-any.whl (75.2 kB view details)

Uploaded Python 3

File details

Details for the file sharpe_api-1.0.0.tar.gz.

File metadata

  • Download URL: sharpe_api-1.0.0.tar.gz
  • Upload date:
  • Size: 45.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for sharpe_api-1.0.0.tar.gz
Algorithm Hash digest
SHA256 168b82567039b253bf91ee17aae3b9757a738306db5ccdfda2bf0481b9265568
MD5 e79876bff8abca48fe298aab0939c66a
BLAKE2b-256 5c66441913715758b5578873ada0ea827510155ea0cf361e8cf4b4f1f9ff7f68

See more details on using hashes here.

File details

Details for the file sharpe_api-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: sharpe_api-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 75.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for sharpe_api-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bd50478a6d85387553fa935ebfc11b0d40edbba0b9809c90610ec753fb98fdfc
MD5 19837af89993f8a6c61d1f051092a5da
BLAKE2b-256 12c855cddb65dfb08677dad9fc9d1ab5b132d05bb1df1fbea584501992d93bee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page