Class: Counterparty::BetMatch
- Inherits:
-
CounterResource
- Object
- CounterResource
- Counterparty::BetMatch
- Defined in:
- lib/counterparty/resources.rb
Overview
An object that describes a specific occurance of two bets being matched (either partially, or fully).
Instance Attribute Summary collapse
-
#backward_quantity ⇒ Object
(integer): The quantity of XCP bet in the matching bet.
-
#deadline ⇒ Object
(integer): The timestamp at which the bet match was made, in Unix time.
-
#fee_multiplier ⇒ Object
(integer):.
-
#feed_address ⇒ Object
(string): The address of the feed that the bets refer to.
-
#forward_quantity ⇒ Object
(integer): The quantity of XCP bet in the initial bet.
-
#initial_value ⇒ Object
(integer):.
-
#leverage ⇒ Object
(integer): Leverage, as a fraction of 5040.
-
#target_value ⇒ Object
(float): Target value for Equal/NotEqual bet.
-
#tx0_address ⇒ Object
(string): The address that issued the initial bet.
-
#tx0_bet_type ⇒ Object
(string): The type of the initial bet (0 for Bullish CFD, 1 for Bearish CFD, 2 for Equal, 3 for Not Equal).
-
#tx0_block_index ⇒ Object
(integer): The Bitcoin block index of the initial bet.
-
#tx0_expiration ⇒ Object
(integer): The number of blocks over which the initial bet was valid.
-
#tx0_hash ⇒ Object
(string): The Bitcoin transaction hash of the initial bet.
-
#tx0_index ⇒ Object
(integer): The Bitcoin transaction index of the initial bet.
-
#tx1_address ⇒ Object
(string): The address that issued the matching bet.
-
#tx1_bet_type ⇒ Object
(string): The type of the counter bet (0 for Bullish CFD, 1 for Bearish CFD, 2 for Equal, 3 for Not Equal).
-
#tx1_block_index ⇒ Object
(integer): The block index of the matching bet.
-
#tx1_expiration ⇒ Object
(integer): The number of blocks over which the matching bet was valid.
-
#tx1_hash ⇒ Object
(string): The transaction hash of the matching bet.
-
#tx1_index ⇒ Object
(integer): The transaction index of the matching (counter) bet.
-
#validity ⇒ Object
(string): Set to “valid” if a valid order match.
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
#backward_quantity ⇒ Object
(integer): The quantity of XCP bet in the matching bet
153 154 155 |
# File 'lib/counterparty/resources.rb', line 153 def backward_quantity @backward_quantity end |
#deadline ⇒ Object
(integer): The timestamp at which the bet match was made, in Unix time.
141 142 143 |
# File 'lib/counterparty/resources.rb', line 141 def deadline @deadline end |
#fee_multiplier ⇒ Object
(integer):
156 157 158 |
# File 'lib/counterparty/resources.rb', line 156 def fee_multiplier @fee_multiplier end |
#feed_address ⇒ Object
(string): The address of the feed that the bets refer to
135 136 137 |
# File 'lib/counterparty/resources.rb', line 135 def feed_address @feed_address end |
#forward_quantity ⇒ Object
(integer): The quantity of XCP bet in the initial bet
150 151 152 |
# File 'lib/counterparty/resources.rb', line 150 def forward_quantity @forward_quantity end |
#initial_value ⇒ Object
(integer):
138 139 140 |
# File 'lib/counterparty/resources.rb', line 138 def initial_value @initial_value end |
#leverage ⇒ Object
(integer): Leverage, as a fraction of 5040
147 148 149 |
# File 'lib/counterparty/resources.rb', line 147 def leverage @leverage end |
#target_value ⇒ Object
(float): Target value for Equal/NotEqual bet
144 145 146 |
# File 'lib/counterparty/resources.rb', line 144 def target_value @target_value end |
#tx0_address ⇒ Object
(string): The address that issued the initial bet
109 110 111 |
# File 'lib/counterparty/resources.rb', line 109 def tx0_address @tx0_address end |
#tx0_bet_type ⇒ Object
(string): The type of the initial bet (0 for Bullish CFD, 1 for Bearish CFD, 2 for Equal, 3 for Not Equal)
113 114 115 |
# File 'lib/counterparty/resources.rb', line 113 def tx0_bet_type @tx0_bet_type end |
#tx0_block_index ⇒ Object
(integer): The Bitcoin block index of the initial bet
103 104 105 |
# File 'lib/counterparty/resources.rb', line 103 def tx0_block_index @tx0_block_index end |
#tx0_expiration ⇒ Object
(integer): The number of blocks over which the initial bet was valid
106 107 108 |
# File 'lib/counterparty/resources.rb', line 106 def tx0_expiration @tx0_expiration end |
#tx0_hash ⇒ Object
(string): The Bitcoin transaction hash of the initial bet
100 101 102 |
# File 'lib/counterparty/resources.rb', line 100 def tx0_hash @tx0_hash end |
#tx0_index ⇒ Object
(integer): The Bitcoin transaction index of the initial bet
97 98 99 |
# File 'lib/counterparty/resources.rb', line 97 def tx0_index @tx0_index end |
#tx1_address ⇒ Object
(string): The address that issued the matching bet
125 126 127 |
# File 'lib/counterparty/resources.rb', line 125 def tx1_address @tx1_address end |
#tx1_bet_type ⇒ Object
(string): The type of the counter bet (0 for Bullish CFD, 1 for Bearish CFD, 2 for Equal, 3 for Not Equal)
132 133 134 |
# File 'lib/counterparty/resources.rb', line 132 def tx1_bet_type @tx1_bet_type end |
#tx1_block_index ⇒ Object
(integer): The block index of the matching bet
122 123 124 |
# File 'lib/counterparty/resources.rb', line 122 def tx1_block_index @tx1_block_index end |
#tx1_expiration ⇒ Object
(integer): The number of blocks over which the matching bet was valid
128 129 130 |
# File 'lib/counterparty/resources.rb', line 128 def tx1_expiration @tx1_expiration end |
#tx1_hash ⇒ Object
(string): The transaction hash of the matching bet
119 120 121 |
# File 'lib/counterparty/resources.rb', line 119 def tx1_hash @tx1_hash end |
#tx1_index ⇒ Object
(integer): The transaction index of the matching (counter) bet
116 117 118 |
# File 'lib/counterparty/resources.rb', line 116 def tx1_index @tx1_index end |
#validity ⇒ Object
(string): Set to “valid” if a valid order match. Any other setting signifies an invalid/improper order match
160 161 162 |
# File 'lib/counterparty/resources.rb', line 160 def validity @validity end |