Class: Counterparty::BetMatch

Inherits:
CounterResource show all
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

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_quantityObject

(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

#deadlineObject

(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_multiplierObject

(integer):



156
157
158
# File 'lib/counterparty/resources.rb', line 156

def fee_multiplier
  @fee_multiplier
end

#feed_addressObject

(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_quantityObject

(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_valueObject

(integer):



138
139
140
# File 'lib/counterparty/resources.rb', line 138

def initial_value
  @initial_value
end

#leverageObject

(integer): Leverage, as a fraction of 5040



147
148
149
# File 'lib/counterparty/resources.rb', line 147

def leverage
  @leverage
end

#target_valueObject

(float): Target value for Equal/NotEqual bet



144
145
146
# File 'lib/counterparty/resources.rb', line 144

def target_value
  @target_value
end

#tx0_addressObject

(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_typeObject

(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_indexObject

(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_expirationObject

(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_hashObject

(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_indexObject

(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_addressObject

(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_typeObject

(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_indexObject

(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_expirationObject

(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_hashObject

(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_indexObject

(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

#validityObject

(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