Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Api/AlgorandApi

Algorand API Reference

// Set your API Keys 👇 here
$sdk = new \Tatum\Sdk();

// MainNet API Call
$sdk->mainnet()->api()->algorand();

// TestNet API Call
$sdk->testnet()->api()->algorand();

Methods

Method Description
algorandBroadcast() Broadcast signed Algorand transaction
algorandGenerateAddress() Generate Algorand account address from private key
algorandGenerateWallet() Generate Algorand wallet
algorandGetBalance() Get Algorand Account balance
algorandGetBlock() Get Algorand block by block round number
algorandGetCurrentBlock() Get current block number
algorandGetTransaction() Get Algorand Transaction
receiveAlgorandAsset() Enable receiving asset on account
receiveAlgorandAssetKMS() Enable receiving asset on account
transferAlgorandBlockchain() Send Algos to an Algorand account
transferAlgorandBlockchainKMS() Send Algos to an Algorand account

algorandBroadcast()

Example

#️⃣ Execute command in terminal

✨ php -f algorandBroadcast.php

Request

POST /v3/algorand/broadcast

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->algorand()->algorandBroadcast(
    \Tatum\Model\BroadcastKMS $broadcast_kms
): \Tatum\Model\AlgoTransactionHashKMS

Parameters

Name Type Description Notes
$broadcast_kms \Tatum\Model\BroadcastKMS    

Return type

\Tatum\Model\AlgoTransactionHashKMS

Description

Broadcast signed Algorand transaction

2 credits per API call.

Broadcast signed transaction to Algorand 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.

Back to top


algorandGenerateAddress()

Example

#️⃣ Execute command in terminal

✨ php -f algorandGenerateAddress.php

Request

GET /v3/algorand/address/{priv}

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->algorand()->algorandGenerateAddress(
    string $priv
): \Tatum\Model\AlgorandGenerateAddress200Response

Parameters

Name Type Description Notes
$priv string private key of wallet.  

Return type

\Tatum\Model\AlgorandGenerateAddress200Response

Description

Generate Algorand account address from private key

1 credit per API call.

Generate Algorand account deposit address from private key.

Back to top


algorandGenerateWallet()

Example

#️⃣ Execute command in terminal

✨ php -f algorandGenerateWallet.php

Request

GET /v3/algorand/wallet

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->algorand()->algorandGenerateWallet(
    [ string $mnemonic ]
): \Tatum\Model\AlgoWallet

Parameters

Name Type Description Notes
$mnemonic string Mnemonic to use for generation of extended public and private keys. [optional]

Return type

\Tatum\Model\AlgoWallet

Description

Generate Algorand wallet

1 credit per API call.

Tatum supports Algorand wallets.

Back to top


algorandGetBalance()

Example

#️⃣ Execute command in terminal

✨ php -f algorandGetBalance.php

Request

GET /v3/algorand/account/balance/{address}

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->algorand()->algorandGetBalance(
    string $address
): \Tatum\Model\AlgorandGetBalance200Response

Parameters

Name Type Description Notes
$address string Account address you want to get balance of  

Return type

\Tatum\Model\AlgorandGetBalance200Response

Description

Get Algorand Account balance

1 credit per API call.

Get Algorand account balance in ALGO.

Back to top


algorandGetBlock()

Example

#️⃣ Execute command in terminal

✨ php -f algorandGetBlock.php

Request

GET /v3/algorand/block/{roundNumber}

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->algorand()->algorandGetBlock(
    float $round_number
): \Tatum\Model\AlgoBlock

Parameters

Name Type Description Notes
$round_number float Block round number  

Return type

\Tatum\Model\AlgoBlock

Description

Get Algorand block by block round number

1 credit per API call.

Get Algorand block by block round number.

Back to top


algorandGetCurrentBlock()

Example

#️⃣ Execute command in terminal

✨ php -f algorandGetCurrentBlock.php

Request

GET /v3/algorand/block/current

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->algorand()->algorandGetCurrentBlock(): float

