Metadata-Version: 2.4
Name: graphsense-python
Version: 2.10.0
Summary: GraphSense API
Author-email: Iknaio Cryptoasset Analytics GmbH <contact@iknaio.com>
License-Expression: MIT
Project-URL: Homepage, https://graphsense.github.io/
Project-URL: Source, https://github.com/graphsense/graphsense-lib
Project-URL: Changelog, https://github.com/graphsense/graphsense-lib/blob/master/CHANGELOG.md
Project-URL: Tracker, https://github.com/graphsense/graphsense-lib/issues
Keywords: OpenAPI,OpenAPI-Generator,GraphSense API
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: urllib3<3.0.0,>=2.1.0
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: pydantic>=2
Requires-Dist: typing-extensions>=4.7.1

# graphsense-python
GraphSense API provides programmatic access to blockchain analytics data across multiple ledgers. Use it to explore addresses, entities, blocks, transactions, tags, token activity, and exchange-rate context, and to integrate investigation workflows into your own applications and automation.

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 2.10.0
- Package version: 2.10.0
- Generator version: 7.19.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://www.iknaio.com/](https://www.iknaio.com/)

## Requirements.

Python 3.9+

## Installation & Usage
### pip install

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

```sh
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:
```python
import graphsense
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import graphsense
```

### Tests

Execute `pytest` to run the tests.

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

import graphsense
from graphsense.rest import ApiException
from pprint import pprint

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

# 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: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]

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


# Enter a context with an instance of the API client
with graphsense.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = graphsense.AddressesApi(api_client)
    currency = 'btc' # str | The cryptocurrency code (e.g., btc)
    address = '1Archive1n2C579dMsAu3iC6tWzuQJz8dN' # str | The cryptocurrency address
    include_actors = True # bool | Whether to include actor information (optional) (default to True)

    try:
        # Get an address
        api_response = api_instance.get_address(currency, address, include_actors=include_actors)
        print("The response of AddressesApi->get_address:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AddressesApi->get_address: %s\n" % e)

```

## Documentation for API Endpoints

