Terra

Terra is a public blockchain protocol with algorithmic stablecoins, cross-chain bridges, and smart contract support that seeks to create an open financial ecosystem to bring DeFi to the masses. It features low gas fees and a unique algorithmic market module that manages the expansion and contraction of on-chain assets to maintain consistent stablecoin values. It is an ideal platform for building DeFi and cross-chain solutions.
Tatum supports 2 chains:

  • Mainnet Columbus-5 - a regular live chain
  • Testnet Bombay-12- a chain used for testing purposes. Coins on the test chain have no value and can be obtained from a faucet, e.g. https://faucet.terra.money/.

Generate Terra wallet

1 credit per API call.


Generate Terra account. Tatum does not support HD wallet for Terra, only specific address and private key can be generated.

SecurityX-API-Key
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/terra/account
Request samples
curl -i -X GET \
  https://api-eu1.tatum.io/v3/terra/account \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "address": "terra1fex9f78reuwhfsnc8sun6mz8rl9zwqh03fhwf3",
  • "privateKey": "42833dd2c36df40d5e4f0ba525d665a25103fc8e01ef86a9d962941855b9902c"
}

Get Terra current block

1 credit per API call.


Get Terra 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/terra/block/current
Request samples
curl -i -X GET \
  https://api-eu1.tatum.io/v3/terra/block/current \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
6491272

Get Block

1 credit per API call.


Get Transactions in block by block height.

SecurityX-API-Key
Request
path Parameters
height
required
number

Block height

Example: 6470657
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/terra/block/{height}
Request samples
curl -i -X GET \
  'https://api-eu1.tatum.io/v3/terra/block/{height}' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "hash": "ZOWd4U3REeHPupwcHNT2iFcOqNiSP/sN4Uco9DXkP0A=",
  • "height": 8232166,
  • "timestamp": "2022-03-14T11:08:39.026Z",
  • "txs": [
    ]
}

Get Terra Account

1 credit per API call.


Get Terra Account Detail by address.

SecurityX-API-Key
Request
path Parameters
address
required
string

Account address you want to get balance of

Example: terra1fex9f78reuwhfsnc8sun6mz8rl9zwqh03fhwf3
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/terra/account/{address}
Request samples
curl -i -X GET \
  'https://api-eu1.tatum.io/v3/terra/account/{address}' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "accountNumber": 696215,
  • "address": "terra1fex9f78reuwhfsnc8sun6mz8rl9zwqh03fhwf3",
  • "assets": [
    ],
  • "sequence": 0
}

Get Terra Transaction

1 credit per API call.


Get Terra Transaction by transaction hash.

SecurityX-API-Key
Request
path Parameters
hash
required
string

Transaction hash

Example: 004F3B05F7DD1DCE327511C36E883E6B627D87963BA7CF51FFD8D8F286D5291C
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/terra/transaction/{hash}
Request samples
curl -i -X GET \
  'https://api-eu1.tatum.io/v3/terra/transaction/{hash}' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "txId": "6498A3BE7313FEF32C9C0130F321D7808439F7F59D41932122383CC9E109F534",
  • "height": 8232166,
  • "timestamp": "2022-03-14T11:08:39.026Z",
  • "gas_wanted": 150000,
  • "gas_used": 116128,
  • "logs": [
    ],
  • "code": 0,
  • "codespace": "",
  • "tx": {
    }
}

Send Terra / Terra tokens from account to account

2 credits per API call.


Send Terra or Terra Token token from account to account.

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. 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
One of:
to
required
string = 44 characters

Blockchain address to send assets.

currency
required
string

Currency to transfer from Binance Blockchain Account.

Enum: "LUNA" "LUNA_USD" "LUNA_KRW"
amount
required
string^[+]?((\d+(\.\d*)?)|(\.\d+))$

Amount to be sent in currency.

fee
string <= 38 characters ^[+]?((\d+(\.\d*)?)|(\.\d+))$

Fee to be charged for the operation.

fromPrivateKey
required
string [ 52 .. 66 ] characters

Private key of sender address.

memo
string [ 1 .. 50 ] characters

Memo to recipient.

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/terra/transaction
Request samples
application/json
{
  • "to": "terra1fex9f78reuwhfsnc8sun6mz8rl9zwqh03fhwf3",
  • "currency": "LUNA",
  • "amount": "100000",
  • "fee": "0.015",
  • "fromPrivateKey": "cTmS2jBWXgFaXZ2xG9jhn67TiyTshnMp3UedamzEhGm6BZV1vLgQ",
  • "memo": "Memo to recipient"
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9"
}

Broadcast signed Terra transaction

2 credit per API call.


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

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

Raw signed transaction to be published to network.

signatureId
string = 24 characters

Identifier of KMS pending transaction ID to be completed with the broadcast.

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/terra/broadcast
Request samples
application/json
{
  • "txData": "62BD544D1B9031EFC330A3E855CC3A0D51CA5131455C1AB3BCAC6D243F65460D",
  • "signatureId": "5e68c66581f2ee32bc354087"
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9"
}