addedd (list_events_in_group) (get_unmatched_bets_for_bettor) to the wallet

This commit is contained in:
Roman Olearski 2017-08-31 12:51:53 +02:00
parent 38f1cbdcd6
commit 05a06a6f6d
4 changed files with 38 additions and 10 deletions

View file

@ -16,7 +16,8 @@ import_key init10 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3
#upgrade_account nathan 1
import_balance nathan [5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3] 1
import_key nathan "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"
transfer nathan init0 125 PPY "" true
transfer nathan init1 125 PPY "" true
@ -33,6 +34,8 @@ transfer nathan init1 125 PPY "" true
transfer nathan 1.2.0 1250 PPY "" true
transfer nathan 1.2.1 1250 PPY "" true
transfer nathan 1.2.5 1250 PPY "" true
vote_for_witness nathan init0 1 1
vote_for_witness nathan init1 1 1
@ -102,29 +105,30 @@ approve_proposal nathan 1.10.3 { "active_approvals_to_add" : [ "init0", "init1
# RULES
propose_create_betting_market_rules nathan "2017-08-08-T07:25:01" [["en","NHL Rules v1.0"]] [["en", "The winner will be the team with the most points at the end of the game. The team with fewer points will not be the winner."]] 1
propose_create_betting_market_rules nathan "2017-08-31-T10:35:01" [["en","NHL Rules v1.0"]] [["en", "The winner will be the team with the most points at the end of the game. The team with fewer points will not be the winner."]] 1
approve_proposal nathan 1.10.5 { "active_approvals_to_add" : [ "init0", "init1"] } 1
approve_proposal nathan 1.10.8 { "active_approvals_to_add" : [ "init0", "init1"] } 1
//get_object 1.19.0
### BETTING_MARKET GROUP
propose_create_betting_market_group nathan "2017-08-08-T07:55:01" [["en", "Moneyline"]] "1.18.0" "1.19.0" "1.3.0" 1
propose_create_betting_market_group nathan "2017-08-31-T10:39:01" [["en", "Moneyline"]] "1.18.0" "1.19.0" "1.3.0" 1
propose_create_betting_market_group nathan "2017-08-25-T11:10:01" [["en", "Moneyline NHL"]] "1.18.1" "1.19.1" "1.3.0" 1
approve_proposal nathan 1.10.6 { "active_approvals_to_add" : [ "init0", "init1"] } 1
approve_proposal nathan 1.10.9 { "active_approvals_to_add" : [ "init0", "init1"] } 1
//get_object 1.20.0
### BETTING_MARKET
propose_create_betting_market nathan "2017-08-08-T08:35:01" "1.20.0" [["en","Washington Capitals win"]] [] 1
propose_create_betting_market nathan "2017-08-08-T08:25:02" "1.20.0" [["en","Chicago Blackhawks win"]] [] 1
propose_create_betting_market nathan "2017-08-31-T10:42:01" "1.20.0" [["en","Washington Capitals win"]] [] 1
propose_create_betting_market nathan "2017-08-31-T10:42:01" "1.20.0" [["en","Chicago Blackhawks win"]] [] 1
approve_proposal nathan 1.10.7 { "active_approvals_to_add" : [ "init0", "init1"] } 1
approve_proposal nathan 1.10.8 { "active_approvals_to_add" : [ "init0", "init1"] } 1
approve_proposal nathan 1.10.10 { "active_approvals_to_add" : [ "init0", "init1"] } 1
approve_proposal nathan 1.10.11 { "active_approvals_to_add" : [ "init0", "init1"] } 1
//get_object 1.21.0
//get_object 1.21.1
@ -138,7 +142,7 @@ approve_proposal nathan 1.10.8 { "active_approvals_to_add" : [ "init0", "init1
//place_bet alice "1.21.0" 0 { "amount" : 100 } 20000 20000 true
place_bet alice "1.21.0" 1 "123" "PPY" 200 true
place_bet bob "1.21.0" 0 "123" "PPY" 200 true
place_bet bob "1.21.1" 0 "123" "PPY" 200 true

View file

@ -1,5 +1,16 @@
http://api.coindesk.com/charts/data?data=close&startdate=2017-01-01&enddate=2017-08-28&exchanges=bpi,bitstamp,coinbase,itbit,okcoin&dev=1&index=USD
select date, b.coin_type as bought_coin_type, bought_quantity, s.coin_type as sold_coin_type, sold_quantity from external_trades as t
where processed = false
left join coin_types as b ON t.bought_coin_type_id = b.coin_type_id
left join coin_types as s ON t.sold_coin_type_id = s.coin_type_id
### PRE...
see betting-nhl

View file

@ -1585,6 +1585,9 @@ class wallet_api
vector<betting_market_group_object> list_betting_market_groups(event_id_type event_id) const;
vector<betting_market_object> list_betting_markets(betting_market_group_id_type betting_market_group_id) const;
global_betting_statistics_object get_global_betting_statistics() const;
vector<event_object> list_events_in_group(event_group_id_type event_group_id) const;
vector<bet_object> get_unmatched_bets_for_bettor(betting_market_id_type betting_market_id, account_id_type account_id) const;
signed_transaction propose_create_sport(
const string& proposing_account,
@ -1982,6 +1985,8 @@ FC_API( graphene::wallet::wallet_api,
(list_event_groups)
(list_betting_market_groups)
(list_betting_markets)
(list_events_in_group)
(get_unmatched_bets_for_bettor)
(get_global_betting_statistics)
(propose_create_sport)
(propose_create_event_group)

View file

@ -5067,6 +5067,14 @@ global_betting_statistics_object wallet_api::get_global_betting_statistics() con
return my->_remote_db->get_global_betting_statistics();
}
vector<event_object> wallet_api::list_events_in_group(event_group_id_type event_group_id) const
{
return my->_remote_db->list_events_in_group(event_group_id);
}
vector<bet_object> wallet_api::get_unmatched_bets_for_bettor(betting_market_id_type betting_market_id, account_id_type account_id) const
{
return my->_remote_db->get_unmatched_bets_for_bettor(betting_market_id, account_id);
}
signed_transaction wallet_api::propose_create_sport(
const string& proposing_account,