ex_golos v0.2.0 Golos.DatabaseApi
Summary
Functions
Get account count Example response: 25290
Returns account operations history Example response:
[[7817, %{"block" => 3107388, "id" => "2.17.1197661", "op" => ["vote", %{"author" => "vik", "permlink" => "dostupnyi-javascript-na-prikladnom-primere-sozdaniya-stranicy-saita-s-deistviyami-polzovatelei-golosa-v-realnom-vremeni", "voter" => "ontofractal", "weight" => 10000}], "op_in_trx" => 0, "timestamp" => "2017-02-03T12:36:06", "trx_id" => "dc866b17ba80fa0ca0fe283ca19ebea9193987bc", "trx_in_block" => 0, "virtual_op" => 0}], [7816, %{"block" => 3107390, "id" => "2.17.1197663", "op" => ["vote", %{"author" => "pro.bitcoin", "permlink" => "podkast-pro-bitkoin-samye-glavnye-novosti-iz-mira-kriptovalyut-vypusk-27", "voter" => "ontofractal", "weight" => 10000}], "op_in_trx" => 0, "timestamp" => "2017-02-03T12:36:12", "trx_id" => "a7ce75dcd43641edd498d77bb4a938c9cdeb7405", "trx_in_block" => 0, "virtual_op" => 0}]]
Returns account data. Accepts a list of up to 1000 account names
Returns block data, accepts block height
Returns block header data. Accepts block height
Unsurprisingly returns a map with chain propeties. Example result:
%{"account_creation_fee" => "1.000 GOLOS", "maximum_block_size" => 131072, "sbd_interest_rate" => 1000}
Returns node client config
Returns content data, accepts author and permlink
Returns current median history price. Example response:
%{"base" => "1.000 GBG", "quote" => "0.559 GOLOS"}
Unsurprisingly returns a map with dynamic global propeties. Example response
Returns feed history Example response:
%{"current_median_history" => %{"base" => "1.000 GBG",
"quote" => "0.559 GOLOS"}, "id" => "2.14.0",
"price_history" => [%{"base" => "1.379 GBG", "quote" => "1.000 GOLOS"},
%{"base" => "1.379 GBG", "quote" => "1.000 GOLOS"},
%{"base" => "1.379 GBG", "quote" => "1.000 GOLOS"},
%{"base" => "1.000 GBG", ...}, %{...}, ...]}
Gets hardfork version
Get next scheduled hardfork time
Returns witness schedule
Returns list of maps of account data
Lookup accounts Example response:
["razumnica", "razumova-l", "razvanelulmarin", "razved1", "razzewille", "rbaron", "rbc", "rbi", "rbrown", "rbur93"]
Functions
Returns account operations history Example response:
[[7817, %{"block" => 3107388, "id" => "2.17.1197661", "op" => ["vote", %{"author" => "vik", "permlink" => "dostupnyi-javascript-na-prikladnom-primere-sozdaniya-stranicy-saita-s-deistviyami-polzovatelei-golosa-v-realnom-vremeni", "voter" => "ontofractal", "weight" => 10000}], "op_in_trx" => 0, "timestamp" => "2017-02-03T12:36:06", "trx_id" => "dc866b17ba80fa0ca0fe283ca19ebea9193987bc", "trx_in_block" => 0, "virtual_op" => 0}], [7816, %{"block" => 3107390, "id" => "2.17.1197663", "op" => ["vote", %{"author" => "pro.bitcoin", "permlink" => "podkast-pro-bitkoin-samye-glavnye-novosti-iz-mira-kriptovalyut-vypusk-27", "voter" => "ontofractal", "weight" => 10000}], "op_in_trx" => 0, "timestamp" => "2017-02-03T12:36:12", "trx_id" => "a7ce75dcd43641edd498d77bb4a938c9cdeb7405", "trx_in_block" => 0, "virtual_op" => 0}]]
Returns account data. Accepts a list of up to 1000 account names
Example response:
[%{"recovery_account" => "cyberfounder", "posting_rewards" => 6041772,
"created" => "1970-01-01T00:00:00",
"last_bandwidth_update" => "2017-02-03T07:44:33",
"to_withdraw" => "5358033161499672",
"last_active_proved" => "1970-01-01T00:00:00", "withdraw_routes" => 0,
"last_account_update" => "2016-11-04T21:28:45",
"sbd_last_interest_payment" => "2017-01-15T11:19:27",
"json_metadata" => "{"created_at":"GENESIS","ico_address":"1FNnNWE3m4rsMWTaX76A4bN1uK4biERdVn","user_image":"https://habrastorage.org/files/6b3/db5/587/6b3db55871e04985821e4c453a30c60c.jpg"}",
"active_challenged" => false, "vesting_balance" => "0.000 GOLOS",
"last_vote_time" => "2017-02-03T07:44:33", "post_history" => [],
"blog_category" => %{}, "market_history" => [], "id" => "2.2.1993",
"vesting_shares" => "5405134010.995395 GESTS", "vote_history" => [],
"reset_account" => "null", "sbd_balance" => "12877.442 GBG",
"last_post" => "2017-02-03T07:42:09", "lifetime_vote_count" => 0,
"savings_sbd_last_interest_payment" => "1970-01-01T00:00:00",
"mined" => true, "owner_challenged" => false,
"vesting_withdraw_rate" => "51519549.629804 GESTS",
"active" => %{"account_auths" => [],
"key_auths" => [["GLS5vdTX6auUFyUwWEyzXAXhqo6LkCeCKAG2Tr9QaohRurcBouzHR",
1]], "weight_threshold" => 1}, "proxy" => "",
"posting" => %{"account_auths" => [],
"key_auths" => [["GLS574PtkDcrf5PE8QA8Uq1a4YLqer6vRT8WTgsxdYnx5LJDG7RCD",
1]], "weight_threshold" => 1}, "last_root_post" => "2017-02-02T13:37:45",
"savings_balance" => "0.000 GOLOS", "average_bandwidth" => 313586832,
"last_account_recovery" => "1970-01-01T00:00:00",
"next_vesting_withdrawal" => "2017-02-05T15:01:33", "can_vote" => true,
"owner" => %{"account_auths" => [],
"key_auths" => [["GLS6PturNHrX82R3b6ymKRksNWT9K3hPL377qGmgbwBn2W5zyZVtH",
1]], "weight_threshold" => 1},
"witness_votes" => ["aizensou", "aleksandraz", "arcange", "creator",
"dark.sun", "dervish0", "dr2073", "good-karma", "jesta", "kuna", "lehard",
...], "reputation" => "24178458603348", "post_count" => 615,
"last_owner_proved" => "1970-01-01T00:00:00",
"sbd_seconds_last_update" => "2017-02-03T06:17:15",
"memo_key" => "GLS8dEWEGYtZj8hvcm7NVZjQKy637F2UMUK9RMMJKW4TowPX7FWFS",
"name" => "hipster", "withdrawn" => "103039099259608",
"savings_withdraw_requests" => 0,
"reset_request_time" => "1969-12-31T23:59:59", "savings_sbd_seconds" => "0",
"last_owner_update" => "2016-10-18T11:19:12", ...},
%{...}]
Returns block data, accepts block height.
Example response:
%{"extensions" => [], "previous" => "0004cb2eff2f45b042e85563f76f24123b6dfdd2",
"timestamp" => "2016-10-29T09:23:33",
"transaction_merkle_root" => "8477010d8f8ade6f69744c6c28203f1b4a1690a2",
"transactions" => [%{"expiration" => "2016-10-29T09:23:42",
"extensions" => [],
"operations" => [["comment",
%{"author" => "kriptograf",
"body" => "@@ -187,16 +187,17 @@ %D1%81%D1%82%D0%BE%D1%80%D0%B0%D0%BC%D0%B8 +%0A ( %D1%81%D1%83%D0%BC%D0%BC%D1%8B ",
"json_metadata" => "{"tags":["ru--kriptovalyuty"]}",
"parent_author" => "sept",
"parent_permlink" => "kak-kupit-bitkoin-s-minimalnoi-komissiei",
"permlink" => "re-sept-kak-kupit-bitkoin-s-minimalnoi-komissiei-20161029t091207449z",
"title" => ""}]], "ref_block_num" => 51994,
"ref_block_prefix" => 2572860361,
"signatures" => ["207fe62d3e6582819a24f5c2258a9d74f69ebab6c9a42b4d321fe08e559b4cd13b6486a429cb60176d40a5d46ee8b8e30b5c6c24d8facc2a7a779ade3f9139a470"]}],
"witness" => "misha",
"witness_signature" => "2047ea30c48247a67ff553986f221092d32985eea3e341d684f2d4c0aa09a0ec402582b06619fc5dc40192e2c311eeea3c}
Returns block header data. Accepts block height.
Example response:
%{"extensions" => [], "previous" => "0000000000000000000000000000000000000000",
"timestamp" => "2016-10-18T11:01:48",
"transaction_merkle_root" => "0000000000000000000000000000000000000000",
"witness" => "cyberfounder"}
Unsurprisingly returns a map with chain propeties. Example result:
%{"account_creation_fee" => "1.000 GOLOS", "maximum_block_size" => 131072, "sbd_interest_rate" => 1000}
Returns node client config
Example response:
%{"STEEMIT_MINER_ACCOUNT" => "miners",
"STEEMIT_MIN_CONTENT_REWARD" => "1.500 GOLOS",
"STEEMIT_BLOCKCHAIN_HARDFORK_VERSION" => "0.14.0",
"STEEMIT_CURATE_APR_PERCENT" => 1937, "VESTS_SYMBOL" => "91621639407366",
"STEEMIT_MIN_LIQUIDITY_REWARD" => "1200.000 GOLOS",
"STEEMIT_1_PERCENT" => 100, "STEEMIT_PRODUCER_APR_PERCENT" => 750,
"STEEMIT_FEED_INTERVAL_BLOCKS" => 1200, "STEEM_SYMBOL" => "91600047785731",
"STEEMIT_MAX_MEMO_SIZE" => 2048, "STEEMIT_MAX_RATION_DECAY_RATE" => 1000000,
"STEEMIT_INIT_SUPPLY" => "43306176000", "STEEMIT_MAX_RUNNER_WITNESSES" => 1,
"STEEMIT_REVERSE_AUCTION_WINDOW_SECONDS" => 1800, "STEEMIT_MAX_MINERS" => 21,
"STEEMIT_VOTE_REGENERATION_SECONDS" => 432000,
"STEEMIT_MAX_SIG_CHECK_DEPTH" => 2, "STEEMIT_MAX_FEED_AGE" => "604800000000",
"STEEMIT_BLOCKS_PER_HOUR" => 1200,
"STEEMIT_VESTING_WITHDRAW_INTERVALS" => 104,
"STEEMIT_CONVERSION_DELAY" => "604800000000",
"STEEMIT_MAX_MINER_WITNESSES" => 1,
"STEEMIT_BANDWIDTH_AVERAGE_WINDOW_SECONDS" => 604800,
"STEEMIT_LIQUIDITY_REWARD_PERIOD_SEC" => 3600,
"STEEMIT_BLOCKS_PER_DAY" => 28800,
"STEEMIT_MAX_TIME_UNTIL_EXPIRATION" => 3600,
"STEEMIT_LIQUIDITY_TIMEOUT_SEC" => "604800000000",
"STEEMIT_MIN_BLOCK_SIZE_LIMIT" => 65536, "IS_TEST_NET" => false,
"STEEMIT_DEFAULT_SBD_INTEREST_RATE" => 1000,
"STEEMIT_MIN_ACCOUNT_CREATION_FEE" => 1, "STEEMIT_NULL_ACCOUNT" => "null",
"STEEMIT_MAX_ACCOUNT_WITNESS_VOTES" => 30,
"STEEMIT_MAX_VOTED_WITNESSES" => 19, "STEEMIT_MIN_UNDO_HISTORY" => 10,
"STEEMIT_ADDRESS_PREFIX" => "GLS",
"STEEMIT_HARDFORK_REQUIRED_WITNESSES" => 17,
"STEEMIT_CONTENT_APR_PERCENT" => 5813,
"STEEMIT_APR_PERCENT_SHIFT_PER_ROUND" => 83,
"STEEMIT_START_MINER_VOTING_BLOCK" => 200,
"STEEMIT_SECONDS_PER_YEAR" => 31536000,
"STEEMIT_MIN_PRODUCER_REWARD" => "1.000 GOLOS",
"STEEMIT_LIQUIDITY_REWARD_BLOCKS" => 1200,
"STEEMIT_CASHOUT_WINDOW_SECONDS" => 86400,
"GRAPHENE_CURRENT_DB_VERSION" => "GPH2.4", "STEEMIT_MINER_PAY_PERCENT" => 100,
"STEEMIT_MIN_LIQUIDITY_REWARD_PERIOD_SEC" => 60000000,
"STEEMIT_MINING_REWARD" => "1.000 GOLOS",
"STEEMIT_FREE_TRANSACTIONS_WITH_NEW_ACCOUNT" => 100, ...}
Returns content data, accepts author and permlink.
Example response:
%{"max_accepted_payout" => "1000000.000 GBG",
"title" => "[объявление] Краудсейл и Шэрдроп. Дистрибьюция",
"category" => "ru--kraudseijl", "promoted" => "0.000 GBG",
"last_update" => "2016-12-06T15:36:54", "created" => "2016-12-05T16:43:03",
"parent_permlink" => "ru--kraudseijl", "total_vote_weight" => 0,
"json_metadata" => "{"tags":["ru--kraudseijl","ru--shyerdrop","ru--golos"],"users":["golos","crowdsale","cyberdrop","misha","ether","bender","hipster","litvintech","vitaly-lvov"],"image":["https://dl.dropboxusercontent.com/u/52209381/golos/golos.png","https://dl.dropboxusercontent.com/u/52209381/golos/Screenshot%202016-12-05%2018.30.00.png","https://dl.dropboxusercontent.com/u/52209381/golos/ico_final-min.jpg","https://dl.dropboxusercontent.com/u/52209381/golos/Screenshot%202016-12-06%2002.25.05.png","https://dl.dropboxusercontent.com/u/52209381/golos/card.png"],"links":["https://docs.google.com/spreadsheets/d/1JwCAeRwsu4NzCG20UDM_CnEEsskl0wtvQ7VYjqi233A/edit?usp=sharing","https://golos.io/@litvintech"]}",
"last_payout" => "2017-01-15T11:00:06",
"total_payout_value" => "2412.784 GBG", "allow_replies" => true,
"children_rshares2" => "0", "id" => "2.8.30160",
"pending_payout_value" => "0.000 GBG", "children" => 15, "replies" => [],
"body" => "...",
"active" => "2016-12-06T22:23:06", "net_rshares" => 0,
"author_rewards" => 10011558, "total_pending_payout_value" => "0.000 GBG",
"root_comment" => "2.8.30160", "max_cashout_time" => "1969-12-31T23:59:59",
"root_title" => "[объявление] Краудсейл и Шэрдроп. Дистрибьюция",
"allow_votes" => true, "percent_steem_dollars" => 10000,
"children_abs_rshares" => 0, "net_votes" => 90, "author" => "litvintech",
"curator_payout_value" => "112.100 GBG",
"permlink" => "obyavlenie-kraudseil-i-sherdrop-distribyuciya",
"url" => "/ru--kraudseijl/@litvintech/obyavlenie-kraudseil-i-sherdrop-distribyuciya",
"cashout_time" => "2017-02-14T11:00:06", "parent_author" => "",
"allow_curation_rewards" => true, "vote_rshares" => 0,
"reward_weight" => 10000,
"active_votes" => [%{"percent" => 1000, "reputation" => "15928643268388",
"rshares" => "1974529666496", "time" => "2016-12-05T17:02:39",
"voter" => "val", "weight" => "99631990926249375"}, %{...}, ...], "depth" => 0,
"mode" => "second_payout", "abs_rshares" => 0,
"author_reputation" => "22784203010137"}
Returns current median history price. Example response:
%{"base" => "1.000 GBG", "quote" => "0.559 GOLOS"}
Unsurprisingly returns a map with dynamic global propeties. Example response:
%{"average_block_size" => 416, "confidential_sbd_supply" => "0.000 GBG",
"confidential_supply" => "0.000 GOLOS", "current_aslot" => 3112003,
"current_reserve_ratio" => 20000, "current_sbd_supply" => "504154.519 GBG",
"current_supply" => "96227889.854 GOLOS", "current_witness" => "on0tole",
"head_block_id" => "002f68ff4d75004b06539669e77ce6f5967c2afa",
"head_block_number" => 3107071, "id" => "2.0.0",
"last_irreversible_block_num" => 3107056,
"max_virtual_bandwidth" => "5986734968066277376",
"maximum_block_size" => 65536, "num_pow_witnesses" => 97,
"participation_count" => 128,
"recent_slots_filled" => "340282366920938463463374607431768211455",
"sbd_interest_rate" => 1000, "sbd_print_rate" => 10000,
"time" => "2017-02-03T12:20:09", "total_pow" => 148587,
"total_reward_fund_steem" => "69239.698 GOLOS",
"total_reward_shares2" => "1030808747260116624181406420498",
"total_vesting_fund_steem" => "95566422.906 GOLOS",
"total_vesting_shares" => "448830750142.483827 GESTS",
"virtual_supply" => "96509712.230 GOLOS", "vote_regeneration_per_day" => 40}
Returns feed history Example response:
%{"current_median_history" => %{"base" => "1.000 GBG",
"quote" => "0.559 GOLOS"}, "id" => "2.14.0",
"price_history" => [%{"base" => "1.379 GBG", "quote" => "1.000 GOLOS"},
%{"base" => "1.379 GBG", "quote" => "1.000 GOLOS"},
%{"base" => "1.379 GBG", "quote" => "1.000 GOLOS"},
%{"base" => "1.000 GBG", ...}, %{...}, ...]}
Gets hardfork version
Example response: "0.14.0"
Get next scheduled hardfork time
Example result: %{"hf_version" => "0.0.0", "live_time" => "2016-10-18T11:00:00"}
Returns witness schedule
Example response:
%{"current_shuffled_witnesses" => ["litrbooh", "gtx-1080-sc-0015",
"vitaly-lvov", "aleksandraz", "on0tole", "dark.sun", "jesta", "someguy123",
"pmartynov", "primus", "litvintech", "phenom", "hipster", "good-karma",
"arcange", "serejandmyself", "kuna", "dr2073", "lehard", "testz", "xtar"],
"current_virtual_time" => "2359603129137518468300462851", "id" => "2.7.0",
"majority_version" => "0.14.2",
"median_props" => %{"account_creation_fee" => "1.000 GOLOS",
"maximum_block_size" => 131072, "sbd_interest_rate" => 1000},
"next_shuffle_block_num" => 3108273}
Returns list of maps of account data.
Example response:
[%{"recovery_account" => "cyberfounder", "posting_rewards" => 83462628,
"created" => "1970-01-01T00:00:00",
"last_bandwidth_update" => "2017-02-03T11:57:06", "to_withdraw" => 0,
"last_active_proved" => "1970-01-01T00:00:00", "withdraw_routes" => 0,
"last_account_update" => "2017-01-21T11:34:30",
"sbd_last_interest_payment" => "2017-01-15T23:43:00",
"json_metadata" => "{"created_at":"GENESIS","ico_address":"1B9Khkti2bBPccSoNj6aiFCYhq5Rq5GAMb","user_image":"https://avatars2.githubusercontent.com/u/4211840?v=3&u=97aeb67208068d457fad522a500b62f12908270c&s=400"}",
"active_challenged" => false, "last_vote_time" => "2017-02-03T11:57:06",
"id" => "2.2.6836", "vesting_shares" => "386381769.644947 GESTS",
"reset_account" => "null", "sbd_balance" => "917.535 GBG",
"last_post" => "2017-02-02T19:11:57", "lifetime_vote_count" => 0,
"savings_sbd_last_interest_payment" => "1970-01-01T00:00:00",
"mined" => true, "owner_challenged" => false,
"vesting_withdraw_rate" => "0.000001 GESTS",
"active" => %{"account_auths" => [],
"key_auths" => [["GLS8NV2JNwtcTSCDSJDgr69PFueGTvnvGC2F8HPSyUxFWrnp9ATY6",
1]], "weight_threshold" => 1}, "proxy" => "",
"posting" => %{"account_auths" => [],
"key_auths" => [["GLS6qg3gEEkSz4i1T9WpjSxjFrVc6fNEps1QpvxsDCMATiaL5aRzx",
1]], "weight_threshold" => 1}, "last_root_post" => "2017-02-01T18:17:09",
"savings_balance" => "0.000 GOLOS", "average_bandwidth" => 308637164,
"last_account_recovery" => "1970-01-01T00:00:00",
"next_vesting_withdrawal" => "1969-12-31T23:59:59", "can_vote" => true,
"owner" => %{"account_auths" => [],
"key_auths" => [["GLS6Ms4HrGMCPsq3yoytJc8TEKuQb1Bk9HRxjUSa3wtyhnpA4fJZV",
1]], "weight_threshold" => 1}, "post_count" => 421,
"last_owner_proved" => "1970-01-01T00:00:00",
"sbd_seconds_last_update" => "2017-02-03T08:48:15",
"memo_key" => "GLS5frWAw3yukawhSEnQ7zK7N1LWM77JzjJvzAZx5JRMgPkoddXTv",
"name" => "ontofractal", "withdrawn" => 0, "savings_withdraw_requests" => 0,
"reset_request_time" => "1969-12-31T23:59:59", "savings_sbd_seconds" => "0",
"last_owner_update" => "1970-01-01T00:00:00",
"proxied_vsf_votes" => [0, 0, 0, 0], "sbd_seconds" => "4489659344784",
"savings_sbd_balance" => "0.000 GBG", "post_bandwidth" => 10000,
"curation_rewards" => 5484048,
"pending_reset_authority" => %{"account_auths" => [], "key_auths" => [],
...}, "witnesses_voted_for" => 10, "comment_count" => 0, ...}]