Skip to main content

Satstream API

Project description

satstream_python_sdk

Satstream API

This Python package is automatically generated by the Swagger Codegen project:

  • API version: 1.0
  • Package version: 1.0.34
  • Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen For more information, please visit https://satstream.io

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

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 satstream_python_sdk 

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 satstream_python_sdk

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import satstream_python_sdk
from satstream_python_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
configuration = satstream_python_sdk.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'

# create an instance of the API class
api_instance = satstream_python_sdk.AddressesApi(satstream_python_sdk.ApiClient(configuration))
address = 'address_example' # str | Address

try:
    # Get address info
    api_response = api_instance.get_address(address)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AddressesApi->get_address: %s\n" % e)

# Configure API key authorization: ApiKeyAuth
configuration = satstream_python_sdk.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'

# create an instance of the API class
api_instance = satstream_python_sdk.AddressesApi(satstream_python_sdk.ApiClient(configuration))
address = 'address_example' # str | Address

try:
    # Get address balance
    api_response = api_instance.get_address_balance(address)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AddressesApi->get_address_balance: %s\n" % e)

# Configure API key authorization: ApiKeyAuth
configuration = satstream_python_sdk.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'

# create an instance of the API class
api_instance = satstream_python_sdk.AddressesApi(satstream_python_sdk.ApiClient(configuration))
address = 'address_example' # str | Address
page_size = 56 # int | Number of results per page (default: 100, max: 1000) (optional)
start_height = 56 # int | Start block height (optional)
end_height = 56 # int | End block height (optional)
cursor = 'cursor_example' # str | Base64 encoded cursor for pagination (optional)

try:
    # Get address deltas
    api_response = api_instance.get_address_deltas(address, page_size=page_size, start_height=start_height, end_height=end_height, cursor=cursor)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AddressesApi->get_address_deltas: %s\n" % e)

# Configure API key authorization: ApiKeyAuth
configuration = satstream_python_sdk.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'

# create an instance of the API class
api_instance = satstream_python_sdk.AddressesApi(satstream_python_sdk.ApiClient(configuration))
address = 'address_example' # str | Address
page_size = 56 # int | Number of results per page (default: 100, max: 1000) (optional)
start_height = 56 # int | Start block height (optional)
end_height = 56 # int | End block height (optional)
cursor = 'cursor_example' # str | Cursor for pagination (optional)

try:
    # Get address rune deltas
    api_response = api_instance.get_address_rune_deltas(address, page_size=page_size, start_height=start_height, end_height=end_height, cursor=cursor)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AddressesApi->get_address_rune_deltas: %s\n" % e)

# Configure API key authorization: ApiKeyAuth
configuration = satstream_python_sdk.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'

# create an instance of the API class
api_instance = satstream_python_sdk.AddressesApi(satstream_python_sdk.ApiClient(configuration))
address = 'address_example' # str | Address
type = 'type_example' # str | UTXO Type (optional)

