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.55
  • 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}/raw/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_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.55.tar.gz (115.7 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.55-py3-none-any.whl (443.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: satstream_python_sdk-1.0.55.tar.gz
  • Upload date:
  • Size: 115.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for satstream_python_sdk-1.0.55.tar.gz
Algorithm Hash digest
SHA256 f33fbd7cbd39a4961f355ca644944de02f613de800eceb766735db5657dbe9c2
MD5 6e71bc08674ffae75e737944af7763c1
BLAKE2b-256 e336c5fb7127f69ae32705e2cada4135923ff5e5a9447cc9ac327785bacdc1bb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for satstream_python_sdk-1.0.55-py3-none-any.whl
Algorithm Hash digest
SHA256 91e3dc8a34f2cb371a944e84f09ed4e724d4efac11a0828bfa4383285783c94f
MD5 4865f17058d5bf80a55c8897617f8ef5
BLAKE2b-256 f5c7b71dcc7883c3aeea011946d1967e5cf38b88d0917213d88aacae534fe699

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