Skip to content

Instantly share code, notes, and snippets.

@you21979
Last active August 29, 2015 14:15
Show Gist options
  • Save you21979/a7a3c10b9347ec3b3f37 to your computer and use it in GitHub Desktop.
Save you21979/a7a3c10b9347ec3b3f37 to your computer and use it in GitHub Desktop.
あるレジャー番号の時のIOUの所持量を調べたいとき。
"ledger": "current" を 数値型でレジャー番号を入れる
https://ripple.com/build/websocket-tool/#account_lines
あるレジャー番号の時のXRPの所持量を調べたいとき。
https://ripple.com/build/websocket-tool/#account_info
"ledger": "current" を 数値型でレジャー番号を入れる
時間からレジャー番号を割り出したい時
いい方法がない
思いついたのは一日の秒数を最短のレジャークローズの時間4秒で割る
24*3600=86400
86400/4=21600
現在の時間から一日戻りたければ ledger_close の 値から 21600 引いた時間を取得する
実際には4-5秒なのでのでそこから1を引きながら時間と比較する
レジャー番号から時間を割り出したい時
"ledger_index": 100000 を 数値型でレジャー番号を入れる
https://ripple.com/build/websocket-tool/#ledger
r.result.ledger.close_time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment