VeChain

VeChain Blockchain enables access to the most commonly used VeChain methods. Tatum does not support off-chain capabilities for the VET blockchain. Tatum KMS is not supported for VET transactions. VET supports 2 native assets - VET and VTHO. VTHO is used for paying transaction fees.
Tatum supports 2 chains:

  • Mainnet - a regular live chain
  • Testnet - a test chain used for testing purposes. Coins on the test chain have no value and can be obtained from a faucet, e.g. https://faucet.vecha.in/
Tatum supports BIP44 HD wallets. Because they can generate 2^31 addresses from 1 mnemonic phrase, they are very convenient and secure. It is possible to generate this type of wallet with 1 simple API call.

Generate VeChain wallet

5 credits per API call.


Tatum supports BIP44 HD wallets. It is very convenient and secure, since it can generate 2^31 addresses from 1 mnemonic phrase. Mnemonic phrase consists of 24 special words in defined order and can restore access to all generated addresses and private keys.
Each address is identified by 3 main values:

  • Private Key - your secret value, which should never be revealed
  • Public Key - public address to be published
  • Derivation index - index of generated address

Tatum follows BIP44 specification and generates for VeChain wallet with derivation path m'/44'/818'/0'/0. More about BIP44 HD wallets can be found here - https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki. Generate BIP44 compatible VeChain wallet.

SecurityX-API-Key
Request
query Parameters
mnemonic
string <= 500 characters

Mnemonic to use for generation of extended public and private keys.

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

500

Internal server error. There was an error on the server while processing the request.

get/v3/vet/wallet
Request samples
Response samples
application/json
{
  • "mnemonic": "urge pulp usage sister evidence arrest palm math please chief egg abuse",
  • "xpub": "xpub6EsCk1uU6cJzqvP9CdsTiJwT2rF748YkPnhv5Qo8q44DG7nn2vbyt48YRsNSUYS44jFCW9gwvD9kLQu9AuqXpTpM1c5hgg9PsuBLdeNncid"
}

Generate VeChain account address from Extended public key

5 credits per API call.


Generate VeChain account deposit address from Extended public key. Deposit address is generated for the specific index - each extended public key can generate up to 2^31 addresses starting from index 0 until 2^31 - 1.

SecurityX-API-Key
Request
path Parameters
xpub
required
string

Extended public key of wallet.

Example: xpub6EsCk1uU6cJzqvP9CdsTiJwT2rF748YkPnhv5Qo8q44DG7nn2vbyt48YRsNSUYS44jFCW9gwvD9kLQu9AuqXpTpM1c5hgg9PsuBLdeNncid
index
required
number

Derivation index of desired address to be generated.

Example: 0
Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/vet/address/{xpub}/{index}
Request samples
Response samples
application/json
{
  • "address": "0xa7673161CbfE0116A4De9E341f8465940c2211d4"
}

Generate VeChain private key

5 credits per API call.


Generate private key of address from mnemonic for given derivation path index. Private key is generated for the specific index - each mnemonic can generate up to 2^32 private keys starting from index 0 until 2^31 - 1.

SecurityX-API-Key
Request
Request Body schema: application/json
required
index
required
integer <= 2147483647

Derivation index of private key to generate.

mnemonic
required
string [ 1 .. 500 ] characters

Mnemonic to generate private key from.

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

500

Internal server error. There was an error on the server while processing the request.

post/v3/vet/wallet/priv
Request samples
application/json
{
  • "index": 0,
  • "mnemonic": "urge pulp usage sister evidence arrest palm math please chief egg abuse"
}
Response samples
application/json
{
  • "key": "cTmS2jBWXgFaXZ2xG9jhn67TiyTshnMp3UedamzEhGm6BZV1vLgQ"
}

Get VeChain current block

5 credits per API call.


Get VeChain current block number.

SecurityX-API-Key
Responses
200

OK

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/vet/block/current
Request samples
Response samples
application/json
6491272

Get VeChain Block by hash

5 credits per API call.


Get VeChain Block by block hash or block number.

SecurityX-API-Key
Request
path Parameters
hash
required
string

Block hash or block number

Example: 325324
Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/vet/block/{hash}
Request samples
Response samples
application/json
{
  • "number": 325324,
  • "id": "0x0004f6cc88bb4626a92907718e82f255b8fa511453a78e8797eb8cea3393b215",
  • "size": 373,
  • "parentID": "0x0004f6cb730dbd90fed09d165bfdf33cc0eed47ec068938f6ee7b7c12a4ea98d",
  • "timestamp": 1533267900,
  • "gasLimit": 11253579,
  • "beneficiary": "0xb4094c25f86d628fdd571afc4077f0d0196afb48",
  • "gasUsed": 21000,
  • "totalScore": 1029988,
  • "txsRoot": "0x89dfd9fcd10c9e53d68592cf8b540b280b72d381b868523223992f3e09a806bb",
  • "txsFeatures": 0,
  • "stateRoot": "0x86bcc6d214bc9d8d0dedba1012a63c8317d19ce97f60c8a2ef5c59bbd40d4261",
  • "receiptsRoot": "0x15787e2533c470e8a688e6cd17a1ee12d8457778d5f82d2c109e2d6226d8e54e",
  • "signer": "0xab7b27fc9e7d29f9f2e5bd361747a5515d0cc2d1",
  • "transactions": [
    ]
}

