Sha256: d2060ff9aae5ccc4a5ff50954fc0b14bf96d1eceb8794c9c466a906b9eb233eb
Contents?: true
Size: 1.53 KB
Versions: 30
Compression:
Stored size: 1.53 KB
Contents
# frozen_string_literal: true module Cryptum # This plugin is used to Cancel Open Limit Orders module Event module Cancel # Supported Method Parameters:: # Cryptum::Event::Cancel.open_orders( # ) public_class_method def self.open_orders(opts = {}) option_choice = opts[:option_choice] env = opts[:env] event_history = opts[:event_history] order_type = opts[:order_type] order_action = opts[:order_action] # Consume Latest Order History Justification from # Order Book & cancel orders tagged as pie # event_history = Cryptum::API.cancel_synced_oj_and_oh( # option_choice: option_choice, # env: env, # event_history: event_history, # order_type: order_type, # order_action: order_action # ) # event_history event_history.order_canceled = true event_history.event_notes = "{ \"event_type\": \"#{event_history.event_type}\", \"cancel\": \"#{event_history.order_canceled}\", \"submitted\": \"#{event_history.order_submitted}\" }" if option_choice.proxy Cryptum::API.cancel_all_open_orders( env: env, option_choice: option_choice, order_type: order_type, event_notes: event_history.event_notes ) rescue StandardError => e raise e end # Display Usage for this Module public_class_method def self.help puts "USAGE: event_history = #{self}.crypto() " end end end end
Version data entries
30 entries across 30 versions & 1 rubygems