cryptum 0.0.238 → 0.0.241
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +4 -4
- data/build_cryptum_gem.sh +6 -0
- data/cryptum.gemspec +4 -2
- data/lib/cryptum/ui/order_plan.rb +8 -1
- data/lib/cryptum/version.rb +1 -1
- metadata +13 -26
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 717c3733e1f4ce61d75a19abfe540182342e0d0e7d7d0f72fb12b43fb98d20da
         | 
| 4 | 
            +
              data.tar.gz: cb5f5df7186bc6cce6bc576ac3132d438fa2a82cbd155555760250fe4d2d3bcd
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 9c2f76ac6550d0c6890e6bca8e778fab087aff5c7cb80feee5a61812cc702791736bfa43e1e49ba92c1a53c8b38f0fcd47ace98be4001f01334822630f17502b
         | 
| 7 | 
            +
              data.tar.gz: f09dc482be150ad83b89dd531cd9035df36ea041ab3110ff99af1f7bf67c42a7c8b978d661615d04a3e543ef9a5d8a66d9c324e14ccb0752d6a9ba3e7173c631
         | 
    
        data/Gemfile
    CHANGED
    
    | @@ -12,8 +12,8 @@ gemspec | |
| 12 12 | 
             
            # to build appropriately.  Defer to ./reinstall_coinbot_gemset.sh
         | 
| 13 13 | 
             
            # to review these custom flags
         | 
| 14 14 | 
             
            gem 'addressable', '2.8.0'
         | 
| 15 | 
            -
            gem 'bundler', '>=2.3. | 
| 16 | 
            -
            gem 'bundler-audit', '0.9. | 
| 15 | 
            +
            gem 'bundler', '>=2.3.16'
         | 
| 16 | 
            +
            gem 'bundler-audit', '0.9.1'
         | 
| 17 17 | 
             
            gem 'curses', '1.4.4'
         | 
| 18 18 | 
             
            gem 'eventmachine', '1.2.7'
         | 
| 19 19 | 
             
            gem 'faye-websocket', '0.11.1'
         | 
| @@ -25,9 +25,9 @@ gem 'rdoc', '6.4.0' | |
| 25 25 | 
             
            gem 'require_all', '3.0.0'
         | 
| 26 26 | 
             
            gem 'rest-client', '2.1.0'
         | 
| 27 27 | 
             
            gem 'rspec', '3.11.0'
         | 
| 28 | 
            -
            gem 'rubocop', '1. | 
| 28 | 
            +
            gem 'rubocop', '1.30.1'
         | 
| 29 29 | 
             
            gem 'rubocop-rake', '0.6.0'
         | 
| 30 | 
            -
            gem 'rubocop-rspec', '2. | 
| 30 | 
            +
            gem 'rubocop-rspec', '2.11.1'
         | 
| 31 31 | 
             
            gem 'ruby-prof', '1.4.3'
         | 
| 32 32 | 
             
            gem 'rvm', '1.11.3.9'
         | 
| 33 33 | 
             
            gem 'sinatra', '2.2.0'
         | 
    
        data/build_cryptum_gem.sh
    CHANGED
    
    | @@ -38,6 +38,12 @@ if [[ $old_ruby_version == $new_ruby_version ]]; then | |
| 38 38 | 
             
              rvmsudo gem rdoc --rdoc --ri --overwrite -V cryptum
         | 
| 39 39 | 
             
              echo "Invoking bundle-audit Gemfile Scanner..."
         | 
| 40 40 | 
             
              rvmsudo bundle-audit
         | 
| 41 | 
            +
             | 