Get VeChain Account balance

5 credits per API call.


Get VeChain Account balance in VET.

SecurityX-API-Key
Request
path Parameters
address
required
string

Account address you want to get balance of

Example: 0x5034aa590125b64023a0262112b98d72e3c8e40e
Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/vet/account/balance/{address}
Request samples
Response samples
application/json
{
  • "balance": "10.52"
}

Get VeChain Account energy (VTHO)

5 credits per API call.


Get VeChain Account energy in VTHO. VTHO is used for paying for the transaction fee.

SecurityX-API-Key
Request
path Parameters
address
required
string

Account address you want to get balance of

Example: 0x5034aa590125b64023a0262112b98d72e3c8e40e
Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/vet/account/energy/{address}
Request samples
Response samples
application/json
{
  • "energy": "10.52"
}

Get VeChain Transaction

10 credits per API call.


Get VeChain Transaction by transaction hash.

SecurityX-API-Key
Request
path Parameters
hash
required
string

Transaction hash

Example: 0x24f691abab680972437028af22bc7a43c3fbe8d6d7eefc420dea2daf554758a7
Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/vet/transaction/{hash}
Request samples
Response samples
application/json
{
  • "id": "0x24f691abab680972437028af22bc7a43c3fbe8d6d7eefc420dea2daf554758a7",
  • "chainTag": "0x27",
  • "blockRef": "0x0011bbb748852599",
  • "expiration": 720,
  • "clauses": [
    ],
  • "gasPriceCoef": 120,
  • "gas": 21000,
  • "origin": "0x5034aa590125b64023a0262112b98d72e3c8e40e",
  • "nonce": "0x48ca1882cf3726ee",
  • "size": 132,
  • "meta": {
    },
  • "blockNumber": 0
}

Get VeChain Transaction Receipt

5 credits per API call.


Get VeChain Transaction Receipt by transaction hash. Transaction receipt is available only after transaction is included in the block and contains information about paid fee or created contract address and much more.

SecurityX-API-Key
Request
path Parameters
hash
required
string

Transaction hash

Example: 0x24f691abab680972437028af22bc7a43c3fbe8d6d7eefc420dea2daf554758a7
Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/vet/transaction/{hash}/receipt
Request samples
Response samples
application/json
{
  • "gasUsed": 21000,
  • "gasPayer": "0x5034aa590125b64023a0262112b98d72e3c8e40e",
  • "paid": "0x1ac942860d7100728",
  • "reward": "0x8092d8e9da1e688c",
  • "reverted": false,
  • "meta": {
    },
  • "outputs": [
    ],
  • "blockNumber": 1162169,
  • "blockHash": "0x0011bbb9925da1b54035e2a870abe336bc79a3b083303646b87a3315c11c963b",
  • "transactionHash": "0x24f691abab680972437028af22bc7a43c3fbe8d6d7eefc420dea2daf554758a7",
  • "status": "0x1"
}

Send VeChain from account to account

10 credits per API call.


Send VET from account to account. Fee for the transaction is paid in VTHO.

This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and loss of funds. In this method, it is possible to enter privateKey or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. Alternatively, using the Tatum client library for supported languages.

SecurityX-API-Key
Request
Request Body schema: application/json
required
One of:
to
required
string [ 1 .. 100 ] characters

Blockchain address to send assets

amount
required
string^[+]?((\d+(\.\d*)?)|(\.\d+))$

Amount to be sent in VET

fromPrivateKey
required
string [ 6 .. 66 ] characters

Private key of sender address. Private key, or signature Id must be present.

data
string <= 10000 characters

Additional data that can be passed to a blockchain transaction as a data property; must be in the hexadecimal format

object

Custom defined fee. If not present, it will be calculated automatically.

gasLimit
required
string^[+]?\d+$

Gas limit for transaction.

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

post/v3/vet/transaction
Request samples
application/json
{
  • "to": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
  • "amount": "100000",
  • "fromPrivateKey": "0x05e150c73f1920ec14caa1e0b6aa09940899678051a78542840c2668ce5080c2"
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9"
}

Broadcast signed VeChain transaction

5 credits per API call.


Broadcast signed transaction to VeChain blockchain. This method is used internally from Tatum KMS or Tatum client libraries. It is possible to create custom signing mechanism and use this method only for broadcasting data to the blockchain.

SecurityX-API-Key
Request
Request Body schema: application/json
required
txData
required
string [ 1 .. 500000 ] characters

Raw signed transaction to be published to network.

signatureId
string <uuid>

ID of prepared payment template to sign. Required only, when broadcasting transaction signed by Tatum KMS.

index
number [ 0 .. 2147483647 ]

(Only if the signature ID is mnemonic-based and you run KMS v6.2 or later) The index of the address to send the assets from that was generated from the mnemonic

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

post/v3/vet/broadcast
Request samples
application/json
{
  • "txData": "62BD544D1B9031EFC330A3E855CC3A0D51CA5131455C1AB3BCAC6D243F65460D"
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9"
}