MetaSV API Spec
- API version: 2.1.4
- Build date: 2022-04-08T16:23:39.010660+09:00[Asia/Tokyo]
API definition for MetaSV provided apis
Automatically generated by the OpenAPI Generator
Building the API client library requires:
- Java 1.7+
- Maven/Gradle
To install the API client library to your local Maven repository, simply execute:
mvn clean install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deploy
Refer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>com.metasv</groupId>
<artifactId>openapi-java-client</artifactId>
<version>2.1.4</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
compile "com.metasv:openapi-java-client:2.1.4"
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/openapi-java-client-2.1.4.jar
target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
// Import classes:
import com.metasv.client.openapi.ApiClient;
import com.metasv.client.openapi.ApiException;
import com.metasv.client.openapi.Configuration;
import com.metasv.client.openapi.auth.*;
import com.metasv.client.openapi.models.*;
import com.metasv.client.openapi.api.AddressApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://apiv2.metasv.com");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
AddressApi apiInstance = new AddressApi(defaultClient);
String address = "address_example"; // String | the requested address
try {
AddressBalance result = apiInstance.addressAddressBalanceGet(address);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AddressApi#addressAddressBalanceGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
All URIs are relative to https://apiv2.metasv.com
Class | Method | HTTP request | Description |
---|---|---|---|
AddressApi | addressAddressBalanceGet | GET /address/{address}/balance | Get address balance by specific address. |
AddressApi | addressAddressUtxoGet | GET /address/{address}/utxo | Get address utxos by specific address(100 per page). |
BlockApi | blockBlockIdGet | GET /block/{blockId} | Get block request by height or hash |
BlockApi | blockGet | GET /block | Get recent block list by paging. 30 items per page. |
BlockApi | blockInfoGet | GET /block/info | Get current blockchain info from full node. |
MerchantApi | merchantBroadcastPost | POST /merchant/broadcast | Broadcast tx to coorperated miner merchant APIs(TAAL). |
MerchantApi | merchantUtxoPost | POST /merchant/utxo | Pick utxos by addresses and amount. |
OutpointApi | outpointTxidIndexGet | GET /outpoint/{txid}/{index} | Get tx output(outpoint for vin) spent status. |
OutpointApi | vinTxidDetailGet | GET /vin/{txid}/detail | Get all output point of vins in the tx with detailed output script. |
SensibleApi | sensibleFtAddressAddressBalanceConfirmedGet | GET /sensible/ft/address/{address}/balance/confirmed | Get all sensible token balances for specific address ignoring all unconfirmed txs. |
SensibleApi | sensibleFtAddressAddressBalanceGet | GET /sensible/ft/address/{address}/balance | Get all sensible token balances for specific address. |
SensibleApi | sensibleFtAddressAddressUtxoGet | GET /sensible/ft/address/{address}/utxo | Get all sensible token utxos for specific address. |
SensibleApi | sensibleNftAddressAddressCountConfirmedGet | GET /sensible/nft/address/{address}/count/confirmed | Get confirmed utxo count for specific nft(ignore all unconfirmed txs). |
SensibleApi | sensibleNftAddressAddressSummaryGet | GET /sensible/nft/address/{address}/summary | Get nft summary(NFT count group by genesis) for address. |
SensibleApi | sensibleNftAddressAddressUtxoGet | GET /sensible/nft/address/{address}/utxo | Get all sensible nft token utxos for specific address. |
SensibleApi | sensibleNftAuctionCodeHashCodeHashNftIdNftIdUtxoGet | GET /sensible/nft/auction/codeHash/{codeHash}/nftId/{nftId}/utxo | Get all sensible nft token utxos by codeHash and genesisId. |
SensibleApi | sensibleNftGenesisCodeHashGenesisSummaryGet | GET /sensible/nft/genesis/{codeHash}/{genesis}/summary | Get nft summary(count group by address) for specific codeHash and genesisId(result cached for 60s). |
SensibleApi | sensibleNftGenesisCodeHashGenesisUtxoGet | GET /sensible/nft/genesis/{codeHash}/{genesis}/utxo | Get all sensible nft token utxos by codeHash and genesisId. |
SensibleApi | sensibleNftSellAddressAddressUtxoGet | GET /sensible/nft/sell/address/{address}/utxo | Get all sensible sell sell utxos for specific address. |
SensibleApi | sensibleNftSellGenesisCodeHashGenesisUtxoGet | GET /sensible/nft/sell/genesis/{codeHash}/{genesis}/utxo | Get all sensible nft token utxos by codeHash and genesisId. |
SensibleApi | sensibleNftSellV2AddressAddressUtxoGet | GET /sensible/nft/sellV2/address/{address}/utxo | Get all sensible sell sell utxos for specific address. |
SensibleApi | sensibleNftSellV2GenesisCodeHashGenesisUtxoGet | GET /sensible/nft/sellV2/genesis/{codeHash}/{genesis}/utxo | Get all sensible nft token utxos by codeHash and genesisId. |
TxApi | txBroadcastAsyncPost | POST /tx/broadcast/async | Broadcast tx to metasv asyn(tx size no bigger than 250K). |
TxApi | txBroadcastAsyncTxidStateGet | GET /tx/broadcast/async/{txid}/state | Query aync broadcast result. |
TxApi | txBroadcastPost | POST /tx/broadcast | Broadcast tx to metasv fullnode. |
TxApi | txTxidGet | GET /tx/{txid} | Get transaction detail by specific txid. |
TxApi | txTxidRawGet | GET /tx/{txid}/raw | Get transaction raw hex by specific txid. |
TxApi | txTxidSeenGet | GET /tx/{txid}/seen | Whether MetaSV have seen this tx before. This is a fast approach to know if the tx exist or not. |
TxApi | vinTxidDetailGet | GET /vin/{txid}/detail | Get all output point of vins in the tx with detailed output script. |
UserApi | userClientPubkeyGet | GET /user/clientPubkey | See https://github.com/metasv/metasv-client-signature for details. Get all trusted public keys. |
UserApi | userClientPubkeyPost | POST /user/clientPubkey | See https://github.com/metasv/metasv-client-signature for details. Register new client public key. |
UserApi | userClientPubkeyPubkeyDelete | DELETE /user/clientPubkey/{pubkey} | Delete a registered client public key. |
UserApi | userTrafficGet | GET /user/traffic | Get traffic details for every hour(valid in six months). |
UserApi | userTrafficSumGet | GET /user/traffic/sum | Sum all traffic in the current month. |
XpubApi | xpubLiteXpubAddressAddressGet | GET /xpubLite/{xpub}/address/{address} | Get xpub address type and index. Only index under /0/70 /1/30 is valid. Otherwise not found. |
XpubApi | xpubLiteXpubBalanceGet | GET /xpubLite/{xpub}/balance | Get xpub balances including confirmed and unconfirmed. |
XpubApi | xpubLiteXpubUtxoGet | GET /xpubLite/{xpub}/utxo | Get xpub utxos by specific xpub(300 per page). |
XpubApi | xpubPost | POST /xpub | Register a new xpub. |
XpubApi | xpubXpubAddressAddressGet | GET /xpub/{xpub}/address/{address} | Get xpub address type and index. Only index under max index is valid. Otherwise not found. |
XpubApi | xpubXpubBalanceGet | GET /xpub/{xpub}/balance | Get xpub balances including confirmed and unconfirmed. |
XpubApi | xpubXpubDelete | DELETE /xpub/{xpub} | Delete a registered xpub. |
XpubApi | xpubXpubGet | GET /xpub/{xpub} | Get xpub detail and status. Only registered xpub available. |
XpubApi | xpubXpubTxsGet | GET /xpub/{xpub}/txs | Get xpub transaction history by specific xpub(100 per page). |
XpubApi | xpubXpubUtxoCountGet | GET /xpub/{xpub}/utxo/count | Get valid utxo count(including confirmed and unconfirmed). |
XpubApi | xpubXpubUtxoGet | GET /xpub/{xpub}/utxo | Get xpub utxos by specific xpub. |
XpubApi | xpubsCountGet | GET /xpubs/count | Get the total count of registered xpubs. |
XpubApi | xpubsGet | GET /xpubs | Get all registered xpub strings. 300 per page. |
- AddressBalance
- AddressTx
- AddressUtxo
- AsyncBroadcastResult
- BlockHeader
- BlockTx
- BlockchainInfo
- BroadcastResult
- ClientPubkeyRequest
- ClientPubkeyResult
- OutputInfo
- OutputInfoDetail
- SensibleFtBalance
- SensibleFtUtxo
- SensibleNftAddressSummary
- SensibleNftAuctionUtxo
- SensibleNftGenesisSummary
- SensibleNftSellUtxo
- SensibleNftSellV2Utxo
- SensibleNftUtxo
- TxDetail
- TxInput
- TxOutput
- TxRaw
- UserHourlyTraffic
- UserTrafficSum
- UtxoPickRequest
- XPubTransaction
- XpubAddress
- XpubBalance
- XpubDetail
- XpubLiteBalance
- XpubRequest
- XpubResult
- XpubUtxo
Authentication schemes defined for the API:
- Type: HTTP basic authentication
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.