| 42 | 
            +
              latest_gem=$(ls pkg/*.gem)
         | 
| 43 | 
            +
              if [[ $latest_gem != "" ]]; then
         | 
| 44 | 
            +
                echo "Pushing ${latest_gem} to RubyGems.org..."
         | 
| 45 | 
            +
                rvmsudo gem push $latest_gem --debug
         | 
| 46 | 
            +
              fi
         | 
| 41 47 | 
             
            else
         | 
| 42 48 | 
             
              cd $cryptum_root && ./upgrade_ruby.sh $new_ruby_version $old_ruby_version
         | 
| 43 49 | 
             
            fi
         | 
    
        data/cryptum.gemspec
    CHANGED
    
    | @@ -5,7 +5,10 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | |
| 5 5 | 
             
            require 'cryptum/version'
         | 
| 6 6 |  | 
| 7 7 | 
             
            Gem::Specification.new do |spec|
         | 
| 8 | 
            -
               | 
| 8 | 
            +
              # Switch back when RVM has stable 3.1.2 (i.e. not just preview / p20)
         | 
| 9 | 
            +
              # spec.required_ruby_version = ">= #{File.read('.ruby-version')}"
         | 
| 10 | 
            +
              required_minor_ruby_version = File.read('.ruby-version').split('.')[0..1].join('.')
         | 
| 11 | 
            +
              spec.required_ruby_version = ">= #{required_minor_ruby_version}"
         | 
| 9 12 | 
             
              spec.name = 'cryptum'
         | 
| 10 13 | 
             
              spec.version = Cryptum::VERSION
         | 
| 11 14 | 
             
              spec.authors = ['0day Inc.']
         | 
| @@ -18,7 +21,6 @@ Gem::Specification.new do |spec| | |
| 18 21 |  | 
| 19 22 | 
             
              spec.files = `git ls-files -z`.split("\x0")
         | 
| 20 23 | 
             
              spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
         | 
| 21 | 
            -
              spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
         | 
| 22 24 | 
             
              spec.require_paths = ['lib']
         | 
| 23 25 |  | 
| 24 26 | 
             
              dev_dependency_arr = %i[
         | 
| @@ -99,7 +99,8 @@ module Cryptum | |
| 99 99 | 
             
                      allocation_decimal = 0.0
         | 
| 100 100 | 
             
                      risk_target = fiat_budget * autotrade_cast_as_decimal
         | 
| 101 101 | 
             
                      risk_alloc = risk_target
         | 
| 102 | 
            -
                      while order_plan.map { |op| op[:invest].to_f }.sum < risk_target
         | 
| 102 | 
            +
                      # while order_plan.map { |op| op[:invest].to_f }.sum < risk_target
         | 
| 103 | 
            +
                      loop do
         | 
| 103 104 | 
             
                        # Calculate min order size
         | 
| 104 105 | 
             
                        allocation_decimal += 0.0001
         | 
| 105 106 | 
             
                        fiat_investing = risk_alloc * allocation_decimal
         | 
| @@ -114,6 +115,12 @@ module Cryptum | |
| 114 115 | 
             
                        )
         | 
| 115 116 | 
             
                        profit = fiat_returning - fiat_investing
         | 
| 116 117 |  | 
| 118 | 
            +
                        # Implemented a bugfix here to avoid a bogus single order when Tradeable
         | 
| 119 | 
            +
                        # Balances are low.  Ensure everything still works as expected when
         | 
| 120 | 
            +
                        # balances are higher.
         | 
| 121 | 
            +
                        break if order_plan.map { |op| op[:invest].to_f }.sum > risk_target ||
         | 
| 122 | 
            +
                                 allocation_percent > 100
         | 
| 123 | 
            +
             | 
| 117 124 | 
             
                        order_slice = {}
         | 
| 118 125 | 
             
                        order_slice[:plan_no] = "#{plan_no}.#{plan_no_slice}"
         | 
| 119 126 | 
             
                        order_slice[:fiat_available] = format('%0.2f', fiat_budget)
         | 
    
        data/lib/cryptum/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: cryptum
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.0. | 
| 4 | 
            +
              version: 0.0.241
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - 0day Inc.
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2022- | 
| 11 | 
            +
            date: 2022-06-17 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: addressable
         | 
| @@ -30,28 +30,28 @@ dependencies: | |
| 30 30 | 
             
                requirements:
         | 
| 31 31 | 
             
                - - ">="
         | 
| 32 32 | 
             
                  - !ruby/object:Gem::Version
         | 
| 33 | 
            -
                    version: 2.3. | 
| 33 | 
            +
                    version: 2.3.16
         | 
| 34 34 | 
             
              type: :development
         | 
| 35 35 | 
             
              prerelease: false
         | 
| 36 36 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 37 37 | 
             
                requirements:
         | 
| 38 38 | 
             
                - - ">="
         | 
| 39 39 | 
             
                  - !ruby/object:Gem::Version
         | 
| 40 | 
            -
                    version: 2.3. | 
| 40 | 
            +
                    version: 2.3.16
         | 
| 41 41 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 42 42 | 
             
              name: bundler-audit
         | 
| 43 43 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 44 44 | 
             
                requirements:
         | 
| 45 45 | 
             
                - - '='
         | 
| 46 46 | 
             
                  - !ruby/object:Gem::Version
         | 
| 47 | 
            -
                    version: 0.9. | 
| 47 | 
            +
                    version: 0.9.1
         | 
| 48 48 | 
             
              type: :runtime
         | 
| 49 49 | 
             
              prerelease: false
         | 
| 50 50 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 51 51 | 
             
                requirements:
         | 
| 52 52 | 
             
                - - '='
         | 
| 53 53 | 
             
                  - !ruby/object:Gem::Version
         | 
| 54 | 
            -
                    version: 0.9. | 
| 54 | 
            +
                    version: 0.9.1
         | 
| 55 55 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 56 56 | 
             
              name: curses
         | 
| 57 57 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -212,14 +212,14 @@ dependencies: | |
| 212 212 | 
             
                requirements:
         | 
| 213 213 | 
             
                - - '='
         | 
| 214 214 | 
             
                  - !ruby/object:Gem::Version
         | 
| 215 | 
            -
                    version: 1. | 
| 215 | 
            +
                    version: 1.30.1
         | 
| 216 216 | 
             
              type: :runtime
         | 
| 217 217 | 
             
              prerelease: false
         | 
| 218 218 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 219 219 | 
             
                requirements:
         | 
| 220 220 | 
             
                - - '='
         | 
| 221 221 | 
             
                  - !ruby/object:Gem::Version
         | 
| 222 | 
            -
                    version: 1. | 
| 222 | 
            +
                    version: 1.30.1
         | 
| 223 223 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 224 224 | 
             
              name: rubocop-rake
         | 
| 225 225 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -240,14 +240,14 @@ dependencies: | |
| 240 240 | 
             
                requirements:
         | 
| 241 241 | 
             
                - - '='
         | 
| 242 242 | 
             
                  - !ruby/object:Gem::Version
         | 
| 243 | 
            -
                    version: 2. | 
| 243 | 
            +
                    version: 2.11.1
         | 
| 244 244 | 
             
              type: :runtime
         | 
| 245 245 | 
             
              prerelease: false
         | 
| 246 246 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 247 247 | 
             
                requirements:
         | 
| 248 248 | 
             
                - - '='
         | 
| 249 249 | 
             
                  - !ruby/object:Gem::Version
         | 
| 250 | 
            -
                    version: 2. | 
| 250 | 
            +
                    version: 2.11.1
         | 
| 251 251 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 252 252 | 
             
              name: ruby-prof
         | 
| 253 253 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -445,28 +445,15 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 445 445 | 
             
              requirements:
         | 
| 446 446 | 
             
              - - ">="
         | 
| 447 447 | 
             
                - !ruby/object:Gem::Version
         | 
| 448 | 
            -
                  version: 3.1 | 
| 448 | 
            +
                  version: '3.1'
         | 
| 449 449 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 450 450 | 
             
              requirements:
         | 
| 451 451 | 
             
              - - ">="
         | 
| 452 452 | 
             
                - !ruby/object:Gem::Version
         | 
| 453 453 | 
             
                  version: '0'
         | 
| 454 454 | 
             
            requirements: []
         | 
| 455 | 
            -
            rubygems_version: 3.3. | 
| 455 | 
            +
            rubygems_version: 3.3.16
         | 
| 456 456 | 
             
            signing_key: 
         | 
| 457 457 | 
             
            specification_version: 4
         | 
| 458 458 | 
             
            summary: Coinbase Pro High-Frequency Trading Bot
         | 
| 459 | 
            -
            test_files:
         | 
| 460 | 
            -
            - spec/lib/cryptum/api_spec.rb
         | 
| 461 | 
            -
            - spec/lib/cryptum/event_spec.rb
         | 
| 462 | 
            -
            - spec/lib/cryptum/log_spec.rb
         | 
| 463 | 
            -
            - spec/lib/cryptum/option_spec.rb
         | 
| 464 | 
            -
            - spec/lib/cryptum/order_book/generate_spec.rb
         | 
| 465 | 
            -
            - spec/lib/cryptum/order_book/market_trend_spec.rb
         | 
| 466 | 
            -
            - spec/lib/cryptum/order_book_spec.rb
         | 
| 467 | 
            -
            - spec/lib/cryptum/ui/command_spec.rb
         | 
| 468 | 
            -
            - spec/lib/cryptum/ui/ticker_spec.rb
         | 
| 469 | 
            -
            - spec/lib/cryptum/ui_spec.rb
         | 
| 470 | 
            -
            - spec/lib/cryptum/web_sock_spec.rb
         | 
| 471 | 
            -
            - spec/lib/cryptum_spec.rb
         | 
| 472 | 
            -
            - spec/spec_helper.rb
         | 
| 459 | 
            +
            test_files: []
         |