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:
Generate Terra account. Tatum does not support HD wallet for Terra, only specific address and private key can be generated.
OK
Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.
Unauthorized. Not valid or inactive subscription key present in the HTTP Header.
Internal server error. There was an error on the server while processing the request.
curl -i -X GET \ https://api-eu1.tatum.io/v3/terra/account \ -H 'x-api-key: YOUR_API_KEY_HERE'
{- "address": "terra1fex9f78reuwhfsnc8sun6mz8rl9zwqh03fhwf3",
- "privateKey": "42833dd2c36df40d5e4f0ba525d665a25103fc8e01ef86a9d962941855b9902c"
}
Get Terra current block number.
OK
Unauthorized. Not valid or inactive subscription key present in the HTTP Header.
Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.
Internal server error. There was an error on the server while processing the request.
curl -i -X GET \ https://api-eu1.tatum.io/v3/terra/block/current \ -H 'x-api-key: YOUR_API_KEY_HERE'
6491272
Get Transactions in block by block height.
OK
Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.
Unauthorized. Not valid or inactive subscription key present in the HTTP Header.
Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.
Internal server error. There was an error on the server while processing the request.
curl -i -X GET \ 'https://api-eu1.tatum.io/v3/terra/block/{height}' \ -H 'x-api-key: YOUR_API_KEY_HERE'
{- "hash": "ZOWd4U3REeHPupwcHNT2iFcOqNiSP/sN4Uco9DXkP0A=",
- "height": 8232166,
- "timestamp": "2022-03-14T11:08:39.026Z",
- "txs": [
- {
- "txId": "6498A3BE7313FEF32C9C0130F321D7808439F7F59D41932122383CC9E109F534",
- "height": 8232166,
- "timestamp": "2022-03-14T11:08:39.026Z",
- "gas_wanted": 150000,
- "gas_used": 116128,
- "logs": [
- {
- "msg_index": 0,
- "events": [
- {
- "type": "aggregate_vote",
- "attributes": [
- { }
]
}
]
}
], - "code": 0,
- "codespace": "",
- "tx": {
- "signatures": [
- "SsROsnbOYO9BOZXQtJ1FHcaHV1NgaZGsxX06B1+oS1lS/J85t5bIDsOpvBieo9VzVwoisGPoHyKdi8xLe8TWZg=="
], - "auth_info": {
- "fee": "{\\\"amount\\\":[],\\\"gas_limit\\\":\\\"150000\\\",\\\"granter\\\":\\\"\\\",\\\"payer\\\":\\\"\\\"}",
- "signer_infos": [
- {
- "public_key": "{\\\"@type\\\":\\\"/cosmos.crypto.secp256k1.PubKey\\\",\\\"key\\\":\\\"AolXZTeuCMvihT8Mw3O/7jbipwaUpudcjZVTmzWGOy10\\\"}",
- "sequence": 436652,
- "mode_info": { }
}
]
}, - "body": {
- "memo": "12345",
- "timeout_height": 0,
- "messages": [
- "{\\\"@type\\\":\\\"/terra.oracle.v1beta1.MsgAggregateExchangeRatePrevote\\\",\\\"feeder\\\":\\\"terra1d03dz5n3hj8qfzfjvrza8a9t0hejwnjcdsn5cw\\\",\\\"hash\\\":\\\"f340e3c39c4d224300cd1630c9a91087d48f6623\\\",\\\"validator\\\":\\\"terravaloper1d03dz5n3hj8qfzfjvrza8a9t0hejwnjcdllfga\\\"}"
]
}
}
}
]
}
Get Terra Account Detail by address.
OK
Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.
Unauthorized. Not valid or inactive subscription key present in the HTTP Header.
Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.
Internal server error. There was an error on the server while processing the request.
curl -i -X GET \ 'https://api-eu1.tatum.io/v3/terra/account/{address}' \ -H 'x-api-key: YOUR_API_KEY_HERE'
{- "accountNumber": 696215,
- "address": "terra1fex9f78reuwhfsnc8sun6mz8rl9zwqh03fhwf3",
- "assets": [
- {
- "balance": "207.00000000",
- "asset": "LUNA"
}
], - "sequence": 0
}
Get Terra Transaction by transaction hash.
OK
Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.
Unauthorized. Not valid or inactive subscription key present in the HTTP Header.
Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.
Internal server error. There was an error on the server while processing the request.
curl -i -X GET \ 'https://api-eu1.tatum.io/v3/terra/transaction/{hash}' \ -H 'x-api-key: YOUR_API_KEY_HERE'
{- "txId": "6498A3BE7313FEF32C9C0130F321D7808439F7F59D41932122383CC9E109F534",
- "height": 8232166,
- "timestamp": "2022-03-14T11:08:39.026Z",
- "gas_wanted": 150000,
- "gas_used": 116128,
- "logs": [
- {
- "msg_index": 0,
- "events": [
- {
- "type": "aggregate_vote",
- "attributes": [
- {
- "key": "voter",
- "value": "terravaloper1d03dz5n3hj8qfzfjvrza8a9t0hejwnjcdllfga"
}
]
}
]
}
], - "code": 0,
- "codespace": "",
- "tx": {
- "signatures": [
- "SsROsnbOYO9BOZXQtJ1FHcaHV1NgaZGsxX06B1+oS1lS/J85t5bIDsOpvBieo9VzVwoisGPoHyKdi8xLe8TWZg=="
], - "auth_info": {
- "fee": "{\\\"amount\\\":[],\\\"gas_limit\\\":\\\"150000\\\",\\\"granter\\\":\\\"\\\",\\\"payer\\\":\\\"\\\"}",
- "signer_infos": [
- {
- "public_key": "{\\\"@type\\\":\\\"/cosmos.crypto.secp256k1.PubKey\\\",\\\"key\\\":\\\"AolXZTeuCMvihT8Mw3O/7jbipwaUpudcjZVTmzWGOy10\\\"}",
- "sequence": 436652,
- "mode_info": { }
}
]
}, - "body": {
- "memo": "12345",
- "timeout_height": 0,
- "messages": [
- "{\\\"@type\\\":\\\"/terra.oracle.v1beta1.MsgAggregateExchangeRatePrevote\\\",\\\"feeder\\\":\\\"terra1d03dz5n3hj8qfzfjvrza8a9t0hejwnjcdsn5cw\\\",\\\"hash\\\":\\\"f340e3c39c4d224300cd1630c9a91087d48f6623\\\",\\\"validator\\\":\\\"terravaloper1d03dz5n3hj8qfzfjvrza8a9t0hejwnjcdllfga\\\"}"
]
}
}
}
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.
OK
Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.
Unauthorized. Not valid or inactive subscription key present in the HTTP Header.
Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.
Internal server error. There was an error on the server while processing the request.
{- "to": "terra1fex9f78reuwhfsnc8sun6mz8rl9zwqh03fhwf3",
- "currency": "LUNA",
- "amount": "100000",
- "fee": "0.015",
- "fromPrivateKey": "cTmS2jBWXgFaXZ2xG9jhn67TiyTshnMp3UedamzEhGm6BZV1vLgQ",
- "memo": "Memo to recipient"
}
{- "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9"
}
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.
OK
Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.
Unauthorized. Not valid or inactive subscription key present in the HTTP Header.
Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.
Internal server error. There was an error on the server while processing the request.
{- "txData": "62BD544D1B9031EFC330A3E855CC3A0D51CA5131455C1AB3BCAC6D243F65460D",
- "signatureId": "5e68c66581f2ee32bc354087"
}
{- "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9"
}