本サンプル実行前に

サンプルディレクトリへ移動

pythonディレクトリへ移動をします。

cd catapult/python

以後のサンプルは

catapult/python

ディレクトリで実行するものとします。

ブロック高の確認

ブロック情報を取得します。

heightは現在のブロック高

finalize heightは確定したブロック高

になります。

最新のブロック高の確認 block_check.py

python block_check.py
出力例:
height 205103
finalize height 205084

websocket経由でリアルタイムのブロック高確認 block_check_listener.py

websocketで、リアルタイムのブロック高を取得します。

python block_check_listener.py
出力例:
height 205741
height 205742
height 205743
finalize height 205724
height 205744

終了する場合は、Ctrl+c で抜けてください。


直近の10ブロック高の時刻とトランザクション数を確認 block_info.py

python block_info.py
出力例:
-------------------------------------------------
BlockHeight 206172
Date 2023-05-26 15:32:03.796000
TotalTransaction 0
-------------------------------------------------
-------------------------------------------------
BlockHeight 206171
Date 2023-05-26 15:32:00.021000
TotalTransaction 0
-------------------------------------------------
-------------------------------------------------
BlockHeight 206170
Date 2023-05-26 15:31:46.011000
TotalTransaction 0
-------------------------------------------------
-------------------------------------------------
BlockHeight 206169
Date 2023-05-26 15:31:30.768000
TotalTransaction 0
-------------------------------------------------
-------------------------------------------------
BlockHeight 206168
Date 2023-05-26 15:31:20.761000
TotalTransaction 0
-------------------------------------------------
-------------------------------------------------
BlockHeight 206167
Date 2023-05-26 15:31:07.751000
TotalTransaction 0
-------------------------------------------------
-------------------------------------------------
BlockHeight 206166
Date 2023-05-26 15:30:57.974000
TotalTransaction 0
-------------------------------------------------
-------------------------------------------------
BlockHeight 206165
Date 2023-05-26 15:30:46.735000
TotalTransaction 0
-------------------------------------------------
-------------------------------------------------
BlockHeight 206164
Date 2023-05-26 15:30:33.725000
TotalTransaction 0
-------------------------------------------------
-------------------------------------------------
BlockHeight 206163
Date 2023-05-26 15:30:24.717000
TotalTransaction 0
-------------------------------------------------

ブロック高が正常に出力されれば、エンドポイントURLの設定は正常に完了しています。