Parameters

This endpoint does not need any parameter.

Return type

float

Description

Get current block number

1 credit per API call.

Get Algorand current block number. This is the number of the latest block in the blockchain.

Back to top


algorandGetTransaction()

Example

#️⃣ Execute command in terminal

✨ php -f algorandGetTransaction.php

Request

GET /v3/algorand/transaction/{txid}

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->algorand()->algorandGetTransaction(
    string $txid
): \Tatum\Model\AlgoTx

Parameters

Name Type Description Notes
$txid string Transaction id  

Return type

\Tatum\Model\AlgoTx

Description

Get Algorand Transaction

1 credit per API call.

Get Algorand transaction by transaction id.

Back to top


receiveAlgorandAsset()

Example

#️⃣ Execute command in terminal

✨ php -f receiveAlgorandAsset.php

Request

POST /v3/algorand/asset/receive

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->algorand()->receiveAlgorandAsset(
    \Tatum\Model\ReceiveAlgorandAsset $receive_algorand_asset
): \Tatum\Model\TransactionSigned

Parameters

Name Type Description Notes
$receive_algorand_asset \Tatum\Model\ReceiveAlgorandAsset    

Return type

\Tatum\Model\TransactionSigned

Description

Enable receiving asset on account

2 credits per API call.

Enable accepting Algorand asset on the sender account. This operation needs the private key of the blockchain address. 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.

Back to top


receiveAlgorandAssetKMS()

Example

#️⃣ Execute command in terminal

✨ php -f receiveAlgorandAssetKMS.php

Request

POST /v3/algorand/asset/receive

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->algorand()->receiveAlgorandAssetKMS(
    \Tatum\Model\ReceiveAlgorandAssetKMS $receive_algorand_asset_kms
): \Tatum\Model\TransactionSigned

Parameters

Name Type Description Notes
$receive_algorand_asset_kms \Tatum\Model\ReceiveAlgorandAssetKMS    

Return type

\Tatum\Model\TransactionSigned

Description

Enable receiving asset on account

Back to top


transferAlgorandBlockchain()

Example

#️⃣ Execute command in terminal

✨ php -f transferAlgorandBlockchain.php

Request

POST /v3/algorand/transaction

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->algorand()->transferAlgorandBlockchain(
    \Tatum\Model\TransferAlgorandBlockchain $transfer_algorand_blockchain
): \Tatum\Model\TransactionSigned

Parameters

Name Type Description Notes
$transfer_algorand_blockchain \Tatum\Model\TransferAlgorandBlockchain    

Return type

\Tatum\Model\TransactionSigned

Description

Send Algos to an Algorand account

2 credits per API call

Send Algos from one Algorand address to the other one.

Signing a transaction

When sending Algos, you are charged a fee for the transaction, and you must sign the transaction with the private key of the blockchain address from which the fee will be deducted.

Providing the private key in the API is not a secure way of signing transactions, because the private key can be stolen or exposed. Your private keys should never leave your security perimeter. You should use the private keys only for testing a solution you are building on the testnet of a blockchain.

For signing transactions on the mainnet, we strongly recommend that you use the Tatum Key Management System (KMS) and provide the signature ID instead of the private key in the API. Alternatively, you can use the Tatum JavaScript client.

Back to top


transferAlgorandBlockchainKMS()

Example

#️⃣ Execute command in terminal

✨ php -f transferAlgorandBlockchainKMS.php

Request

POST /v3/algorand/transaction

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->algorand()->transferAlgorandBlockchainKMS(
    \Tatum\Model\TransferAlgorandBlockchainKMS $transfer_algorand_blockchain_kms
): \Tatum\Model\TransactionSigned

Parameters

Name Type Description Notes
$transfer_algorand_blockchain_kms \Tatum\Model\TransferAlgorandBlockchainKMS    

Return type

\Tatum\Model\TransactionSigned

Description

Send Algos to an Algorand account

Back to top