try:
    # Get UTXOs for an address
    api_response = api_instance.get_address_utxos(address, type=type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AddressesApi->get_address_utxos: %s\n" % e)

# Configure API key authorization: ApiKeyAuth
configuration = satstream_python_sdk.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'

# create an instance of the API class
api_instance = satstream_python_sdk.AddressesApi(satstream_python_sdk.ApiClient(configuration))
address = 'address_example' # str | Bitcoin address to validate

try:
    # Validate address
    api_response = api_instance.validate_address(address)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AddressesApi->validate_address: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.satstream.io/api/v1

Class Method HTTP request Description
AddressesApi get_address GET /address/{address} Get address info
AddressesApi get_address_balance GET /address/{address}/balance Get address balance
AddressesApi get_address_deltas GET /address/{address}/deltas Get address deltas
AddressesApi get_address_rune_deltas GET /address/{address}/deltas/runes Get address rune deltas
AddressesApi get_address_utxos GET /address/{address}/outputs Get UTXOs for an address
AddressesApi validate_address GET /address/{address}/validate Validate address
BlocksApi get_block_count GET /blockcount Get the height of the latest block
BlocksApi get_block_decoded GET /block/raw/{identifier}/decoded Get block by hash or height (verbosity 2)
BlocksApi get_block_hash_by_height GET /blockhash/{block_height} Returns blockhash of specified block.
BlocksApi get_block_hex GET /block/raw/{identifier}/hex Get block by hash or height (verbosity 0)
BlocksApi get_block_info GET /block/{identifier} Get block info by hash or height
BlocksApi get_block_prevout GET /block/raw/{identifier}/prevout Get block by hash or height (verbosity 3)
BlocksApi get_block_stats POST /block/stats Get block stats
BlocksApi get_block_summary GET /block/raw/{identifier}/summary Get block by hash or height (verbosity 1)
BlocksApi get_blockchain_info GET /blockchain/info Get blockchain information
BlocksApi get_blocks GET /blocks Returns the latest block height, last 100 block hashes, and featured inscriptions
BlocksApi get_latest_block_height GET /blockheight Returns the height of the latest block.
BlocksApi get_latest_blockhash GET /blockhash Returns blockhash for the latest block.
BlocksApi get_latest_blocktime GET /blocktime Get the timestamp of the latest block
FeesApi estimate_raw_fee POST /fee/estimate-raw Estimate Raw Fee
FeesApi estimate_smart_fee POST /fee/estimate-smart Estimate smart fee
InscriptionsApi fetch_inscription_child GET /inscription/{inscription_id}/{child_index} Get inscription child info
InscriptionsApi fetch_inscriptions POST /inscriptions Fetch multiple inscriptions
InscriptionsApi get_block_inscriptions GET /inscriptions/block/{block_height} Get inscriptions in a specific block
InscriptionsApi get_block_inscriptions_page GET /inscriptions/block/{block_height}/{page} Get paginated inscriptions in a specific block
InscriptionsApi get_inscription GET /inscription/{inscription_id} Get inscription info
InscriptionsApi get_latest_inscriptions GET /inscriptions Get latest inscriptions
InscriptionsApi get_latest_inscriptions_page GET /inscriptions/{page} Get latest inscriptions page
MempoolApi get_mempool_ancestors POST /mempool/ancestors Get mempool ancestors
MempoolApi get_mempool_descendants POST /mempool/descendants Get mempool descendants
MempoolApi get_mempool_info GET /mempool/info Get mempool information
MempoolApi get_raw_mempool POST /mempool/raw Get raw mempool
MempoolApi test_mempool_accept POST /mempool/test-accept Test mempool accept
MiningApi get_mining_info GET /mining/info Get mining information
MiningApi get_network_hashps POST /mining/networkhashps Get network hash per second
NetworkApi get_chain_tx_stats POST /chain/txstats Get chain tx stats
NetworkApi get_difficulty GET /chain/difficulty Get difficulty
OutputsApi get_output_by_outpoint GET /output/{outpoint} Get output info by outpoint
OutputsApi get_outputs POST /outputs Get multiple outputs
PSBTsApi analyze_psbt POST /psbt/analyze Analyze PSBT
PSBTsApi combine_psbt POST /psbt/combine Combine PSBTs
PSBTsApi create_psbt POST /psbt/create Create PSBT
PSBTsApi decode_psbt POST /psbt/decode Decode PSBT
PSBTsApi join_psbts POST /psbt/join Join PSBTs
RunesApi get_latest_runes GET /runes Get latest runes
RunesApi get_latest_runes_page GET /runes/{page} Get latest runes page
RunesApi get_rune GET /rune/{identifier} Get rune info
SatoshisApi get_satoshi GET /sat/{number} Get satoshi info
ScriptsApi decode_script POST /script/decode Decode Script
StatusApi get_status GET /status Get server status
TransactionsApi combine_raw_transaction POST /tx/combine Combine Raw Transactions
TransactionsApi convert_to_psbt POST /tx/convert-to-psbt Convert Raw Transaction to PSBT
TransactionsApi create_raw_transaction POST /tx/create Create Raw Transaction
TransactionsApi decode_tx_inscriptions GET /tx/{txid}/inscriptions Decode transaction inscriptions
TransactionsApi get_raw_transaction GET /tx/{txid}/raw/decode Get raw transaction (verbosity 1)
TransactionsApi get_raw_transaction_hex GET /tx/{txid}/hex Get raw transaction (verbosity 0)
TransactionsApi get_raw_transaction_prevout GET /tx/{txid}/raw/prevout Get raw transaction with prevouts (verbosity 2)
TransactionsApi get_tx_out POST /tx/out Get transaction output
TransactionsApi get_tx_out_proof POST /tx/outproof Get transaction output proof
TransactionsApi get_tx_out_set_info POST /tx/out/set/info Get transaction output set information
TransactionsApi get_tx_spending_prevout POST /tx/spending-prevout Get transaction spending prevout
TransactionsApi send_raw_transaction POST /tx/send Send raw transaction
TransactionsApi verify_tx_out_proof POST /tx/outproof/verify Verify transaction output proof

Documentation For Models

Documentation For Authorization

ApiKeyAuth

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

Author

team@satstream.io

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

satstream_python_sdk-1.0.34.tar.gz (119.8 kB view details)

Uploaded Source

Built Distribution

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

satstream_python_sdk-1.0.34-py3-none-any.whl (457.1 kB view details)

Uploaded Python 3

File details

Details for the file satstream_python_sdk-1.0.34.tar.gz.

File metadata

  • Download URL: satstream_python_sdk-1.0.34.tar.gz
  • Upload date:
  • Size: 119.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for satstream_python_sdk-1.0.34.tar.gz
Algorithm Hash digest
SHA256 18b694c9c92c2d9d4f5b75861c1c94f0747a99ccf500b046c6be52c31923b67a
MD5 ff6b7c62d9bb411d1b1ea26323aca053
BLAKE2b-256 ee83cd07b60bb35a9f514e8cd5ca28acdd0b453dbfd27a1b1a732236e66b3c06

See more details on using hashes here.

File details

Details for the file satstream_python_sdk-1.0.34-py3-none-any.whl.

File metadata

File hashes

Hashes for satstream_python_sdk-1.0.34-py3-none-any.whl
Algorithm Hash digest
SHA256 b1d67cb4d485f36ae056c403725ca429268fb46d111379d80869bd97fbeef183
MD5 eb9e6f28dea9e4cc38aaef66ed0f7698
BLAKE2b-256 8df904d3d5f9acb55defa610c92b3db8104db057cb80f7ecc036db60298083bf

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