Class: Counterparty::Bet

Inherits:
CounterResource show all
Defined in:
lib/counterparty/resources.rb

Overview

An object that describes a specific bet.

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

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

(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

#counterwagerObject

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

(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

#deadlineObject

(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

#expirationObject

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

(integer):



63
64
65
# File 'lib/counterparty/resources.rb', line 63

def fee_multiplier
  @fee_multiplier
end

#feed_addressObject

(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

#leverageObject

(integer): Leverage, as a fraction of 5040



57
58
59
# File 'lib/counterparty/resources.rb', line 57

def leverage
  @leverage
end

#oddsObject

(float):



51
52
53
# File 'lib/counterparty/resources.rb', line 51

def odds
  @odds
end

#sourceObject

(string): The address that made the bet



27
28
29
# File 'lib/counterparty/resources.rb', line 27

def source
  @source
end

#target_valueObject

(float): Target value for Equal/NotEqual bet



54
55
56
# File 'lib/counterparty/resources.rb', line 54

def target_value
  @target_value
end

#tx_hashObject

(string): The transaction hash



21
22
23
# File 'lib/counterparty/resources.rb', line 21

def tx_hash
  @tx_hash
end

#tx_indexObject

(integer): The transaction index



18
19
20
# File 'lib/counterparty/resources.rb', line 18

def tx_index
  @tx_index
end

#validityObject

(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

#wagerObject

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

(integer): The quantity of XCP to wager



41
42
43
# File 'lib/counterparty/resources.rb', line 41

def wager_quantity
  @wager_quantity
end

#wager_remainingObject

(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