bitget.rb 0.6.11 → 0.6.12

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4af384320b9667e40d350f08ae6ef30810451bd5410b9a1cdba7ac46a255d43f
4
- data.tar.gz: 52eeba5cab493045410f3c5b41cce0c53a2d4019529fec884be2b02fdce8d8fa
3
+ metadata.gz: f48b434d07adcbdadbbc164fa5cf288dfb3c631366881b23b181cba0edced1c0
4
+ data.tar.gz: 692010947a87ef3987d52448c151706c7616ac324f0d3c631b87b434ddfc549d
5
5
  SHA512:
6
- metadata.gz: 315e369e7e2f18aaf4d4abe239d2ff3db60979edcea28da58bc7c96f785fc64bf69052621f2915b365cc51e021c7ca06bcf2dcc17f2b928e535c3d7bb3cedf51
7
- data.tar.gz: a761bc4bed84bcd5ebcc45a4a2731980c5c2e9f692e69236f47e74d49f49a2b77e1601abe484d3343856406d1a2b793b5b661612dd30b53919cdd95c144a4f93
6
+ metadata.gz: fdbc971a63bbea026274ad9db005a142a8e972fb188f7347c2b186b09fb4692e71fc7258f2f2b1e3e322d2a01e00b84b4c8780ce6829ca6bfbeda00123ac8435
7
+ data.tar.gz: 260b9458d8a9c62b069647c25d1475f4b224b525874c4ab86b60fab289c8087bb70aedf7a95fb5f1768332b508185e6521be5b0c601c53837f4ff8709262ccdc
data/CHANGELOG ADDED
@@ -0,0 +1,256 @@
1
+ # bitget/CHANGELOG
2
+
3
+ ## 20260925
4
+
5
+ 0.6.12: + 'CHANGELOG' to spec.files; ~ CHANGELOG: Rewritten for clarity.
6
+
7
+ 1. ~ bitget.gemspec, bitget.rb.gemspec: + 'CHANGELOG' to spec.files.
8
+ 2. ~ CHANGELOG: Rewritten for clarity.
9
+ 3. ~ Bitget::VERSION: /0.6.11/0.6.12/
10
+
11
+
12
+ ## 20260918
13
+
14
+ 0.6.11: Clean up remaining rename items.
15
+
16
+ 1. ~ bitget.gemspec: /# bitget.rb.gemspec/# bitget.gemspec/
17
+ 2. ~ CHANGELOG: /# bitget.rb/CHANGELOG/# bitget/CHANGELOG/
18
+ 3. ~ README.md: /bitget.rb/bitget/
19
+ 4. ~ Bitget::VERSION: /0.6.10/0.6.11/
20
+
21
+
22
+ ## 20260915
23
+
24
+ 0.6.10: /thoran\/bitget.rb/thoran\/bitget/, the repository renamed.
25
+
26
+ 1. ~ bitget.rb.gemspec and bitget.gemspec: spec.homepage.
27
+ 2. ~ README.md: the fork URL.
28
+ 3. ~ Bitget::VERSION: /0.6.9/0.6.10/
29
+
30
+ 0.6.9: ~ test/gemspec_test.rb: cover both gemspecs, and that they agree.
31
+
32
+ 1. ~ test/gemspec_test.rb: the four examples run over bitget.gemspec as well, the describe naming each, + that each is named what it should be and ships the gemspec naming it. 0.6.8's second gemspec was uncovered, the file naming bitget.rb.gemspec alone.
33
+ 2. + test/gemspec_test.rb: three examples that the two agree — the same files but for the one naming each, the same declared fields, the same dependencies. The second gemspec is worth nothing if the two drift. 4 examples become 15.
34
+ 3. ~ Bitget::VERSION: /0.6.8/0.6.9/
35
+
36
+ 0.6.8: + bitget.gemspec, so that the gem resolves under both names.
37
+
38
+ 1. + bitget.gemspec: bitget.rb.gemspec with /bitget.rb/bitget/ in spec.name and in spec.files.
39
+ 2. ~ Bitget::VERSION: /0.6.7/0.6.8/
40
+
41
+ 0.6.7: ~ bitget.rb.gemspec: Tidy.
42
+
43
+ 1. ~ bitget.rb.gemspec: + the header comment; spec.require_paths moved above spec.files; the globs first among spec.files and the loose files alphabetically after; - the blank line between spec.name and spec.version.
44
+ 2. ~ Bitget::VERSION: /0.6.6/0.6.7/
45
+
46
+
47
+ ## 20260822
48
+
49
+ 0.6.6: + LICENSE, which the gemspec has claimed without one being present.
50
+
51
+ 1. + LICENSE: the MIT text, copyright 2025-2026 thoran. spec.license has named MIT with no licence text in the repository, so the gem shipped a licence nobody could read.
52
+ 2. ~ bitget.rb.gemspec: + 'LICENSE' to spec.files, without which the file sits in the repository and still does not ship.
53
+ 3. + README.md: a License section, saying MIT, last.
54
+ 4. ~ VERSION: /0.6.5/0.6.6/
55
+
56
+
57
+ ## 20260820
58
+
59
+ 0.6.5: + require of Bitget/VERSION from the entry point, so that the library carries its own version.
60
+
61
+ 1. + lib/bitget.rb: require_relative './Bitget/VERSION'. Bitget::VERSION was defined only for whoever required that file directly, which was the gemspec and nothing else, so anything requiring the library alone could not ask the library what version it was. impuri and measurand both require it from their entry point.
62
+ 2. ~ test/VERSION_test.rb and test/gemspec_test.rb: - their own require of ../lib/Bitget/VERSION, which 1 makes unnecessary. They reach the constant through the library now, so they would fail were the require in 1 removed, which is what makes them the test of it.
63
+ 3. ~ Bitget::VERSION: /0.6.4/0.6.5/
64
+
65
+ 0.6.4: Adopt the version and gemspec tests, and unpin the date they caught.
66
+
67
+ 1. + test/VERSION_test.rb: that Bitget::VERSION is a String, that it is three numbers separated by dots, and that it matches the newest entry in the CHANGELOG. The last is the one with teeth — a release which moves the constant and forgets the CHANGELOG, or the reverse, fails here rather than shipping. Modelled on moby's, which is where this pair was settled.
68
+ 2. + test/gemspec_test.rb: that the specification validates, that it pins no date, that its version is Bitget::VERSION rather than a literal, and which runtime dependencies it declares.
69
+ 3. - bitget.rb.gemspec: spec.date, pinned to 2025-05-26. A build sets the date; pinning it means every gem built since has claimed to be from that day. This is what 2 caught on its first run, and putting the line back makes it fail again. month.rb removed the same at its 0.11.1 and impuri at its 0.9.0.
70
+ 4. ~ test/test_all.rb: + the two above.
71
+ 5. ~ Bitget::VERSION: /0.6.3/0.6.4/
72
+
73
+ 0.6.3: The tidy up: the .gitignore, the CHANGELOG's name and form, and the README's code fences.
74
+
75
+ 1. ~ .gitignore: 47 lines, covering gem builds, bundler, RDoc and YARD output, .DS_Store, editor files, the Ruby version managers, test artefacts and .claude. The file existed and was empty, and nothing had since filled it in.
76
+ 2. ~ CHANGELOG.txt --> CHANGELOG, which is how the file is spelt. It is not in spec.files, so nobody installing the gem can tell.
77
+ 3. ~ CHANGELOG: /# 20260820/## 20260820/, and so for every date. A single hash made each date a top level heading, level with the file itself, so every date read as a title rather than as a section within one.
78
+ 4. ~ CHANGELOG: one heading per date. Nine headings covered seven dates, three of them being this release's own predecessors, so a reader counting days got two too many.
79
+ 5. + CHANGELOG: a # CHANGELOG title, and a blank line between each summary line and its first item, both of which the standard form has and this did not.
80
+ 6. ~ README.md: the code fences no longer indent their contents. Markdown ignores the indentation inside a fence, so it showed as leading whitespace in the rendered block.
81
+ 7. ~ Bitget::VERSION: /0.6.2/0.6.3/
82
+
83
+ 0.6.2: + Rakefile, so that this gem is run the way every other one here is.
84
+
85
+ 1. + Rakefile: Rake::TestTask over the suite, with default: :test. There was none, the suite being run by naming test/test_all.rb by hand.
86
+ 2. ~ Bitget::VERSION: /0.6.1/0.6.2/
87
+
88
+ 0.6.1: Two files renamed for case, git having recorded them differently from the filesystem.
89
+
90
+ 1. ~ lib/Bitget/VERSiON.rb --> lib/Bitget/VERSION.rb. The gemspec has required ./lib/Bitget/VERSION since 0.3.1, which resolved here only because the volume is case insensitive. On Linux it names a file which does not exist, so the gemspec could not load and the gem could not be built.
91
+ 2. ~ test/V2/client_test.rb --> test/V2/Client_test.rb. The same fault, and test/test_all.rb requires it by the upper case name.
92
+ 3. ~ Bitget::VERSION: /0.6.0/0.6.1/
93
+
94
+ 0.6.0: + Bitget::Configuration, and logging per client instead of per class.
95
+
96
+ 1. + Bitget::Configuration: api_key, api_secret, api_passphrase, debug and logger, with Bitget.configure, Bitget.configuration and Bitget.reset_configuration!. Settings had been per-client and per-class; they are now declared once and every client built afterwards reads them as its defaults.
97
+ 2. ~ Bitget::V2::Client: logging is per instance. @debug and @logger are taken from the options or from Bitget.configuration, and use_logging? is now !@logger.nil? — logging happens when there is somewhere to log to, so a flag and a logger can no longer disagree. Every setting is read the same way: the credentials are named arguments falling back upon nil, and the rest are given under options: and fall back upon the key being absent, nil being a value a caller may mean for a logger. The host is not among them: it is one value for this API, poloniex.rb and eodhd.rb hold theirs as a constant too, and a setting for it is a lever which can only be pulled wrongly, a signed request carrying the secret to a host nobody meant.
98
+ 3. - Bitget::V2::Client: the class-level log file machinery, being default_log_file_path, log_file_path, log_file and the class logger. Deciding where a log file lives, rotating it and creating its directory are the caller's, and it hands in whatever Logger it likes.
99
+ 4. ~ Bitget::V2::Client#initialize: @logger was assigned through options.key?(:logger ? ... ) rather than options.key?(:logger) ? ... , so the ternary ran inside key? and @logger became false. The line above it, for @debug, has the parentheses right.
100
+ 5. ~ Bitget::V2::Client: log_request, log_response and log_error called self.class.logger, which 3 had removed. They read the instance's logger.
101
+ 6. ~ Bitget::Error: the body is parsed through a method which rescues JSON::ParserError and answers an empty hash. A 418 arrives with an empty body, and an error raised because something already went wrong must not fail to build and report a parsing problem in place of the real one.
102
+ 7. ~ Bitget::Error#error_code and #error_message: fall back to the HTTP code and message where the body carries none, so that an error renders as something rather than as a pair of blanks.
103
+ 8. - lib/Hash/x_www_form_urlencode.rb and lib/Thoran/Hash/XWwwFormUrlencode/x_www_form_urlencode.rb, and the require of the first. http.rb provides Hash#x_www_form_urlencode and this gem declares http.rb as a runtime dependency, so the vendored copies said the same thing twice.
104
+ 9. ~ test/helper.rb: + require 'minitest/mock'. Minitest 5 loaded it by way of minitest/spec and Minitest 6 does not, so every test using a mock errored.
105
+ 10. - test/client_test.rb, and its require from test/test_all.rb. The whole file, 198 lines of it, tested that Bitget::Client delegates to a Bitget::V2::Client held in @v2_client. Bitget::Client has been a subclass of Bitget::V2::Client since 0.1.0 and there has never been a @v2_client anywhere in lib, so the mock was set on nothing, the call ran through to a real request and VCR stopped it. They were written in 0.5.0 and shipped failing in the same commit. Inheritance is not a thing to assert, and the V2 suite already covers the methods against cassettes. Those 47 tests also carried no assertions between them: the run reports 871 either way.
106
+ 11. ~ test/V2/client_test.rb: the logging tests drive an injected Logger.new(StringIO.new) and read its contents, in place of setting a use_logging flag and reading a file the client no longer writes. - the three which tested the log file path, its directory and its rotation, those being no longer the client's to do.
107
+ 12. + test/V2/client_test.rb: that a request string is the scheme, the host, the version prefix and the path, written out rather than built from API_HOST and .path_prefix, which would pass however wrong either was; breaking the host takes the suite to 6 failures and 53 errors. + that the version prefix is /api/v2, that being what makes V2::Client a class of its own.
108
+ 13. + test/Configuration_test.rb: the declared defaults, that a setting exists for everything a client reads, that each credential is supplied and each yields to what is given, that each option is supplied and each yields to what is given, and that nil under options: is taken as a value rather than as an absence.
109
+ 14. + README.md: Configuration and Logging sections. 3 removes the built-in file logger, so the replacement is documented in the release which removes it: Logger.new(path, 'daily'' rotates by itself and wants only a FileUtils.mkdir_p first, which is the whole of what the client used to do for you.
110
+ 15. ~ Bitget::VERSION: /0.5.0/0.6.0/
111
+
112
+
113
+ ## 20250526
114
+
115
+ 0.5.0: Implement all remaining spot endpoints and fix authenticated POST requests.
116
+
117
+ 1. ~ Bitget::V2::Client#log_request: + headers: argument
118
+ 2. ~ Bitget::V2::Client#do_request: Removed nil values (Double-check this isn't being done elsehwere.)
119
+ 3. ~ Bitget::V2::Client#do_request: Sorted arguments as per Bitget API requirements.
120
+ 4. ~ Bitget::V2::Client#do_request: + @use_logging
121
+ 5. ~ Bitget::V2::Client#do_request: + headers to call to log_request
122
+ 6. ~ Bitget::V2::Client#do_request: @timestamp = nil, so that the client instance may be able to be re-used.
123
+ Added the following 'Market' methods:
124
+ 7. + Bitget::V2::Client#spot_public_symbols
125
+ 8. + Bitget::V2::Client#spot_market_vip_fee_rate
126
+ 9. + Bitget::V2::Client#spot_market_tickers
127
+ 10. + Bitget::V2::Client#spot_market_merge_depth
128
+ 11. + Bitget::V2::Client#spot_market_orderbook
129
+ 12. + Bitget::V2::Client#spot_market_candles
130
+ 13. + Bitget::V2::Client#spot_market_history_candles
131
+ 14. + Bitget::V2::Client#spot_market_fills
132
+ 15. + Bitget::V2::Client#spot_market_fills_history
133
+ Added the following 'Trade' methods:
134
+ 16. + Bitget::V2::Client#spot_trade_place_order
135
+ 16. + Bitget::V2::Client#spot_trade_cancel_replace_order
136
+ 17. + Bitget::V2::Client#spot_trade_batch_cancel_replace_order
137
+ 18. + Bitget::V2::Client#spot_trade_cancel_order
138
+ 19. + Bitget::V2::Client#spot_trade_batch_orders
139
+ 20. + Bitget::V2::Client#spot_trade_batch_cancel_order
140
+ 21. + Bitget::V2::Client#spot_trade_cancel_symbol_order
141
+ 22. + Bitget::V2::Client#spot_trade_order_info
142
+ 23. + Bitget::V2::Client#spot_trade_unfilled_orders
143
+ 24. + Bitget::V2::Client#spot_trade_history_orders
144
+ 25. + Bitget::V2::Client#spot_trade_fills
145
+ 26. + Bitget::V2::Client#spot_trade_place_plan_order
146
+ 27. + Bitget::V2::Client#spot_trade_modify_plan_order
147
+ 28. + Bitget::V2::Client#spot_trade_cancel_plan_order
148
+ 29. + Bitget::V2::Client#spot_trade_current_plan_order
149
+ 30. + Bitget::V2::Client#spot_trade_plan_sub_order
150
+ 31. + Bitget::V2::Client#spot_trade_history_plan_order
151
+ 32. + Bitget::V2::Client#spot_trade_batch_cancel_plan_order
152
+ Added the following 'Account' methods:
153
+ 33. + Bitget::V2::Client#spot_account_subaccount_assets
154
+ 34. + Bitget::V2::Client#spot_account_bills
155
+ 35. + Bitget::V2::Client#spot_account_sub_main_trans_record
156
+ 36. + Bitget::V2::Client#spot_account_transfer_records
157
+ 37. + Bitget::V2::Client#spot_account_switch_deduct
158
+ 38. + Bitget::V2::Client#spot_account_deduct_info
159
+ Added the following 'Wallet' methods:
160
+ 39. + Bitget::V2::Client#spot_wallet_modify_deposit_account
161
+ 40. + Bitget::V2::Client#spot_wallet_transfer
162
+ 41. + Bitget::V2::Client#spot_wallet_transfer_coin_info
163
+ 42. + Bitget::V2::Client#spot_wallet_subaccount_transfer
164
+ 43. + Bitget::V2::Client#spot_wallet_withdrawal
165
+ 44. + Bitget::V2::Client#spot_wallet_deposit_address
166
+ 45. + Bitget::V2::Client#spot_wallet_subaccount_deposit_address
167
+ 46. + Bitget::V2::Client#spot_wallet_cancel_withdrawal
168
+ 47. + Bitget::V2::Client#spot_wallet_subaccount_deposit_records
169
+ 48. + Bitget::V2::Client#spot_wallet_withdrawal_records
170
+ 49. + Bitget::V2::Client#spot_wallet_deposit_records
171
+ 50. ~ Bitget::V2::Client: + attr_accessors for API keys/secrets
172
+ 51. + Bitget::V2::Client#log_response
173
+ 52. ~ Bitget::V2::Client#handle_response: Use log_response().
174
+ 53. ~ Bitget::V2::Client: + @use_logging to be able to turn logging on and off.
175
+ 54. - lib/Hash/to_parameter_string.rb. Just use lib/Hash/x_www_form_urlencode.
176
+ 55. ~ Bitget::V2::Client#message: /to_parameter_string/x_www_form_urlencode/
177
+ 56. ~ test/lib/V2/client_test.rb: Test all spot endpoints, error handling, and logging.
178
+ 57. ~ Bitget::V2::Client: Document all endpoint methods with YARD format comments roughly in the form:
179
+ # Method Name
180
+ # HTTP_METHOD /api/v2/path
181
+ #
182
+ # Rate Limit: X times/Ys
183
+ # Note: Description
184
+ #
185
+ # @param name [Type] Required/Optional. Description
186
+ # @return [Type] Response containing:
187
+ # - field [Type] Description
188
+
189
+
190
+ ## 20250516
191
+
192
+ 0.4.0: Implement the first couple of private endpoints and fix authentication.
193
+
194
+ 1. + Bitget::V2::Client#spot_account_info
195
+ 2. + Bitget::V2::Client#spot_account_assets
196
+ 3. ~ Bitget::V2::Client#message: There were 3 possible paths depending on the verb, not 2.
197
+ 4. ~ Bitget::V2::Client#signature: The all-in-one method wasn't working.
198
+ 5. ~ Bitget::V2::Client#headers: + 'X-CHANNEL-API-CODE' => 'spot'
199
+ 6. ~ Bitget::V2::Client#do_request: + @timestamp = nil, so the client can be reused for subsequent requests.
200
+ 7. ~ test/helper.rb: Use VCR's built-in filters to remove senstive data.
201
+
202
+
203
+ ## 20250402
204
+
205
+ 0.3.1: Fix missing libraries.
206
+
207
+ 1. + lib/Thoran/Hash/XWwwFormUrlEncode/x_www_form_urlencode.rb
208
+ 2. + lib/Thoran/String/UrlEncode/url_encode.rb
209
+ 3. ~ lib/String/url_encode.rb: 0.2.1 --> 0.3.0
210
+ 4. ~ Bitget::V2::Client: + require 'fileutils'
211
+ 5. ~ Bitget::V2::Client: + require_relative '../../Hash/to_parameter_string'
212
+ 6. + Bitget::VERSION
213
+ 7. ~ bitget.rb.gemspec: Use Bitget::VERSION
214
+ 8. + test/test_all.rb
215
+
216
+
217
+ ## 20250329
218
+
219
+ 0.3.0: + bitget.rb.gemspec, README.md
220
+
221
+ 1. + bitget.rb.gemspec
222
+ 2. + README.md
223
+ ## 20250326, 29
224
+
225
+ 0.2.0: Add a separate response handler with logging and error handling.
226
+
227
+ 1. + Bitget::V2::Client#handle_request
228
+ 2. + Bitget::V2::Client#do_request: Defer parsing the JSON to handle_request().
229
+ 3. ~ Bitget::V2::Client#spot_public_coins: Use handle_request().
230
+ 4. + Bitget::Error
231
+ 5. ~ Bitget::V2::Client: + class methods for logging (log_file_path, default_log_file_path, log_file_path, log_file, logger)
232
+ 6. ~ Bitget::V2::Client: + instance methods for logging (log_args?, log_request, log_error)
233
+
234
+
235
+ ## 20250326
236
+
237
+ 0.1.1: Add missing tests for supplying an argument to the coins endpoint.
238
+
239
+ 1. ~ test/client_test.rb
240
+ 2. ~ test/v2/client_test.rb
241
+
242
+
243
+ ## 20250323
244
+
245
+ 0.1.0: Create directory structure and testing.
246
+
247
+ 1. + lib/Bitget/V2/Client.rb
248
+ 2. + lib/Bitget/Client.rb
249
+ 3. + lib/bitget.rb
250
+ 4. + Gemfile
251
+ 5. + test/*
252
+ ## 20250207, 08, 09
253
+
254
+ 0.0.0: Introduce V2 endpoints.
255
+
256
+ 1. + CoinMarketCap::V2::Client
data/bitget.rb.gemspec CHANGED
@@ -22,6 +22,7 @@ Gem::Specification.new do |spec|
22
22
  'bitget.rb.gemspec',
23
23
  Dir['lib/**/*.rb'],
24
24
  Dir['test/**/*.rb'],
25
+ 'CHANGELOG',
25
26
  'Gemfile',
26
27
  'LICENSE',
27
28
  'README.md',
@@ -2,5 +2,5 @@
2
2
  # Bitget::VERSION
3
3
 
4
4
  module Bitget
5
- VERSION = '0.6.11'
5
+ VERSION = '0.6.12'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bitget.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.11
4
+ version: 0.6.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - thoran
@@ -29,6 +29,7 @@ executables: []
29
29
  extensions: []
30
30
  extra_rdoc_files: []
31
31
  files:
32
+ - CHANGELOG
32
33
  - Gemfile
33
34
  - LICENSE
34
35
  - README.md
@@ -65,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
66
  - !ruby/object:Gem::Version
66
67
  version: '0'
67
68
  requirements: []
68
- rubygems_version: 4.0.20
69
+ rubygems_version: 4.0.21
69
70
  specification_version: 4
70
71
  summary: Access the Bitget API with Ruby.
71
72
  test_files: []