All URIs are relative to *https://api.iknaio.com*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AddressesApi* | [**get_address**](docs/AddressesApi.md#get_address) | **GET** /{currency}/addresses/{address} | Get an address
*AddressesApi* | [**get_address_entity**](docs/AddressesApi.md#get_address_entity) | **GET** /{currency}/addresses/{address}/entity | Get the entity for an address
*AddressesApi* | [**get_tag_summary_by_address**](docs/AddressesApi.md#get_tag_summary_by_address) | **GET** /{currency}/addresses/{address}/tag_summary | Get address attribution tag summary
*AddressesApi* | [**list_address_links**](docs/AddressesApi.md#list_address_links) | **GET** /{currency}/addresses/{address}/links | List transactions between two addresses
*AddressesApi* | [**list_address_neighbors**](docs/AddressesApi.md#list_address_neighbors) | **GET** /{currency}/addresses/{address}/neighbors | List neighboring addresses
*AddressesApi* | [**list_address_txs**](docs/AddressesApi.md#list_address_txs) | **GET** /{currency}/addresses/{address}/txs | List transactions involving an address
*AddressesApi* | [**list_related_addresses**](docs/AddressesApi.md#list_related_addresses) | **GET** /{currency}/addresses/{address}/related_addresses | List related addresses
*AddressesApi* | [**list_tags_by_address**](docs/AddressesApi.md#list_tags_by_address) | **GET** /{currency}/addresses/{address}/tags | List attribution tags for an address
*BlocksApi* | [**get_block**](docs/BlocksApi.md#get_block) | **GET** /{currency}/blocks/{height} | Get block details by height
*BlocksApi* | [**get_block_by_date**](docs/BlocksApi.md#get_block_by_date) | **GET** /{currency}/block_by_date/{date} | Get block at or before a date
*BlocksApi* | [**list_block_txs**](docs/BlocksApi.md#list_block_txs) | **GET** /{currency}/blocks/{height}/txs | List transactions in a block
*BulkApi* | [**bulk_csv**](docs/BulkApi.md#bulk_csv) | **POST** /{currency}/bulk.csv/{operation} | Stream bulk operation results as CSV
*BulkApi* | [**bulk_json**](docs/BulkApi.md#bulk_json) | **POST** /{currency}/bulk.json/{operation} | Stream bulk operation results as JSON
*EntitiesApi* | [**get_entity**](docs/EntitiesApi.md#get_entity) | **GET** /{currency}/entities/{entity} | Get entity details
*EntitiesApi* | [**list_address_tags_by_entity**](docs/EntitiesApi.md#list_address_tags_by_entity) | **GET** /{currency}/entities/{entity}/tags | List entity address tags
*EntitiesApi* | [**list_entity_addresses**](docs/EntitiesApi.md#list_entity_addresses) | **GET** /{currency}/entities/{entity}/addresses | List entity addresses
*EntitiesApi* | [**list_entity_links**](docs/EntitiesApi.md#list_entity_links) | **GET** /{currency}/entities/{entity}/links | List transactions between entities
*EntitiesApi* | [**list_entity_neighbors**](docs/EntitiesApi.md#list_entity_neighbors) | **GET** /{currency}/entities/{entity}/neighbors | List neighboring entities
*EntitiesApi* | [**list_entity_txs**](docs/EntitiesApi.md#list_entity_txs) | **GET** /{currency}/entities/{entity}/txs | List entity transactions
*EntitiesApi* | [**search_entity_neighbors**](docs/EntitiesApi.md#search_entity_neighbors) | **GET** /{currency}/entities/{entity}/search | Search entity neighborhood
*GeneralApi* | [**get_statistics**](docs/GeneralApi.md#get_statistics) | **GET** /stats | Get platform statistics for supported currencies
*GeneralApi* | [**search**](docs/GeneralApi.md#search) | **GET** /search | Search addresses, transactions, actors, and labels
*RatesApi* | [**get_exchange_rates**](docs/RatesApi.md#get_exchange_rates) | **GET** /{currency}/rates/{height} | Get fiat exchange rates at a block height
*TagsApi* | [**get_actor**](docs/TagsApi.md#get_actor) | **GET** /tags/actors/{actor} | Get actor details by ID
*TagsApi* | [**get_actor_tags**](docs/TagsApi.md#get_actor_tags) | **GET** /tags/actors/{actor}/tags | List tags associated with an actor
*TagsApi* | [**list_address_tags**](docs/TagsApi.md#list_address_tags) | **GET** /tags | List address tags by label
*TagsApi* | [**list_concepts**](docs/TagsApi.md#list_concepts) | **GET** /tags/taxonomies/{taxonomy}/concepts | List concepts for a taxonomy
*TagsApi* | [**list_taxonomies**](docs/TagsApi.md#list_taxonomies) | **GET** /tags/taxonomies | List all taxonomies
*TagsApi* | [**report_tag**](docs/TagsApi.md#report_tag) | **POST** /tags/report-tag | Submit a user-reported tag
*TokensApi* | [**list_supported_tokens**](docs/TokensApi.md#list_supported_tokens) | **GET** /{currency}/supported_tokens | List supported tokens for a currency
*TxsApi* | [**get_spending_txs**](docs/TxsApi.md#get_spending_txs) | **GET** /{currency}/txs/{tx_hash}/spending | List source transactions
*TxsApi* | [**get_spent_in_txs**](docs/TxsApi.md#get_spent_in_txs) | **GET** /{currency}/txs/{tx_hash}/spent_in | List spending transactions
*TxsApi* | [**get_tx**](docs/TxsApi.md#get_tx) | **GET** /{currency}/txs/{tx_hash} | Get transaction details by hash
*TxsApi* | [**get_tx_conversions**](docs/TxsApi.md#get_tx_conversions) | **GET** /{currency}/txs/{tx_hash}/conversions | List DeFi conversions in a transaction
*TxsApi* | [**get_tx_io**](docs/TxsApi.md#get_tx_io) | **GET** /{currency}/txs/{tx_hash}/{io} | List transaction inputs or outputs
*TxsApi* | [**list_token_txs**](docs/TxsApi.md#list_token_txs) | **GET** /{currency}/token_txs/{tx_hash} | List token transfers in a transaction
*TxsApi* | [**list_tx_flows**](docs/TxsApi.md#list_tx_flows) | **GET** /{currency}/txs/{tx_hash}/flows | List transaction asset flows


## Documentation For Models

 - [Actor](docs/Actor.md)
 - [ActorContext](docs/ActorContext.md)
 - [Address](docs/Address.md)
 - [AddressOutput](docs/AddressOutput.md)
 - [AddressTag](docs/AddressTag.md)
 - [AddressTags](docs/AddressTags.md)
 - [AddressTx](docs/AddressTx.md)
 - [AddressTxUtxo](docs/AddressTxUtxo.md)
 - [AddressTxs](docs/AddressTxs.md)
 - [Block](docs/Block.md)
 - [BlockAtDate](docs/BlockAtDate.md)
 - [ChangeHeuristics](docs/ChangeHeuristics.md)
 - [CoinJoinConsensus](docs/CoinJoinConsensus.md)
 - [CoinJoinHeuristics](docs/CoinJoinHeuristics.md)
 - [Concept](docs/Concept.md)
 - [ConsensusEntry](docs/ConsensusEntry.md)
 - [CurrencyStats](docs/CurrencyStats.md)
 - [DirectChangeHeuristic](docs/DirectChangeHeuristic.md)
 - [Entity](docs/Entity.md)
 - [EntityAddresses](docs/EntityAddresses.md)
 - [ExternalConversion](docs/ExternalConversion.md)
 - [HTTPValidationError](docs/HTTPValidationError.md)
 - [JoinMarketHeuristic](docs/JoinMarketHeuristic.md)
 - [LabelSummary](docs/LabelSummary.md)
 - [LabeledItemRef](docs/LabeledItemRef.md)
 - [Link](docs/Link.md)
 - [LinkUtxo](docs/LinkUtxo.md)
 - [Links](docs/Links.md)
 - [LinksInner](docs/LinksInner.md)
 - [LocationInner](docs/LocationInner.md)
 - [MultiInputChangeHeuristic](docs/MultiInputChangeHeuristic.md)
 - [NeighborAddress](docs/NeighborAddress.md)
 - [NeighborAddresses](docs/NeighborAddresses.md)
 - [NeighborEntities](docs/NeighborEntities.md)
 - [NeighborEntity](docs/NeighborEntity.md)
 - [OneTimeChangeHeuristic](docs/OneTimeChangeHeuristic.md)
 - [Rate](docs/Rate.md)
 - [Rates](docs/Rates.md)
 - [RelatedAddress](docs/RelatedAddress.md)
 - [RelatedAddresses](docs/RelatedAddresses.md)
 - [SearchResult](docs/SearchResult.md)
 - [SearchResultByCurrency](docs/SearchResultByCurrency.md)
 - [SearchResultLevel1](docs/SearchResultLevel1.md)
 - [SearchResultLevel2](docs/SearchResultLevel2.md)
 - [SearchResultLevel3](docs/SearchResultLevel3.md)
 - [SearchResultLevel4](docs/SearchResultLevel4.md)
 - [SearchResultLevel5](docs/SearchResultLevel5.md)
 - [SearchResultLevel6](docs/SearchResultLevel6.md)
 - [Stats](docs/Stats.md)
 - [Tag](docs/Tag.md)
 - [TagCloudEntry](docs/TagCloudEntry.md)
 - [TagSummary](docs/TagSummary.md)
 - [Taxonomy](docs/Taxonomy.md)
 - [TokenConfig](docs/TokenConfig.md)
 - [TokenConfigs](docs/TokenConfigs.md)
 - [Tx](docs/Tx.md)
 - [TxAccount](docs/TxAccount.md)
 - [TxRef](docs/TxRef.md)
 - [TxSummary](docs/TxSummary.md)
 - [TxUtxo](docs/TxUtxo.md)
 - [TxValue](docs/TxValue.md)
 - [UserReportedTag](docs/UserReportedTag.md)
 - [UserTagReportResponse](docs/UserTagReportResponse.md)
 - [UtxoHeuristics](docs/UtxoHeuristics.md)
 - [ValidationError](docs/ValidationError.md)
 - [Values](docs/Values.md)
 - [WasabiHeuristic](docs/WasabiHeuristic.md)
 - [WhirlpoolCoinJoinHeuristic](docs/WhirlpoolCoinJoinHeuristic.md)
 - [WhirlpoolTx0Heuristic](docs/WhirlpoolTx0Heuristic.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization


Authentication schemes defined for the API:
<a id="api_key"></a>
### api_key

- **Type**: API key
- **API key parameter name**: Authorization
- **Location**: HTTP header


## Author

contact@iknaio.com


