Class: Counterparty::Bet
- Inherits:
-
CounterResource
- Object
- CounterResource
- Counterparty::Bet
- Defined in:
- lib/counterparty/resources.rb
Overview
An object that describes a specific bet.
Instance Attribute Summary collapse
-
#bet_type ⇒ Object
(integer): 0 for Bullish CFD, 1 for Bearish CFD, 2 for Equal, 3 for Not Equal.
-
#block_index ⇒ Object
(integer): The block index (block number in the block chain).
-
#counterwager ⇒ Object
(integer): The minimum quantity of XCP to be wagered against, for the bets to match.
-
#counterwager_quantity ⇒ Object
(integer): The minimum quantity of XCP to be wagered by the user to bet against the bet issuer, if the other party were to accept the whole thing.
-
#deadline ⇒ Object
(integer): The timestamp at which the bet should be decided/settled, in Unix time.
-
#expiration ⇒ Object
(integer): The number of blocks for which the bet should be valid.
-
#fee_multiplier ⇒ Object
(integer):.
-
#feed_address ⇒ Object
(string): The address with the feed that the bet is to be made on.
-
#leverage ⇒ Object
(integer): Leverage, as a fraction of 5040.
-
#odds ⇒ Object
(float):.
-
#source ⇒ Object
(string): The address that made the bet.
-
#target_value ⇒ Object
(float): Target value for Equal/NotEqual bet.
-
#tx_hash ⇒ Object
(string): The transaction hash.
-
#tx_index ⇒ Object
(integer): The transaction index.
-
#validity ⇒ Object
(string): Set to “valid” if a valid bet.
-
#wager ⇒ Object
(integer): The quantity of XCP to wager.
-
#wager_quantity ⇒ Object
(integer): The quantity of XCP to wager.
-
#wager_remaining ⇒ Object
(integer): The quantity of XCP wagered that is remaining to bet on.
Attributes inherited from CounterResource
#allow_unconfirmed_inputs, #encoding, #fee, #fee_per_kb, #pubkey, #result_attributes
Method Summary
Methods inherited from CounterResource
#==, api_name, find, #initialize, #save!, to_create_request, to_do_request, to_get_request, #to_raw_tx, #to_signed_tx
Constructor Details
This class inherits a constructor from Counterparty::CounterResource
Instance Attribute Details
#bet_type ⇒ Object
(integer): 0 for Bullish CFD, 1 for Bearish CFD, 2 for Equal, 3 for Not Equal
34 35 36 |
# File 'lib/counterparty/resources.rb', line 34 def bet_type @bet_type end |
#block_index ⇒ Object
(integer): The block index (block number in the block chain)
24 25 26 |
# File 'lib/counterparty/resources.rb', line 24 def block_index @block_index end |
#counterwager ⇒ Object
(integer): The minimum quantity of XCP to be wagered against, for the bets to match. (Only used in Create)
74 75 76 |
# File 'lib/counterparty/resources.rb', line 74 def counterwager @counterwager end |
#counterwager_quantity ⇒ Object
(integer): The minimum quantity of XCP to be wagered by the user to bet against the bet issuer, if the other party were to accept the whole thing
45 46 47 |
# File 'lib/counterparty/resources.rb', line 45 def counterwager_quantity @counterwager_quantity end |
#deadline ⇒ Object
(integer): The timestamp at which the bet should be decided/settled, in Unix time.
38 39 40 |
# File 'lib/counterparty/resources.rb', line 38 def deadline @deadline end |
#expiration ⇒ Object
(integer): The number of blocks for which the bet should be valid
60 61 62 |
# File 'lib/counterparty/resources.rb', line 60 def expiration @expiration end |
#fee_multiplier ⇒ Object
(integer):
63 64 65 |
# File 'lib/counterparty/resources.rb', line 63 def fee_multiplier @fee_multiplier end |
#feed_address ⇒ Object
(string): The address with the feed that the bet is to be made on
30 31 32 |
# File 'lib/counterparty/resources.rb', line 30 def feed_address @feed_address end |
#leverage ⇒ Object
(integer): Leverage, as a fraction of 5040
57 58 59 |
# File 'lib/counterparty/resources.rb', line 57 def leverage @leverage end |
#odds ⇒ Object
(float):
51 52 53 |
# File 'lib/counterparty/resources.rb', line 51 def odds @odds end |
#source ⇒ Object
(string): The address that made the bet
27 28 29 |
# File 'lib/counterparty/resources.rb', line 27 def source @source end |
#target_value ⇒ Object
(float): Target value for Equal/NotEqual bet
54 55 56 |
# File 'lib/counterparty/resources.rb', line 54 def target_value @target_value end |
#tx_hash ⇒ Object
(string): The transaction hash
21 22 23 |
# File 'lib/counterparty/resources.rb', line 21 def tx_hash @tx_hash end |
#tx_index ⇒ Object
(integer): The transaction index
18 19 20 |
# File 'lib/counterparty/resources.rb', line 18 def tx_index @tx_index end |
#validity ⇒ Object
(string): Set to “valid” if a valid bet. Any other setting signifies an invalid/improper bet
67 68 69 |
# File 'lib/counterparty/resources.rb', line 67 def validity @validity end |
#wager ⇒ Object
(integer): The quantity of XCP to wager. (Only used in Create)
70 71 72 |
# File 'lib/counterparty/resources.rb', line 70 def wager @wager end |
#wager_quantity ⇒ Object
(integer): The quantity of XCP to wager
41 42 43 |
# File 'lib/counterparty/resources.rb', line 41 def wager_quantity @wager_quantity end |
#wager_remaining ⇒ Object
(integer): The quantity of XCP wagered that is remaining to bet on
48 49 50 |
# File 'lib/counterparty/resources.rb', line 48 def wager_remaining @wager_remaining end |