algod REST Paths

get /v1/account/{address}
Get account information. (accountInformation)
Given a specific account public key, this call returns the accounts status, balance and spendable amounts

Path parameters

address (required)
Path Parameter — An account public key

Consumes

This API call consumes the following media types via the Content-Type request header:
  • application/json

Return type

Example data

Content-Type: application/json
{
  "amount" : 0,
  "address" : "address",
  "rewards" : 6,
  "status" : "status"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

AccountInformationResponse contains an account information Account

400

Bad Request String

401

Invalid API Token

500

Internal Error String

default

Unknown Error

get /v1/block/{round}
Get the block for the given round. (getBlock)

Path parameters

round (required)
Path Parameter — The round from which to fetch block information. format: int64

Consumes

This API call consumes the following media types via the Content-Type request header:
  • application/json

Return type

Example data

Content-Type: application/json
{
  "reward" : 7,
  "txnRoot" : "txnRoot",
  "period" : 5,
  "previousBlockHash" : "previousBlockHash",
  "seed" : "seed",
  "proposer" : "proposer",
  "nextProtocolVoteBefore" : 5,
  "nextProtocol" : "nextProtocol",
  "upgradeApprove" : true,
  "currentProtocol" : "currentProtocol",
  "balRoot" : "balRoot",
  "upgradePropose" : "upgradePropose",
  "round" : 9,
  "rate" : 2,
  "nextProtocolSwitchOn" : 1,
  "nextProtocolApprovals" : 6,
  "frac" : 0,
  "hash" : "hash",
  "timestamp" : 3,
  "txns" : {
    "transactions" : [ {
      "round" : 5,
      "tx" : "tx",
      "fee" : 0,
      "first-round" : 6,
      "noteb64" : "",
      "from" : "from",
      "payment" : {
        "amount" : 5,
        "to" : "to",
        "close" : "close"
      },
      "poolerror" : "poolerror",
      "type" : { },
      "genesishashb64" : "",
      "genesisID" : "genesisID",
      "last-round" : 1
    }, {
      "round" : 5,
      "tx" : "tx",
      "fee" : 0,
      "first-round" : 6,
      "noteb64" : "",
      "from" : "from",
      "payment" : {
        "amount" : 5,
        "to" : "to",
        "close" : "close"
      },
      "poolerror" : "poolerror",
      "type" : { },
      "genesishashb64" : "",
      "genesisID" : "genesisID",
      "last-round" : 1
    } ]
  }
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

BlockResponse contains block information Block

400

Bad Request String

401

Invalid API Token

500

Internal Error String

default

Unknown Error

get /v1/transactions/pending
Get a list of unconfirmed transactions currently in the transaction pool. (getPendingTransactions)
Get the list of pending transactions, sorted by priority, in decreasing order, truncated at the end at MAX. If MAX = 0, returns all pending transactions.

Consumes

This API call consumes the following media types via the Content-Type request header:
  • application/json

Query parameters

max (optional)
Query Parameter — Truncated number of transactions to display. If max=0, returns all pending txns. format: int64

Return type

Example data

Content-Type: application/json
{
  "totalTxns" : 0,
  "truncatedTxns" : {
    "transactions" : [ {
      "round" : 5,
      "tx" : "tx",
      "fee" : 0,
      "first-round" : 6,
      "noteb64" : "",
      "from" : "from",
      "payment" : {
        "amount" : 5,
        "to" : "to",
        "close" : "close"
      },
      "poolerror" : "poolerror",
      "type" : { },
      "genesishashb64" : "",
      "genesisID" : "genesisID",
      "last-round" : 1
    }, {
      "round" : 5,
      "tx" : "tx",
      "fee" : 0,
      "first-round" : 6,
      "noteb64" : "",
      "from" : "from",
      "payment" : {
        "amount" : 5,
        "to" : "to",
        "close" : "close"
      },
      "poolerror" : "poolerror",
      "type" : { },
      "genesishashb64" : "",
      "genesisID" : "genesisID",
      "last-round" : 1
    } ]
  }
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

PendingTransactionsResponse contains a (potentially truncated) list of transactions and the total number of transactions currently in the pool. PendingTransactions

401

Invalid API Token

500

Internal Error String

default

Unknown Error

get /v1/status
Gets the current node status. (getStatus)

Consumes

This API call consumes the following media types via the Content-Type request header:
  • application/json

Return type

Example data

Content-Type: application/json
{
  "nextConsensusVersionRound" : 1,
  "nextConsensusVersionSupported" : true,
  "lastConsensusVersion" : "lastConsensusVersion",
  "timeSinceLastRound" : 5,
  "nextConsensusVersion" : "nextConsensusVersion",
  "catchupTime" : 0,
  "lastRound" : 6
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

StatusResponse contains the node's status information NodeStatus

401

Invalid API Token

500

Internal Error String

default

Unknown Error

get /v1/ledger/supply
Get the current supply reported by the ledger. (getSupply)

Consumes

This API call consumes the following media types via the Content-Type request header:
  • application/json

Return type

Example data

Content-Type: application/json
{
  "round" : 6,
  "onlineMoney" : 0,
  "totalMoney" : 1
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

SupplyResponse contains the ledger supply information Supply

401

Invalid API Token

default

Unknown Error

get /versions
(getVersion)
Retrieves the current version

Consumes

This API call consumes the following media types via the Content-Type request header:
  • application/json

Return type

Example data

Content-Type: application/json
{
  "genesis_hash_b64" : [ 0, 0 ],
  "versions" : [ "versions", "versions" ],
  "genesis_id" : "genesis_id"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

VersionsResponse is the response to 'GET /versions' Version

get /health
Returns OK if healthy. (healthCheck)

Consumes

This API call consumes the following media types via the Content-Type request header:
  • application/json

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

OK.

401

Invalid API Token

404

Not Found String

default

Unknown Error

get /v1/transactions/pending/{txid}
Get a specific pending transaction. (pendingTransactionInformation)

Given a transaction id of a recently submitted transaction, it returns information about it. There are several cases when this might succeed:

  • transaction committed (committed round > 0) - transaction still in the pool (committed round = 0, pool error = "") - transaction removed from pool due to error (committed round = 0, pool error != "") Or the transaction may have happened sufficiently long ago that the node no longer remembers it, and this will return an error.

Path parameters

txid (required)
Path Parameter — A transaction id

Consumes

This API call consumes the following media types via the Content-Type request header:
  • application/json

Return type

Example data

Content-Type: application/json
{
  "round" : 5,
  "tx" : "tx",
  "fee" : 0,
  "first-round" : 6,
  "noteb64" : "",
  "from" : "from",
  "payment" : {
    "amount" : 5,
    "to" : "to",
    "close" : "close"
  },
  "poolerror" : "poolerror",
  "type" : { },
  "genesishashb64" : "",
  "genesisID" : "genesisID",
  "last-round" : 1
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

TransactionResponse contains a transaction information Transaction

400

Bad Request String

401

Invalid API Token

404

Transaction Not Found String

default

Unknown Error

post /v1/transactions
Broadcasts a raw transaction to the network. (rawTransaction)

Consumes

This API call consumes the following media types via the Content-Type request header:
  • application/x-binary

Request body

rawtxn binary (required)
Body Parameter — The byte encoded signed transaction to broadcast to network

Return type

Example data

Content-Type: application/json
{
  "txId" : "txId"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

TransactionIDResponse contains a transaction information transactionID

400

Bad Request String

401

Invalid API Token

500

Internal Error String

default

Unknown Error

get /v1/transactions/fee
Get the suggested fee (suggestedFee)

Consumes

This API call consumes the following media types via the Content-Type request header:
  • application/json

Return type

Example data

Content-Type: application/json
{
  "fee" : 0
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

TransactionFeeResponse contains a suggested fee TransactionFee

401

Invalid API Token

default

Unknown Error

get /swagger.json
Gets the current swagger spec. (swaggerJSON)
Returns the entire swagger spec in json.

Consumes

This API call consumes the following media types via the Content-Type request header:
  • application/json

Return type

String

Example data

Content-Type: application/json
""

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

The current swagger spec String

default

Unknown Error

get /v1/account/{address}/transaction/{txid}
Get a specific confirmed transaction. (transactionInformation)
Given a wallet address and a transaction id, it returns the confirmed transaction information. This call scans up to config.Protocol.MaxTxnLife blocks in the past.

Path parameters

address (required)
Path Parameter — An account public key
txid (required)
Path Parameter — A transaction id

Consumes

This API call consumes the following media types via the Content-Type request header:
  • application/json

Return type

Example data

Content-Type: application/json
{
  "round" : 5,
  "tx" : "tx",
  "fee" : 0,
  "first-round" : 6,
  "noteb64" : "",
  "from" : "from",
  "payment" : {
    "amount" : 5,
    "to" : "to",
    "close" : "close"
  },
  "poolerror" : "poolerror",
  "type" : { },
  "genesishashb64" : "",
  "genesisID" : "genesisID",
  "last-round" : 1
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

TransactionResponse contains a transaction information Transaction

400

Bad Request String

401

Invalid API Token

404

Transaction Not Found String

default

Unknown Error

get /v1/transactions/params
Get parameters for constructing a new transaction (transactionParams)

Consumes

This API call consumes the following media types via the Content-Type request header:
  • application/json

Return type

Example data

Content-Type: application/json
{
  "fee" : 0,
  "consensusVersion" : "consensusVersion",
  "genesishashb64" : "",
  "genesisID" : "genesisID",
  "lastRound" : 6
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

TransactionParamsResponse contains the parameters for constructing a new transaction. TransactionParams

401

Invalid API Token

default

Unknown Error

get /v1/account/{address}/transactions
Get a list of confirmed transactions. (transactions)
Returns the list of confirmed transactions between firstRound and lastRound

Path parameters

address (required)
Path Parameter — An account public key

Consumes

This API call consumes the following media types via the Content-Type request header:
  • application/json

Query parameters

firstRound (required)
Query Parameter — Do not fetch any transactions before this round. format: int64
lastRound (required)
Query Parameter — Do not fetch any transactions after this round. format: int64

Return type

Example data

Content-Type: application/json
{
  "transactions" : [ {
    "round" : 5,
    "tx" : "tx",
    "fee" : 0,
    "first-round" : 6,
    "noteb64" : "",
    "from" : "from",
    "payment" : {
      "amount" : 5,
      "to" : "to",
      "close" : "close"
    },
    "poolerror" : "poolerror",
    "type" : { },
    "genesishashb64" : "",
    "genesisID" : "genesisID",
    "last-round" : 1
  }, {
    "round" : 5,
    "tx" : "tx",
    "fee" : 0,
    "first-round" : 6,
    "noteb64" : "",
    "from" : "from",
    "payment" : {
      "amount" : 5,
      "to" : "to",
      "close" : "close"
    },
    "poolerror" : "poolerror",
    "type" : { },
    "genesishashb64" : "",
    "genesisID" : "genesisID",
    "last-round" : 1
  } ]
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

TransactionsResponse contains a list of transactions TransactionList

400

Bad Request String

401

Invalid API Token

500

Internal Error String

default

Unknown Error

get /v1/status/wait-for-block-after/{round}/
Gets the node status after waiting for the given round. (waitForBlock)
Waits for a block to appear after round {round} and returns the node's status at the time.

Path parameters

round (required)
Path Parameter — The round to wait until returning status format: int64

Consumes

This API call consumes the following media types via the Content-Type request header:
  • application/json

Return type

Example data

Content-Type: application/json
{
  "nextConsensusVersionRound" : 1,
  "nextConsensusVersionSupported" : true,
  "lastConsensusVersion" : "lastConsensusVersion",
  "timeSinceLastRound" : 5,
  "nextConsensusVersion" : "nextConsensusVersion",
  "catchupTime" : 0,
  "lastRound" : 6
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

StatusResponse contains the node's status information NodeStatus

400

Bad Request String

401

Invalid API Token

500

Internal Error String

default

Unknown Error