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.38
- 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
- AddressResponse
- AddressRuneDelta
- AllOfBlockVin2ScriptSig
- AllOfBlockVin3Prevout
- AllOfDecodedPSBTInputFinalScriptsig
- AllOfDecodedPSBTInputNonWitnessUtxo
- AllOfDecodedPSBTInputRedeemScript
- AllOfDecodedPSBTInputUnknown
- AllOfDecodedPSBTInputWitnessScript
- AllOfDecodedPSBTInputWitnessUtxo
- AllOfDecodedPSBTOutputRedeemScript
- AllOfDecodedPSBTOutputUnknown
- AllOfDecodedPSBTOutputWitnessScript
- AllOfDecodedPSBTTx
- AllOfDecodedPSBTUnknown
- AllOfDecodedScriptSegwit
- AllOfFeeHorizonEstimateFail
- AllOfFeeHorizonEstimatePass
- AllOfMempoolEntryFees
- AllOfPSBTWitnessUtxoScriptPubKey
- AllOfRawFeeEstimateLong
- AllOfRawFeeEstimateMedium
- AllOfRawFeeEstimateShort
- AllOfRawMempoolDataSequence
- AllOfTestMempoolAcceptResultFees
- AllOfTxOutScriptPubKey
- AllOfUTXOBlockInfoUnspendables
- AllOfUTXOSetInfoBlockInfo
- AnalyzePSBTRequest
- AnalyzePSBTResponse
- BigInt
- Bip32Deriv
- Block1
- Block2
- Block3
- BlockResponse
- BlockStats
- BlockVin2
- BlockVin3
- BlockchainInfo
- BlocksResponse
- BtcTx2
- BtcTx3
- ChainTxStats
- CombinePSBTRequest
- CombinePSBTResponse
- CombineRawTransactionResponse
- ConvertToPSBTResponse
- CreatePSBTInput
- CreatePSBTRequest
- CreatePSBTResponse
- CreateRawTransactionResponse
- DecodePSBTRequest
- DecodePSBTResponse
- DecodeResponse
- DecodeScriptRequest
- DecodeScriptResponse
- DecodeTransactionResponse
- DecodedInscription
- DecodedPSBT
- DecodedPSBTInput
- DecodedPSBTOutput
- DecodedScript
- EstimateRawFeeRequest
- EstimateRawFeeResponse
- EstimateSmartFeeRequest
- EstimateSmartFeeResponse
- FeeHorizonEstimate
- FeeRange
- FetchInscriptionsResponse
- GetAddressBalanceResponse
- GetAddressBalanceResponseData
- GetAddressDeltasResponse
- GetAddressResponse
- GetAddressRuneDeltasResponse
- GetAddressUTXOsResponse
- GetBlockCountResponse
- GetBlockDecodedResponse
- GetBlockHashByHeightResponse
- GetBlockHexResponse
- GetBlockInscriptionsResponse
- GetBlockPrevoutResponse
- GetBlockResponse
- GetBlockStatsRequest
- GetBlockStatsResponse
- GetBlockSummaryResponse
- GetBlockchainInfoResponse
- GetBlocksResponse
- GetChainTxStatsRequest
- GetChainTxStatsResponse
- GetDifficultyResponse
- GetInscriptionChildResponse
- GetInscriptionResponse
- GetLatestBlockHashResponse
- GetLatestBlockHeightResponse
- GetLatestBlockTimeResponse
- GetLatestInscriptionsResponse
- GetLatestRunesResponse
- GetMempoolAncestorsRequest
- GetMempoolAncestorsResponse
- GetMempoolDescendantsRequest
- GetMempoolDescendantsResponse
- GetMempoolInfoResponse
- GetMiningInfoResponse
- GetNetworkHashPSRequest
- GetNetworkHashPSResponse
- GetRawMempoolRequest
- GetRawMempoolResponse
- GetRawTransactionDecodeResponse
- GetRawTransactionHexResponse
- GetRawTransactionPrevoutResponse
- GetRuneResponse
- GetSatoshiResponse
- GetStatusResponse
- GetTxOutProofResponse
- GetTxOutResponse
- GetTxSpendingPrevoutResponse
- GithubComSatstreamSsUtilsDatabaseAddressDelta
- GithubComSatstreamSsUtilsOrdServerResponsesRuneDetails
- GithubComSatstreamSsUtilsOrdServerResponsesRuneListEntry
- GithubComSatstreamSsUtilsOrdServerResponsesRunesListResponse
- InlineResponse200
- InlineResponse2001
- InlineResponse2002
- Input
- InscriptionData
- InscriptionResponse
- JoinPSBTsRequest
- JoinPSBTsResponse
- LatestInscriptionsResponse
- MempoolAncestorsData
- MempoolDescendantsData
- MempoolEntry
- MempoolFees
- MempoolInfo
- MempoolSequence
- MiningInfo
- Output
- OutputResponse
- PSBTAnalysis
- PSBTBip32Deriv
- PSBTInputAnalysis
- PSBTMissingData
- PSBTWitnessUtxo
- PrevOut
- RawFeeEstimate
- RawMempoolData
- RawTx1
- RawTx2
- RuneResponse
- RuneTerms
- RunesBalance
- RunestoneData
- SatoshiResponse
- Script
- ScriptPubKey
- ScriptSig
- SegwitDetails
- SendRawTransactionResponse
- SmartFeeEstimate
- StatusResponse
- TestMempoolAcceptRequest
- TestMempoolAcceptResponse
- TestMempoolAcceptResult
- TestMempoolFees
- Transaction
- TransactionCombineRawTransactionRequest
- TransactionConvertToPSBTRequest
- TransactionCreateRawTxInput
- TransactionCreateRawTxRequest
- TransactionGetTxOutProofRequest
- TransactionGetTxOutRequest
- TransactionGetTxOutSetInfoRequest
- TransactionGetTxSpendingPrevoutRequest
- TransactionSendRawTransactionRequest
- TransactionVerifyTxOutProofRequest
- TxOut
- TxSpendingPrevoutInput
- TxSpendingPrevoutResult
- TxVin1
- TxVin2
- UTXOBlockInfo
- UTXOSetInfo
- UTXOUnspendables
- UnknownFields
- UtilsResponseEnvelope
- ValidateAddressResponse
- ValidateAddressResult
- VerifyTxOutProofResponse
- Vout
Documentation For Authorization
ApiKeyAuth
- Type: API key
- API key parameter name: X-API-KEY
- 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 satstream_python_sdk-1.0.38.tar.gz.
File metadata
- Download URL: satstream_python_sdk-1.0.38.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad2bc9f3d7719695cde2a9b9aa96092e4165d862e102d1fde378c01038cf704c
|
|
| MD5 |
b52553e6fd711e985d480428f8b79e5f
|
|
| BLAKE2b-256 |
bc8ab3d75a7461b230a51dad464582e8e08ea2e2dd50da6455fa766a009fd390
|
File details
Details for the file satstream_python_sdk-1.0.38-py3-none-any.whl.
File metadata
- Download URL: satstream_python_sdk-1.0.38-py3-none-any.whl
- Upload date:
- Size: 457.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
400cfdebb8174c2173ab22150680c340d3059c0c031b845be05933185bae3036
|
|
| MD5 |
c53eb4d5f6f5edefae8818bdd9eeae96
|
|
| BLAKE2b-256 |
c9598bb1d32a4a9a91efa6bdc3bf7f4db743c7ad86de0af3afecffbf787b3931
|