Class: Counterparty::Bet
- Inherits:
-
CounterResource
- Object
- CounterResource
- Counterparty::Bet
- Defined in:
- lib/counterparty/resources.rb
Overview
An object that describes a specific bet.
Constant Summary collapse
- BULLISH_CFD =
Bet Type: Bullish CFD
0
- BEARISH_CFD =
Bet Type: Bearish CFD
1
- EQUAL =
Bet Type: Equal
2
- NOT_EQUAL =
Bet Type: Not Equal
3
- LEVERAGE_BASIS =
Denominator by which the leverage integer is divided by. It’s effectively a ‘magic’ number that allows us to keep the leverage parameter an integer
5040
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_quantity ⇒ Object
(integer): The minimum quantity of XCP to be wagered against, for the bets to match.
-
#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_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, bitcoin, find, #initialize, #save!, to_create_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
50 51 52 |
# File 'lib/counterparty/resources.rb', line 50 def bet_type @bet_type end |
#block_index ⇒ Object
(integer): The block index (block number in the block chain)
40 41 42 |
# File 'lib/counterparty/resources.rb', line 40 def block_index @block_index end |
#counterwager_quantity ⇒ Object
(integer): The minimum quantity of XCP to be wagered against, for the bets to match. (Only used in Create)
61 62 63 |
# File 'lib/counterparty/resources.rb', line 61 def counterwager_quantity @counterwager_quantity end |
#deadline ⇒ Object
(integer): The timestamp at which the bet should be decided/settled, in Unix time.
54 55 56 |
# File 'lib/counterparty/resources.rb', line 54 def deadline @deadline end |
#expiration ⇒ Object
(integer): The number of blocks for which the bet should be valid
76 77 78 |
# File 'lib/counterparty/resources.rb', line 76 def expiration @expiration end |
#fee_multiplier ⇒ Object
(integer):
79 80 81 |
# File 'lib/counterparty/resources.rb', line 79 def fee_multiplier @fee_multiplier end |
#feed_address ⇒ Object
(string): The address with the feed that the bet is to be made on
46 47 48 |
# File 'lib/counterparty/resources.rb', line 46 def feed_address @feed_address end |
#leverage ⇒ Object
(integer): Leverage, as a fraction of 5040
73 74 75 |
# File 'lib/counterparty/resources.rb', line 73 def leverage @leverage end |
#odds ⇒ Object
(float):
67 68 69 |
# File 'lib/counterparty/resources.rb', line 67 def odds @odds end |
#source ⇒ Object
(string): The address that made the bet
43 44 45 |
# File 'lib/counterparty/resources.rb', line 43 def source @source end |
#target_value ⇒ Object
(float): Target value for Equal/NotEqual bet
70 71 72 |
# File 'lib/counterparty/resources.rb', line 70 def target_value @target_value end |
#tx_hash ⇒ Object
(string): The transaction hash
37 38 39 |
# File 'lib/counterparty/resources.rb', line 37 def tx_hash @tx_hash end |
#tx_index ⇒ Object
(integer): The transaction index
34 35 36 |
# File 'lib/counterparty/resources.rb', line 34 def tx_index @tx_index end |
#validity ⇒ Object
(string): Set to “valid” if a valid bet. Any other setting signifies an invalid/improper bet
83 84 85 |
# File 'lib/counterparty/resources.rb', line 83 def validity @validity end |
#wager_quantity ⇒ Object
(integer): The quantity of XCP to wager. (Only used in Create)
57 58 59 |
# File 'lib/counterparty/resources.rb', line 57 def wager_quantity @wager_quantity end |
#wager_remaining ⇒ Object
(integer): The quantity of XCP wagered that is remaining to bet on
64 65 66 |
# File 'lib/counterparty/resources.rb', line 64 def wager_remaining @wager_remaining end |