GraphSense API
Project description
graphsense-python
GraphSense API provides programmatic access to various ledgers' addresses, entities, blocks, transactions and tags for automated and highly efficient forensics tasks.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 2.9.5
- Package version: 2.9.5
- Generator version: 7.19.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
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 graphsense
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 graphsense
Tests
Execute pytest to run the tests.
Getting Started
Please follow the installation procedure and then run the following:
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 | GET /{currency}/addresses/{address} | Get an address |
| AddressesApi | get_address_entity | GET /{currency}/addresses/{address}/entity | Get the entity of an address |
| AddressesApi | get_tag_summary_by_address | GET /{currency}/addresses/{address}/tag_summary | Get attribution tag summary for a given address |
| AddressesApi | list_address_links | GET /{currency}/addresses/{address}/links | Get outgoing transactions between two addresses |
| AddressesApi | list_address_neighbors | GET /{currency}/addresses/{address}/neighbors | Get an address's neighbors in the address graph |
| AddressesApi | list_address_txs | GET /{currency}/addresses/{address}/txs | Get all transactions an address has been involved in |
| AddressesApi | list_related_addresses | GET /{currency}/addresses/{address}/related_addresses | Get related addresses to the input address |
| AddressesApi | list_tags_by_address | GET /{currency}/addresses/{address}/tags | Get attribution tags for a given address |
| BlocksApi | get_block | GET /{currency}/blocks/{height} | Get a block by its height |
| BlocksApi | get_block_by_date | GET /{currency}/block_by_date/{date} | Get block by date |
| BlocksApi | list_block_txs | GET /{currency}/blocks/{height}/txs | Get block transactions |
| BulkApi | bulk_csv | POST /{currency}/bulk.csv/{operation} | Get data as CSV in bulk |
| BulkApi | bulk_json | POST /{currency}/bulk.json/{operation} | Get data as JSON in bulk |
| EntitiesApi | get_entity | GET /{currency}/entities/{entity} | Get an entity |
| EntitiesApi | list_address_tags_by_entity | GET /{currency}/entities/{entity}/tags | Get address tags for a given entity |
| EntitiesApi | list_entity_addresses | GET /{currency}/entities/{entity}/addresses | Get an entity's addresses |
| EntitiesApi | list_entity_links | GET /{currency}/entities/{entity}/links | Get transactions between two entities |
| EntitiesApi | list_entity_neighbors | GET /{currency}/entities/{entity}/neighbors | Get an entity's neighbors in the entity graph |
| EntitiesApi | list_entity_txs | GET /{currency}/entities/{entity}/txs | Get all transactions an entity has been involved in |
| EntitiesApi | search_entity_neighbors | GET /{currency}/entities/{entity}/search | Search neighbors of an entity |
| GeneralApi | get_statistics | GET /stats | Get statistics of supported currencies |
| GeneralApi | search | GET /search | Returns matching addresses, transactions and labels |
| RatesApi | get_exchange_rates | GET /{currency}/rates/{height} | Get exchange rates for a given block height |
| TagsApi | get_actor | GET /tags/actors/{actor} | Get an actor by ID |
| TagsApi | get_actor_tags | GET /tags/actors/{actor}/tags | Get tags associated with an actor |
| TagsApi | list_address_tags | GET /tags | Get address tags by label |
| TagsApi | list_concepts | GET /tags/taxonomies/{taxonomy}/concepts | List concepts for a taxonomy |
| TagsApi | list_taxonomies | GET /tags/taxonomies | List all taxonomies |
| TagsApi | report_tag | POST /tags/report-tag | Report a new tag |
| TokensApi | list_supported_tokens | GET /{currency}/supported_tokens | Get supported tokens for a currency |
| TxsApi | get_spending_txs | GET /{currency}/txs/{tx_hash}/spending | Get transactions that this transaction is spending from |
| TxsApi | get_spent_in_txs | GET /{currency}/txs/{tx_hash}/spent_in | Get transactions that spent outputs from this transaction |
| TxsApi | get_tx | GET /{currency}/txs/{tx_hash} | Get a transaction by its hash |
| TxsApi | get_tx_conversions | GET /{currency}/txs/{tx_hash}/conversions | Get DeFi conversions for a transaction |
| TxsApi | get_tx_io | GET /{currency}/txs/{tx_hash}/{io} | Get transaction inputs or outputs |
| TxsApi | list_token_txs | GET /{currency}/token_txs/{tx_hash} | Returns all token transactions in a given transaction |
| TxsApi | list_tx_flows | GET /{currency}/txs/{tx_hash}/flows | Get asset flows within a transaction |
Documentation For Models
- Actor
- ActorContext
- Address
- AddressTag
- AddressTags
- AddressTx
- AddressTxUtxo
- AddressTxs
- Block
- BlockAtDate
- Concept
- CurrencyStats
- Entity
- EntityAddresses
- ExternalConversion
- HTTPValidationError
- LabelSummary
- LabeledItemRef
- Link
- LinkUtxo
- Links
- LinksInner
- LocationInner
- NeighborAddress
- NeighborAddresses
- NeighborEntities
- NeighborEntity
- Rate
- Rates
- RelatedAddress
- RelatedAddresses
- SearchResult
- SearchResultByCurrency
- SearchResultLevel1
- SearchResultLevel2
- SearchResultLevel3
- SearchResultLevel4
- SearchResultLevel5
- SearchResultLevel6
- Stats
- Tag
- TagCloudEntry
- TagSummary
- Taxonomy
- TokenConfig
- TokenConfigs
- Tx
- TxAccount
- TxRef
- TxSummary
- TxUtxo
- TxValue
- UserReportedTag
- UserTagReportResponse
- ValidationError
- Values
Documentation For Authorization
Authentication schemes defined for the API:
api_key
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
Author
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file graphsense_python-2.9.5.tar.gz.
File metadata
- Download URL: graphsense_python-2.9.5.tar.gz
- Upload date:
- Size: 73.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae6f2f23556ca275ed6bd86dea197a6f02f922f2e03817a22082fd80d9363760
|
|
| MD5 |
0359714fabaca7370f76e39bda03e568
|
|
| BLAKE2b-256 |
3bfb46bd80432d2997eab94f66f6be303cffe0dccdca83e53ade3e6730861a30
|
File details
Details for the file graphsense_python-2.9.5-py3-none-any.whl.
File metadata
- Download URL: graphsense_python-2.9.5-py3-none-any.whl
- Upload date:
- Size: 168.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
269249155fa975e934886e460ff52cfffd6d20f47b50ebc9270f1bf57c4c80af
|
|
| MD5 |
ac3dd5c14265b76d7cb9b48a43941d29
|
|
| BLAKE2b-256 |
4f13a59c3d4b622c7afdc681c03d86ea0ed0ad1abc2c85ccd4a7386a264b212b
|