skycoin rest api。

skyapi的Python项目详细描述


SkyAPI

Skycoin是下一代加密货币。

这个python包由OpenAPI Generator项目自动生成:

  • API版本:0.25.1
  • 软件包版本:1.0.0
  • 构建包:org.openapitols.codegen.languages.pythonclientcodegen 有关详细信息,请访问http://127.0.0.1:6420

要求。

python 2.7和3.4+

安装和使用

pip安装

如果python包托管在github上,则可以直接从github安装

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(您可能需要使用根权限运行pipsudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

然后导入包:

importskyapi

设置工具

通过Setuptools安装。

python setup.py install --user

(或sudo python setup.py install为所有用户安装软件包)

然后导入包:

importskyapi

开始

请按照installation procedure操作,然后运行以下命令:

from__future__importprint_functionimporttimeimportskyapifromskyapi.restimportApiExceptionfrompprintimportpprint# create an instance of the API classapi_instance=skyapi.DefaultApi(skyapi.ApiClient(configuration))try:# Returns the total number of unique address that have coins.api_response=api_instance.address_count()pprint(api_response)exceptApiExceptionase:print("Exception when calling DefaultApi->address_count: %s\n"%e)

API端点文档

所有uri都与http://127.0.0.1:6420

ClassMethodHTTP requestDescription
DefaultApiaddress_countGET /api/v1/addresscountReturns the total number of unique address that have coins.
DefaultApiaddress_uxoutsGET /api/v1/address_uxouts
DefaultApibalance_getGET /api/v1/balanceReturns the balance of one or more addresses, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends.
DefaultApibalance_postPOST /api/v1/balanceReturns the balance of one or more addresses, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends.
DefaultApiblockGET /api/v1/block
DefaultApiblockchain_metadataGET /api/v1/blockchain/metadataReturns the blockchain metadata.
DefaultApiblockchain_progressGET /api/v1/blockchain/progressReturns the blockchain sync progress.
DefaultApiblocks_getGET /api/v1/blocksblocksHandler returns blocks between a start and end point,
DefaultApiblocks_postPOST /api/v1/blocksblocksHandler returns blocks between a start and end point,
DefaultApicoin_supplyGET /api/v1/coinSupply
DefaultApicsrfGET /api/v1/csrfCreates a new CSRF token. Previous CSRF tokens are invalidated by this call.
DefaultApidefault_connectionsGET /api/v1/network/defaultConnectionsdefaultConnectionsHandler returns the list of default hardcoded bootstrap addresses.\n They are not necessarily connected to.
DefaultApiexplorer_addressGET /api/v1/explorer/address
DefaultApihealthGET /api/v1/healthReturns node health data.
DefaultApilast_blocksGET /api/v1/last_blocks
DefaultApinetwork_connectionGET /api/v1/network/connectionThis endpoint returns a specific connection.
DefaultApinetwork_connectionsGET /api/v1/network/connectionsThis endpoint returns all outgoings connections.
DefaultApinetwork_connections_disconnectPOST /api/v1/network/connection/disconnect
DefaultApinetwork_connections_exchangeGET /api/v1/network/connections/exchange
DefaultApinetwork_connections_trustGET /api/v1/network/connections/trusttrustConnectionsHandler returns all trusted connections.\n They are not necessarily connected to. In the default configuration, these will be a subset of the default hardcoded bootstrap addresses.
DefaultApioutputs_getGET /api/v1/outputsIf neither addrs nor hashes are specificed, return all unspent outputs. If only one filter is specified, then return outputs match the filter. Both filters cannot be specified.
DefaultApioutputs_postPOST /api/v1/outputsIf neither addrs nor hashes are specificed, return all unspent outputs. If only one filter is specified, then return outputs match the filter. Both filters cannot be specified.
DefaultApipending_txsGET /api/v1/pendingTxs
DefaultApiresend_unconfirmed_txnsPOST /api/v1/resendUnconfirmedTxns
DefaultApirichlistGET /api/v1/richlistReturns the top skycoin holders.
DefaultApitransactionGET /api/v1/transaction
DefaultApitransaction_injectPOST /api/v2/transaction/injectBroadcast a hex-encoded, serialized transaction to the network.
DefaultApitransaction_rawGET /api/v2/transaction/rawReturns the hex-encoded byte serialization of a transaction. The transaction may be confirmed or unconfirmed.
DefaultApitransaction_verifyPOST /api/v2/transaction/verify
DefaultApitransactions_getGET /api/v1/transactionsReturns transactions that match the filters.
DefaultApitransactions_postPOST /api/v1/transactionsReturns transactions that match the filters.
DefaultApiuxoutGET /api/v1/uxoutReturns an unspent output by ID.
DefaultApiverify_addressPOST /api/v2/address/verifyVerifies a Skycoin address.
DefaultApiversionGET /api/v1/version
DefaultApiwalletGET /api/v1/walletReturns a wallet by id.
DefaultApiwallet_balanceGET /api/v1/wallet/balanceReturns the wallet's balance, both confirmed and predicted. The predicted balance is the confirmed balance minus the pending spends.
DefaultApiwallet_createPOST /api/v1/wallet/create
DefaultApiwallet_decryptPOST /api/v1/wallet/decryptDecrypts wallet.
DefaultApiwallet_encryptPOST /api/v1/wallet/encryptEncrypt wallet.
DefaultApiwallet_folderGET /api/v1/wallets/folderName
DefaultApiwallet_new_addressPOST /api/v1/wallet/newAddress
DefaultApiwallet_new_seedGET /api/v1/wallet/newSeed
DefaultApiwallet_recoverPOST /api/v2/wallet/recoverRecovers an encrypted wallet by providing the seed. The first address will be generated from seed and compared to the first address of the specified wallet. If they match, the wallet will be regenerated with an optional password. If the wallet is not encrypted, an error is returned.
DefaultApiwallet_seedPOST /api/v1/wallet/seedThis endpoint only works for encrypted wallets. If the wallet is unencrypted, The seed will be not returned.
DefaultApiwallet_seed_verifyPOST /api/v2/wallet/seed/verifyVerifies a wallet seed.
DefaultApiwallet_spentPOST /api/v1/wallet/spend
DefaultApiwallet_transactionPOST /api/v1/wallet/transaction
DefaultApiwallet_transactionsGET /api/v1/wallet/transactions
DefaultApiwallet_unloadPOST /api/v1/wallet/unloadUnloads wallet from the wallet service.
DefaultApiwallet_updatePOST /api/v1/wallet/updateUpdate the wallet.
DefaultApiwalletsGET /api/v1/wallets

型号文档

授权文件

CSRFAUTH

  • 类型:api键
  • api密钥参数名:x-csrf-token
  • 位置:http头

作者

contact@skycoin.net

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java SimpleFramework和工厂方法   Java适当地处理异常   java单例类不起作用   java小程序和Swing在eclipse中不显示组件   多个键上的java Redisson FastRemove不起作用   java验证请求正文不等于模式   在Java中从URL读取数据   eche RecyclerView项的java Set自定义字体   string Java如何从Date获取HH:mm:ss   当Java应用程序落后于负载均衡器时,在某些URL上强制使用SSL   使用esapi时发生java错误   java使用流根据第二个列表中的值更新一个列表中的对象   组织。openqa。硒。Java中的NoTouchElementException WebDriver?   从JSON字符串Java创建CSV文件