Class: TridentAssistant::CLI::Order
- Inherits:
-
Base
- Object
- Thor
- Base
- TridentAssistant::CLI::Order
show all
- Defined in:
- lib/trident_assistant/cli/order.rb
Overview
CLI to transfer to Trident MTG
Constant Summary
collapse
- EXCHANGE_ASSET_ID =
"965e5c6e-434c-3fa9-b780-c50f43cd955c"
- MINIMUM_AMOUNT =
0.000_000_01
Constants inherited
from Base
Base::UI
Instance Attribute Summary
Attributes inherited from Base
#api, #bot, #client, #keystore
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#ask(collection, token) ⇒ Object
41
42
43
44
|
# File 'lib/trident_assistant/cli/order.rb', line 41
def ask(collection, token)
log api.ask_order collection, token, asset_id: options[:asset], price: options[:price],
expire_at: options[:expiration]
end
|
#auction(collection, token) ⇒ Object
52
53
54
55
|
# File 'lib/trident_assistant/cli/order.rb', line 52
def auction(collection, token)
log api.auction_order collection, token, asset_id: options[:asset], price: options[:price],
reserve_price: options[:reserve_price], expire_at: options[:expiration]
end
|
#bid(collection, token) ⇒ Object
62
63
64
65
|
# File 'lib/trident_assistant/cli/order.rb', line 62
def bid(collection, token)
log api.bid_order collection, token, asset_id: options[:asset], price: options[:price],
expire_at: options[:expiration]
end
|
#cancel(id) ⇒ Object
75
76
77
|
# File 'lib/trident_assistant/cli/order.rb', line 75
def cancel(id)
log api.cancel_order id
end
|
#fill(id) ⇒ Object
69
70
71
|
# File 'lib/trident_assistant/cli/order.rb', line 69
def fill(id)
log api.fill_order id
end
|
#index ⇒ Object
20
21
22
23
24
25
26
27
28
|
# File 'lib/trident_assistant/cli/order.rb', line 20
def index
log api.orders(
collection_id: options[:collection],
metahash: options[:metahash],
state: options[:state],
type: options[:type],
page: options[:page]
)
end
|
#show(id) ⇒ Object
32
33
34
|
# File 'lib/trident_assistant/cli/order.rb', line 32
def show(id)
log api.order id
end
|