binancewrapper21 0.1.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 4fd129c48a042f0836b36bd2c287a6c254db997c1cd2d10307e4bc54aa7dd255
4
+ data.tar.gz: a04096e4f636c493c574c4ef07792a28b4b64cbaf8d65b1dfa10646260d9c90a
5
+ SHA512:
6
+ metadata.gz: 96c8412b9c9c014193e20afcf933b2fab4d49c4e26287eab9ecbd342d7df95b1fe67216d841620baf8e5dbe7b9bbc2e8cad67908b933824d6a41ec4e1ea086b3
7
+ data.tar.gz: 4166f6d85b0e90657dd9840705a37e2a5010de11c341ef14be2375c313c603f03d6d8ac8271609b485cf480ae770bf9656fa3840bf77d2212eb6173372e13a3a
checksums.yaml.gz.sig ADDED
Binary file
data.tar.gz.sig ADDED
Binary file
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # file: binancewrapper21.rb
4
+ # description: Experimental Binance wrapper with the intention of
5
+ # trading coins using the API
6
+
7
+ require 'binance'
8
+ require 'dynarex-password'
9
+
10
+
11
+ class BinanceWrapper21
12
+
13
+ def initialize(api_key, secret)
14
+ @client = Binance::Client::REST.new api_key: api_key, secret_key: secret
15
+ end
16
+
17
+ def account_info()
18
+ @client.account_info()
19
+ end
20
+ end
21
+
22
+ class BinanceWrapper21Plus < BinanceWrapper21
23
+
24
+ def initialize(reg, debug: false)
25
+
26
+ @debug = debug
27
+
28
+ key = 'hkey_apps/binance'
29
+ e = reg.get_key(key)
30
+ @lookup_file = e.text('lookup_file').to_s
31
+
32
+ api_key = e.text('apikey').to_s
33
+ secret_key = decipher(e.text('secret').to_s)
34
+
35
+ if @debug then
36
+ puts apikey.inspect
37
+ end
38
+
39
+ super(api_key, secret_key)
40
+
41
+ end
42
+
43
+ private
44
+
45
+ def decipher(s)
46
+ DynarexPassword.new.reverse_lookup(s, @lookup_file)
47
+ end
48
+
49
+ end
50
+
metadata ADDED
@@ -0,0 +1,112 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: binancewrapper21
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - James Robertson
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIEXjCCAsagAwIBAgIBATANBgkqhkiG9w0BAQsFADAsMSowKAYDVQQDDCFnZW1t
14
+ YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMjEwNTAzMTA0ODU0WhcN
15
+ MjIwNTAzMTA0ODU0WjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
16
+ cnRzb24vREM9ZXUwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDAkdwE
17
+ j47XX3avyQS4ExNzLB31D5jzVKkUhpy02RxdnqiFvxKBdeoj0RetXEsTIWunZub7
18
+ u9BUWYRhKMNHU02yp8gTHZcMnRIT09/xsyPqwZ6jpLo4CfIPY23/ghTugyNw4NAb
19
+ A9bNhKO+EdU8srB9jxC9kOmIC6Gh/f2etTLcrH/q5fODy/1MAfMfDO5CBNUHURap
20
+ 3kc6fB1pHnPNftUOXtQ8/6ZWGPgosLbmcgLvrh1pBjsw2ldceI6qvKOSkW5vMFVX
21
+ Oi9wVpiJIx/zcSgbdFVZ1CMnPbhmYG+kjNuG8N57wN5snKV7HchdH0m4b15m40Xm
22
+ EylETZhZgWYCAEIsfZDyw97X1hjQBXh2eL8vz4ySD4zkbEtabjy49JPia6cEDaD1
23
+ XzyjIrNJuN/HcfIwGofEQ9gipnTPKvOxC5Adr6xedrm63oyTEsnrvyjixGeoEZkD
24
+ mTaPc5g8kTdgQ7rw1kfjwwiBk8/+EANtCBuxvQvj5q+FJOhz/Z5IFIc62aMCAwEA
25
+ AaOBijCBhzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUXgPqaB3h
26
+ kVSZaavmkXFBiyqJ6XUwJgYDVR0RBB8wHYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0
27
+ c29uLmV1MCYGA1UdEgQfMB2BG2dlbW1hc3RlckBqYW1lc3JvYmVydHNvbi5ldTAN
28
+ BgkqhkiG9w0BAQsFAAOCAYEAuNma8JdlUDgS/7msndh5cFZkAOsZW8CedOtV0URQ
29
+ TcVKTzWwmeU383oDBGzEwTlpULGh7vohnZF/9oU9S6SM9WAVwadSNO7YatRuZ06V
30
+ BQw8dPsfVRh2zMZrWHzew7ae4saA1awCf1eAiWZiqlg44BeAn+cixIW84XSiuBrp
31
+ enARgJq4zYYDy7MM3wgMk9fDDRrGAsYZY6PdfxsGiznFj7BPQtC3SjSiO7iBq+wL
32
+ w1Ts47V2b4IIh2XH+V6sXcgONFLIIpXktmy+b74WJMy+NQmtE9VZxeCKrAPzJ011
33
+ 5uzUci8BYwKhsMDNmF/JtygpSov59fFJ1kfF8p1M5C8OCwvQcHEm/hdV/HXCHmAV
34
+ FaSKqAK1nLEKAnM7KJSM7SgeKNfwqjQaXD/yDMj/3LjnXEBUPXVgQwd64J35ITkp
35
+ kd375bReypUABcVGz+NK17YtIjLsCxwSPfBXnzCC42tNxUMgvfCN5X7iUG3zegqs
36
+ h7JIdlp5EM3jvjZBVKQQxJ3s
37
+ -----END CERTIFICATE-----
38
+ date: 2021-05-03 00:00:00.000000000 Z
39
+ dependencies:
40
+ - !ruby/object:Gem::Dependency
41
+ name: binance
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 1.2.0
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '1.2'
50
+ type: :runtime
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: 1.2.0
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '1.2'
60
+ - !ruby/object:Gem::Dependency
61
+ name: dynarex-password
62
+ requirement: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: 0.2.0
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '0.2'
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: 0.2.0
77
+ - - "~>"
78
+ - !ruby/object:Gem::Version
79
+ version: '0.2'
80
+ description:
81
+ email: digital.robertson@gmail.com
82
+ executables: []
83
+ extensions: []
84
+ extra_rdoc_files: []
85
+ files:
86
+ - lib/binancewrapper21.rb
87
+ homepage: https://github.com/jrobertson/binancewrapper21
88
+ licenses:
89
+ - MIT
90
+ metadata: {}
91
+ post_install_message:
92
+ rdoc_options: []
93
+ require_paths:
94
+ - lib
95
+ required_ruby_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ requirements: []
106
+ rubyforge_project:
107
+ rubygems_version: 2.7.10
108
+ signing_key:
109
+ specification_version: 4
110
+ summary: Experimental Binance wrapper with the intention of trading coins using the
111
+ API
112
+ test_files: []
metadata.gz.sig ADDED
Binary file