Skip to main content

Installation

Install the package using pip:
pip install git+https://github.com/tradewatch-io/python-sdk.git

Usage

import tradewatch
from tradewatch.rest import ApiException
from pprint import pprint

# Configure API key authorization: api_key_query
configuration = tradewatch.Configuration(
    host = "https://api.tradewatch.io"
)
configuration.api_key['api_key_query'] = 'YOUR_API_KEY'

# Enter a context with an instance of the API client
with tradewatch.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tradewatch.AccountApi(api_client)
    limit = 56 # int |  (optional)
    interval = tradewatch.AccountUsageStatisticsInterval() # AccountUsageStatisticsInterval |  (optional)

    try:
        # Usage statistics
        api_response = api_instance.get_usage(limit=limit, interval=interval)
        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)

More Examples

Find more examples in our GitHub repository.