bitget.rb 0.9.0 → 0.9.2

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.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +18 -0
  3. data/README.md +3 -0
  4. data/bitget.rb.gemspec +1 -1
  5. data/lib/Bitget/V2/Client.rb +6 -1
  6. data/lib/Bitget/VERSION.rb +1 -1
  7. data/test/V2/Client_test.rb +12 -0
  8. data/test/fixtures/vcr_cassettes/v2/spot/account/assets-when_an_error_occurs.yml +69 -0
  9. data/test/fixtures/vcr_cassettes/v2/spot/account/assets.yml +69 -0
  10. data/test/fixtures/vcr_cassettes/v2/spot/account/bills-when_an_error_occurs.yml +63 -0
  11. data/test/fixtures/vcr_cassettes/v2/spot/account/bills.yml +69 -0
  12. data/test/fixtures/vcr_cassettes/v2/spot/account/bleradaf-info.yml +67 -0
  13. data/test/fixtures/vcr_cassettes/v2/spot/account/deduct-info-when_an_error_occurs.yml +63 -0
  14. data/test/fixtures/vcr_cassettes/v2/spot/account/deduct-info.yml +67 -0
  15. data/test/fixtures/vcr_cassettes/v2/spot/account/info-when_an_error_occurs.yml +67 -0
  16. data/test/fixtures/vcr_cassettes/v2/spot/account/info.yml +67 -0
  17. data/test/fixtures/vcr_cassettes/v2/spot/account/sub-main-trans-record-when_an_error_occurs.yml +67 -0
  18. data/test/fixtures/vcr_cassettes/v2/spot/account/sub-main-trans-record.yml +67 -0
  19. data/test/fixtures/vcr_cassettes/v2/spot/account/subaccount-assets-when_an_error_occurs.yml +67 -0
  20. data/test/fixtures/vcr_cassettes/v2/spot/account/subaccount-assets.yml +102 -0
  21. data/test/fixtures/vcr_cassettes/v2/spot/account/switch-deduct-when_an_error_occurs.yml +63 -0
  22. data/test/fixtures/vcr_cassettes/v2/spot/account/switch-deduct.yml +69 -0
  23. data/test/fixtures/vcr_cassettes/v2/spot/account/transferRecords-when_an_error_occurs.yml +63 -0
  24. data/test/fixtures/vcr_cassettes/v2/spot/account/transferRecords.yml +63 -0
  25. data/test/fixtures/vcr_cassettes/v2/spot/market/candles-when_an_error_occurs.yml +63 -0
  26. data/test/fixtures/vcr_cassettes/v2/spot/market/candles.yml +69 -0
  27. data/test/fixtures/vcr_cassettes/v2/spot/market/fills-history-when_an_error_occurs.yml +63 -0
  28. data/test/fixtures/vcr_cassettes/v2/spot/market/fills-history.yml +69 -0
  29. data/test/fixtures/vcr_cassettes/v2/spot/market/fills-when_an_error_occurs.yml +63 -0
  30. data/test/fixtures/vcr_cassettes/v2/spot/market/fills.yml +69 -0
  31. data/test/fixtures/vcr_cassettes/v2/spot/market/history-candles-when_an_error_occurs.yml +63 -0
  32. data/test/fixtures/vcr_cassettes/v2/spot/market/history-candles.yml +69 -0
  33. data/test/fixtures/vcr_cassettes/v2/spot/market/merge-depth-when_an_error_occurs.yml +63 -0
  34. data/test/fixtures/vcr_cassettes/v2/spot/market/merge-depth.yml +69 -0
  35. data/test/fixtures/vcr_cassettes/v2/spot/market/orderbook-when_an_error_occurs.yml +63 -0
  36. data/test/fixtures/vcr_cassettes/v2/spot/market/orderbook.yml +69 -0
  37. data/test/fixtures/vcr_cassettes/v2/spot/market/tickers-when_an_error_occurs.yml +69 -0
  38. data/test/fixtures/vcr_cassettes/v2/spot/market/tickers-when_symbol_is_not_supplied.yml +69 -0
  39. data/test/fixtures/vcr_cassettes/v2/spot/market/tickers-when_symbol_is_supplied.yml +67 -0
  40. data/test/fixtures/vcr_cassettes/v2/spot/market/vip-fee-rate-when_an_error_occurs.yml +69 -0
  41. data/test/fixtures/vcr_cassettes/v2/spot/market/vip-fee-rate.yml +69 -0
  42. data/test/fixtures/vcr_cassettes/v2/spot/public/coins-when_an_error_occurs.yml +69 -0
  43. data/test/fixtures/vcr_cassettes/v2/spot/public/coins-when_coin_is_not_supplied.yml +69 -0
  44. data/test/fixtures/vcr_cassettes/v2/spot/public/coins-when_coin_is_supplied.yml +69 -0
  45. data/test/fixtures/vcr_cassettes/v2/spot/public/coins-when_error_occurs.yml +64 -0
  46. data/test/fixtures/vcr_cassettes/v2/spot/public/symbols-when_an_error_occurs.yml +69 -0
  47. data/test/fixtures/vcr_cassettes/v2/spot/public/symbols-when_symbol_is_not_supplied.yml +69 -0
  48. data/test/fixtures/vcr_cassettes/v2/spot/public/symbols-when_symbol_is_supplied.yml +67 -0
  49. data/test/fixtures/vcr_cassettes/v2/spot/trade/batch-cancel-order-when_an_error_occurs.yml +63 -0
  50. data/test/fixtures/vcr_cassettes/v2/spot/trade/batch-cancel-order.yml +84 -0
  51. data/test/fixtures/vcr_cassettes/v2/spot/trade/batch-cancel-plan-order-when_an_error_occurs.yml +67 -0
  52. data/test/fixtures/vcr_cassettes/v2/spot/trade/batch-cancel-plan-order.yml +67 -0
  53. data/test/fixtures/vcr_cassettes/v2/spot/trade/batch-cancel-replace-order-when_an_error_occurs.yml +63 -0
  54. data/test/fixtures/vcr_cassettes/v2/spot/trade/batch-cancel-replace-order.yml +63 -0
  55. data/test/fixtures/vcr_cassettes/v2/spot/trade/batch-orders-when_an_error_occurs.yml +63 -0
  56. data/test/fixtures/vcr_cassettes/v2/spot/trade/batch-orders.yml +67 -0
  57. data/test/fixtures/vcr_cassettes/v2/spot/trade/cancel-order-when_an_error_occurs.yml +63 -0
  58. data/test/fixtures/vcr_cassettes/v2/spot/trade/cancel-order.yml +73 -0
  59. data/test/fixtures/vcr_cassettes/v2/spot/trade/cancel-plan-order-when_an_error_occurs.yml +63 -0
  60. data/test/fixtures/vcr_cassettes/v2/spot/trade/cancel-plan-order.yml +72 -0
  61. data/test/fixtures/vcr_cassettes/v2/spot/trade/cancel-replace-order-when_an_error_occurs.yml +63 -0
  62. data/test/fixtures/vcr_cassettes/v2/spot/trade/cancel-replace-order.yml +68 -0
  63. data/test/fixtures/vcr_cassettes/v2/spot/trade/cancel-symbol-order-when_an_error_occurs.yml +63 -0
  64. data/test/fixtures/vcr_cassettes/v2/spot/trade/cancel-symbol-order.yml +67 -0
  65. data/test/fixtures/vcr_cassettes/v2/spot/trade/current-plan-order-when_an_error_occurs.yml +63 -0
  66. data/test/fixtures/vcr_cassettes/v2/spot/trade/current-plan-order.yml +67 -0
  67. data/test/fixtures/vcr_cassettes/v2/spot/trade/fills-when_an_error_occurs.yml +63 -0
  68. data/test/fixtures/vcr_cassettes/v2/spot/trade/fills.yml +95 -0
  69. data/test/fixtures/vcr_cassettes/v2/spot/trade/history-orders-when_an_error_occurs.yml +63 -0
  70. data/test/fixtures/vcr_cassettes/v2/spot/trade/history-orders.yml +97 -0
  71. data/test/fixtures/vcr_cassettes/v2/spot/trade/history-plan-order-when_an_error_occurs.yml +63 -0
  72. data/test/fixtures/vcr_cassettes/v2/spot/trade/history-plan-order.yml +63 -0
  73. data/test/fixtures/vcr_cassettes/v2/spot/trade/modify-plan-order-when_an_error_occurs.yml +63 -0
  74. data/test/fixtures/vcr_cassettes/v2/spot/trade/modify-plan-order.yml +63 -0
  75. data/test/fixtures/vcr_cassettes/v2/spot/trade/orderInfo-when_an_error_occurs.yml +61 -0
  76. data/test/fixtures/vcr_cassettes/v2/spot/trade/orderInfo.yml +61 -0
  77. data/test/fixtures/vcr_cassettes/v2/spot/trade/place-order-when_an_error_occurs.yml +63 -0
  78. data/test/fixtures/vcr_cassettes/v2/spot/trade/place-order.yml +67 -0
  79. data/test/fixtures/vcr_cassettes/v2/spot/trade/place-plan-order-when_an_error_occurs.yml +63 -0
  80. data/test/fixtures/vcr_cassettes/v2/spot/trade/place-plan-order.yml +67 -0
  81. data/test/fixtures/vcr_cassettes/v2/spot/trade/plan-sub-order-when_an_error_occurs.yml +63 -0
  82. data/test/fixtures/vcr_cassettes/v2/spot/trade/plan-sub-order.yml +75 -0
  83. data/test/fixtures/vcr_cassettes/v2/spot/trade/unfilled-orders-when_an_error_occurs.yml +63 -0
  84. data/test/fixtures/vcr_cassettes/v2/spot/trade/unfilled-orders.yml +97 -0
  85. data/test/fixtures/vcr_cassettes/v2/spot/wallet/cancel-withdrawal-when_an_error_occurs.yml +63 -0
  86. data/test/fixtures/vcr_cassettes/v2/spot/wallet/cancel-withdrawal.yml +63 -0
  87. data/test/fixtures/vcr_cassettes/v2/spot/wallet/deposit-address-when_an_error_occurs.yml +63 -0
  88. data/test/fixtures/vcr_cassettes/v2/spot/wallet/deposit-address.yml +67 -0
  89. data/test/fixtures/vcr_cassettes/v2/spot/wallet/deposit-records-when_an_error_occurs.yml +63 -0
  90. data/test/fixtures/vcr_cassettes/v2/spot/wallet/deposit-records.yml +63 -0
  91. data/test/fixtures/vcr_cassettes/v2/spot/wallet/modify-deposit-account-when_an_error_occurs.yml +63 -0
  92. data/test/fixtures/vcr_cassettes/v2/spot/wallet/modify-deposit-account.yml +63 -0
  93. data/test/fixtures/vcr_cassettes/v2/spot/wallet/subaccount-deposit-address-when_an_error_occurs.yml +63 -0
  94. data/test/fixtures/vcr_cassettes/v2/spot/wallet/subaccount-deposit-address.yml +63 -0
  95. data/test/fixtures/vcr_cassettes/v2/spot/wallet/subaccount-deposit-records-when_an_error_occurs.yml +63 -0
  96. data/test/fixtures/vcr_cassettes/v2/spot/wallet/subaccount-deposit-records.yml +63 -0
  97. data/test/fixtures/vcr_cassettes/v2/spot/wallet/subaccount-transfer-when_an_error_occurs.yml +63 -0
  98. data/test/fixtures/vcr_cassettes/v2/spot/wallet/subaccount-transfer.yml +63 -0
  99. data/test/fixtures/vcr_cassettes/v2/spot/wallet/transfer-coin-info-when_an_error_occurs.yml +63 -0
  100. data/test/fixtures/vcr_cassettes/v2/spot/wallet/transfer-coin-info.yml +69 -0
  101. data/test/fixtures/vcr_cassettes/v2/spot/wallet/transfer-when_an_error_occurs.yml +63 -0
  102. data/test/fixtures/vcr_cassettes/v2/spot/wallet/transfer.yml +63 -0
  103. data/test/fixtures/vcr_cassettes/v2/spot/wallet/withdrawal-records-when_an_error_occurs.yml +63 -0
  104. data/test/fixtures/vcr_cassettes/v2/spot/wallet/withdrawal-records.yml +67 -0
  105. data/test/fixtures/vcr_cassettes/v2/spot/wallet/withdrawal-when_an_error_occurs.yml +63 -0
  106. data/test/fixtures/vcr_cassettes/v2/spot/wallet/withdrawal.yml +73 -0
  107. data/test/gemspec_test.rb +4 -0
  108. metadata +100 -1
@@ -0,0 +1,73 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.bitget.com/api/v2/spot/trade/cancel-order
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"symbol":"BTCUSDT"}'
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ Access-Key:
17
+ - "<API_KEY>"
18
+ Access-Sign:
19
+ - lu1IULBmrFEkv+W5pfLmjDzOgWGwiTC7wIRuWZIRFFc=
20
+ Access-Timestamp:
21
+ - '1747574750777'
22
+ Access-Passphrase:
23
+ - "<API_PASSPHRASE>"
24
+ Content-Type:
25
+ - application/json
26
+ X-Channel-Api-Code:
27
+ - spot
28
+ response:
29
+ status:
30
+ code: 200
31
+ message: OK
32
+ headers:
33
+ Date:
34
+ - Sun, 18 May 2025 13:25:52 GMT
35
+ Content-Type:
36
+ - application/json
37
+ Content-Length:
38
+ - '80'
39
+ Connection:
40
+ - keep-alive
41
+ X-Mbx-Used-Remain-Limit:
42
+ - '19'
43
+ Access-Control-Allow-Origin:
44
+ - "*"
45
+ Access-Control-Allow-Methods:
46
+ - GET, POST, OPTIONS
47
+ Cf-Cache-Status:
48
+ - DYNAMIC
49
+ Set-Cookie:
50
+ - __cf_bm=ySszKN_PDl24BEaQu9rpcnFNNbibENn9z4PUWRTWglo-1747574752-1.0.1.1-Bz8HruE9EYu6ZgCnQG_OanPlnLwGurg40z2HM0CxhvfuG4d1PbBXUW5cEa8TALljevYjfl6YzBbHXCkbXmJhYEsZ221z9.YV5iKRBzV.tPQ;
51
+ path=/; expires=Sun, 18-May-25 13:55:52 GMT; domain=.api.bitget.com; HttpOnly;
52
+ Secure; SameSite=None
53
+ X-Frame-Options:
54
+ - SAMEORIGIN
55
+ Server:
56
+ - cloudflare
57
+ Cf-Ray:
58
+ - 941baed7fa02d8ed-FRA
59
+ body:
60
+ encoding: ASCII-8BIT
61
+ string: '
62
+ {
63
+ "code": "00000",
64
+ "message": "success",
65
+ "requestTime": 1234567891234,
66
+ "data": {
67
+ "orderId": "121211212122",
68
+ "clientOid": "xx001"
69
+ }
70
+ }
71
+ '
72
+ recorded_at: Sun, 18 May 2025 13:25:52 GMT
73
+ recorded_with: VCR 6.3.1
@@ -0,0 +1,63 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.bitget.com/api/v2/spot/trade/cancel-plan-order
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"orderId":"INVALID"}'
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ Access-Key:
17
+ - "<API_KEY>"
18
+ Access-Sign:
19
+ - 9MDL3NQ4wOhY7cJLHYIzhrRpWF0PfJn2AtWfafOiknY=
20
+ Access-Timestamp:
21
+ - '1747574840752'
22
+ Access-Passphrase:
23
+ - "<API_PASSPHRASE>"
24
+ Content-Type:
25
+ - application/json
26
+ X-Channel-Api-Code:
27
+ - spot
28
+ response:
29
+ status:
30
+ code: 418
31
+ message: I'm a teapot
32
+ headers:
33
+ Date:
34
+ - Sun, 18 May 2025 13:27:22 GMT
35
+ Content-Type:
36
+ - application/json
37
+ Content-Length:
38
+ - '101'
39
+ Connection:
40
+ - keep-alive
41
+ X-Mbx-Used-Remain-Limit:
42
+ - '9'
43
+ Access-Control-Allow-Origin:
44
+ - "*"
45
+ Access-Control-Allow-Methods:
46
+ - GET, POST, OPTIONS
47
+ Cf-Cache-Status:
48
+ - DYNAMIC
49
+ Set-Cookie:
50
+ - __cf_bm=CamYeLToSb2cLCl1KppcGN8op5RhpYFfp72JNOcwl9A-1747574842-1.0.1.1-ALu5C2Wcx4i4ilLDo4seXPf5qXw90QbyRFnWWfqQYK8XiBKO1wc8jcqBAyH9E4pYSJTSTAzpPE.uSlM.b7h54k8CbjgedlgjOQbnR3pXwb4;
51
+ path=/; expires=Sun, 18-May-25 13:57:22 GMT; domain=.api.bitget.com; HttpOnly;
52
+ Secure; SameSite=None
53
+ X-Frame-Options:
54
+ - SAMEORIGIN
55
+ Server:
56
+ - cloudflare
57
+ Cf-Ray:
58
+ - 941bb10a7a180e94-AMS
59
+ body:
60
+ encoding: UTF-8
61
+ string: ''
62
+ recorded_at: Sun, 18 May 2025 13:27:22 GMT
63
+ recorded_with: VCR 6.3.1
@@ -0,0 +1,72 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.bitget.com/api/v2/spot/trade/cancel-plan-order
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"orderId":"123456"}'
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ Access-Key:
17
+ - "<API_KEY>"
18
+ Access-Sign:
19
+ - "+axe7cGNXbteAs6K52icezZxtxI9kMZB3aY4Z91wHdY="
20
+ Access-Timestamp:
21
+ - '1747754397422'
22
+ Access-Passphrase:
23
+ - "<API_PASSPHRASE>"
24
+ Content-Type:
25
+ - application/json
26
+ X-Channel-Api-Code:
27
+ - spot
28
+ response:
29
+ status:
30
+ code: 200
31
+ message: OK
32
+ headers:
33
+ Date:
34
+ - Tue, 20 May 2025 15:20:00 GMT
35
+ Content-Type:
36
+ - application/json
37
+ Content-Length:
38
+ - '90'
39
+ Connection:
40
+ - keep-alive
41
+ X-Mbx-Used-Remain-Limit:
42
+ - '9'
43
+ Access-Control-Allow-Origin:
44
+ - "*"
45
+ Access-Control-Allow-Methods:
46
+ - GET, POST, OPTIONS
47
+ Cf-Cache-Status:
48
+ - DYNAMIC
49
+ Set-Cookie:
50
+ - __cf_bm=NOsTuzMihdexKsyesfAcCw8rs712q1EYKs.tNbK7fJc-1747754400-1.0.1.1-H7CxgiVSzSFnIr3oznwa8XRJk7zO1a16J8GRJh398lZRJwIclyUCJ9Tix9BZrmXU0B6cCJsdKa70CfnIsKyh3ztloMuixNIFI4FJRKKw3yA;
51
+ path=/; expires=Tue, 20-May-25 15:50:00 GMT; domain=.api.bitget.com; HttpOnly;
52
+ Secure; SameSite=None
53
+ X-Frame-Options:
54
+ - SAMEORIGIN
55
+ Server:
56
+ - cloudflare
57
+ Cf-Ray:
58
+ - 942cd0cb0d64668d-AMS
59
+ body:
60
+ encoding: UTF-8
61
+ string: '
62
+ {
63
+ "code": "00000",
64
+ "msg": "success",
65
+ "requestTime": 1668134497496,
66
+ "data": {
67
+ "result":"success"
68
+ }
69
+ }
70
+ '
71
+ recorded_at: Tue, 20 May 2025 15:19:59 GMT
72
+ recorded_with: VCR 6.3.1
@@ -0,0 +1,63 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.bitget.com/api/v2/spot/trade/cancel-replace-order
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{orderList:[{"symbol":"INVALID"}]}'
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ Access-Key:
17
+ - "<API_KEY>"
18
+ Access-Sign:
19
+ - "+ZxsY0zPhbde/lX5KiZYDFnEFs0JOgHts/AkkiHs5vk="
20
+ Access-Timestamp:
21
+ - '1747574856724'
22
+ Access-Passphrase:
23
+ - "<API_PASSPHRASE>"
24
+ Content-Type:
25
+ - application/json
26
+ X-Channel-Api-Code:
27
+ - spot
28
+ response:
29
+ status:
30
+ code: 418
31
+ message: I'm a teapot
32
+ headers:
33
+ Date:
34
+ - Sun, 18 May 2025 13:27:38 GMT
35
+ Content-Type:
36
+ - application/json
37
+ Content-Length:
38
+ - '97'
39
+ Connection:
40
+ - keep-alive
41
+ X-Mbx-Used-Remain-Limit:
42
+ - '4'
43
+ Access-Control-Allow-Origin:
44
+ - "*"
45
+ Access-Control-Allow-Methods:
46
+ - GET, POST, OPTIONS
47
+ Cf-Cache-Status:
48
+ - DYNAMIC
49
+ Set-Cookie:
50
+ - __cf_bm=wep7poLHpZ83d8CwCtP4mcjNhXGjMh8wEAhuQnw_dm8-1747574858-1.0.1.1-tAOsh.votroBk1_SduR5S4p1kFQptt3ab4njAicnAIX_MtCpE3ko4ker9njcbbp0Se8.PefK.yKOt670MN0rzeLVK74payvrycHHe3JaILw;
51
+ path=/; expires=Sun, 18-May-25 13:57:38 GMT; domain=.api.bitget.com; HttpOnly;
52
+ Secure; SameSite=None
53
+ X-Frame-Options:
54
+ - SAMEORIGIN
55
+ Server:
56
+ - cloudflare
57
+ Cf-Ray:
58
+ - 941bb16e5c809f70-AMS
59
+ body:
60
+ encoding: UTF-8
61
+ string: ''
62
+ recorded_at: Sun, 18 May 2025 13:27:38 GMT
63
+ recorded_with: VCR 6.3.1
@@ -0,0 +1,68 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.bitget.com/api/v2/spot/trade/cancel-replace-order
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"symbol":"BTCUSDT","price":"31000","size":"0.001","clientOid":null,"orderId":"123456","newClientOid":null,"presetTakeProfitPrice":null,"executeTakeProfitPrice":null,"presetStopLossPrice":null,"executeStopLossPrice":null,"requestTime":null,"receiveWindow":null}'
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ Access-Key:
17
+ - "<API_KEY>"
18
+ Access-Sign:
19
+ - 6qGGtxKDAtsvdd1kWFMRHAufaaOXLdqpV+GfnSEvUXs=
20
+ Access-Timestamp:
21
+ - '1747574855113'
22
+ Access-Passphrase:
23
+ - "<API_PASSPHRASE>"
24
+ Content-Type:
25
+ - application/json
26
+ X-Channel-Api-Code:
27
+ - spot
28
+ response:
29
+ status:
30
+ code: 200
31
+ message: OK
32
+ headers:
33
+ Date:
34
+ - Sun, 18 May 2025 13:27:36 GMT
35
+ Content-Type:
36
+ - application/json
37
+ Transfer-Encoding:
38
+ - chunked
39
+ Connection:
40
+ - keep-alive
41
+ X-Mbx-Used-Remain-Limit:
42
+ - '4'
43
+ X-Xss-Protection:
44
+ - 1; mode=block
45
+ X-Content-Type-Options:
46
+ - nosniff
47
+ Access-Control-Allow-Origin:
48
+ - "*"
49
+ Access-Control-Allow-Methods:
50
+ - GET, POST, OPTIONS
51
+ Cf-Cache-Status:
52
+ - DYNAMIC
53
+ Set-Cookie:
54
+ - __cf_bm=nH_tocLnrn_8BWtGwSixOEjkfQ1lMuNSkKQmc1OLEEA-1747574856-1.0.1.1-Z1aIP_9Ky6bdDi5wkYyw_AnKx42lGEKgKYCQWAPNFfSS8T6L41RvVUMpgVZm4rd4mFkEf3IPxFUk2XlsJDjN8BaplVWXMtS1z75vYlkfssI;
55
+ path=/; expires=Sun, 18-May-25 13:57:36 GMT; domain=.api.bitget.com; HttpOnly;
56
+ Secure; SameSite=None
57
+ X-Frame-Options:
58
+ - SAMEORIGIN
59
+ Server:
60
+ - cloudflare
61
+ Cf-Ray:
62
+ - 941bb16459c220ec-AMS
63
+ body:
64
+ encoding: ASCII-8BIT
65
+ string: !binary |-
66
+ eyJjb2RlIjoiMDAwMDAiLCJtc2ciOiJzdWNjZXNzIiwicmVxdWVzdFRpbWUiOjE3NDc1NzQ4NTY1MTAsImRhdGEiOnsib3JkZXJJZCI6IjEyMzQ1NiIsImNsaWVudE9pZCI6bnVsbCwic3VjY2VzcyI6ImZhaWx1cmUiLCJtc2ciOiLor6XorqLljZXlt7LmiJDkuqTmiJbogIXlt7LmkqTljZUifX0=
67
+ recorded_at: Sun, 18 May 2025 13:27:36 GMT
68
+ recorded_with: VCR 6.3.1
@@ -0,0 +1,63 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.bitget.com/api/v2/spot/trade/cancel-symbol-order
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"symbol":"INVALID","requestTime":null,"receiveWindow":null}'
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ Access-Key:
17
+ - "<API_KEY>"
18
+ Access-Sign:
19
+ - kWzE4rztbFvRTOemRfAKFZMG/d58EvHoo4bSMwIcC4Q=
20
+ Access-Timestamp:
21
+ - '1747574757178'
22
+ Access-Passphrase:
23
+ - "<API_PASSPHRASE>"
24
+ Content-Type:
25
+ - application/json
26
+ X-Channel-Api-Code:
27
+ - spot
28
+ response:
29
+ status:
30
+ code: 418
31
+ message: I'm a teapot
32
+ headers:
33
+ Date:
34
+ - Sun, 18 May 2025 13:25:58 GMT
35
+ Content-Type:
36
+ - application/json
37
+ Content-Length:
38
+ - '97'
39
+ Connection:
40
+ - keep-alive
41
+ X-Mbx-Used-Remain-Limit:
42
+ - '19'
43
+ Access-Control-Allow-Origin:
44
+ - "*"
45
+ Access-Control-Allow-Methods:
46
+ - GET, POST, OPTIONS
47
+ Cf-Cache-Status:
48
+ - DYNAMIC
49
+ Set-Cookie:
50
+ - __cf_bm=XGmmzQ3Pc2_3s4GzqeVCgQlrs24zix9CfpKCWvGmn2I-1747574758-1.0.1.1-KTKy7o3LjTblZSfj_mg0_bAsGsuzJoKBAkEfnZ3OCAz9fd750PBIE7wCnhaowTQt9.Zgcb7sZy11fDYPO1KUfmpzbWPjMLJ7K7iKgbJAuN8;
51
+ path=/; expires=Sun, 18-May-25 13:55:58 GMT; domain=.api.bitget.com; HttpOnly;
52
+ Secure; SameSite=None
53
+ X-Frame-Options:
54
+ - SAMEORIGIN
55
+ Server:
56
+ - cloudflare
57
+ Cf-Ray:
58
+ - 941baefff823bbc2-FRA
59
+ body:
60
+ encoding: UTF-8
61
+ string: ''
62
+ recorded_at: Sun, 18 May 2025 13:25:58 GMT
63
+ recorded_with: VCR 6.3.1
@@ -0,0 +1,67 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.bitget.com/api/v2/spot/trade/cancel-symbol-order
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"symbol":"BTCUSDT","requestTime":null,"receiveWindow":null}'
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ Access-Key:
17
+ - "<API_KEY>"
18
+ Access-Sign:
19
+ - 1WqWtSW8cN8fP3crT4FVYmbxaI53Bb2boUhUCDZxPcA=
20
+ Access-Timestamp:
21
+ - '1747574761941'
22
+ Access-Passphrase:
23
+ - "<API_PASSPHRASE>"
24
+ Content-Type:
25
+ - application/json
26
+ X-Channel-Api-Code:
27
+ - spot
28
+ response:
29
+ status:
30
+ code: 200
31
+ message: OK
32
+ headers:
33
+ Date:
34
+ - Sun, 18 May 2025 13:26:03 GMT
35
+ Content-Type:
36
+ - application/json
37
+ Transfer-Encoding:
38
+ - chunked
39
+ Connection:
40
+ - keep-alive
41
+ X-Mbx-Used-Remain-Limit:
42
+ - '19'
43
+ X-Xss-Protection:
44
+ - 1; mode=block
45
+ X-Content-Type-Options:
46
+ - nosniff
47
+ Access-Control-Allow-Origin:
48
+ - "*"
49
+ Access-Control-Allow-Methods:
50
+ - GET, POST, OPTIONS
51
+ Cf-Cache-Status:
52
+ - DYNAMIC
53
+ Set-Cookie:
54
+ - __cf_bm=4OypW9vGjhM5oi7Ucb70UtHqLoQUWOqRK2mBa_TGZN4-1747574763-1.0.1.1-870fI4q8wrOsKZpUubDd1dkgPrwpgZ_sooI_Cq1ktLmLwWLZ_8JBcxHoab6QKNZCbj5jv0Nwxr7XmsCkk6RaV6re716MqIzcaJ0_.V6wi0U;
55
+ path=/; expires=Sun, 18-May-25 13:56:03 GMT; domain=.api.bitget.com; HttpOnly;
56
+ Secure; SameSite=None
57
+ X-Frame-Options:
58
+ - SAMEORIGIN
59
+ Server:
60
+ - cloudflare
61
+ Cf-Ray:
62
+ - 941baf1dcf89d294-FRA
63
+ body:
64
+ encoding: ASCII-8BIT
65
+ string: '{"code":"00000","msg":"success","requestTime":1747574763291,"data":{"symbol":"BTCUSDT"}}'
66
+ recorded_at: Sun, 18 May 2025 13:26:03 GMT
67
+ recorded_with: VCR 6.3.1
@@ -0,0 +1,63 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.bitget.com/api/v2/spot/trade/current-plan-order?symbol=INVALID
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ Access-Key:
17
+ - "<API_KEY>"
18
+ Access-Sign:
19
+ - h402eRA4uMXENc01TOxzddlJMfv5ludLahXzzKgSgac=
20
+ Access-Timestamp:
21
+ - '1747574768194'
22
+ Access-Passphrase:
23
+ - "<API_PASSPHRASE>"
24
+ Content-Type:
25
+ - application/json
26
+ X-Channel-Api-Code:
27
+ - spot
28
+ response:
29
+ status:
30
+ code: 418
31
+ message: I'm a teapot
32
+ headers:
33
+ Date:
34
+ - Sun, 18 May 2025 13:26:09 GMT
35
+ Content-Type:
36
+ - application/json
37
+ Content-Length:
38
+ - '97'
39
+ Connection:
40
+ - keep-alive
41
+ X-Mbx-Used-Remain-Limit:
42
+ - '19'
43
+ Access-Control-Allow-Origin:
44
+ - "*"
45
+ Access-Control-Allow-Methods:
46
+ - GET, POST, OPTIONS
47
+ Cf-Cache-Status:
48
+ - DYNAMIC
49
+ Set-Cookie:
50
+ - __cf_bm=UetIP.efhaIP28I_hmQ2D2oJnW89igKoMUC062b0kII-1747574769-1.0.1.1-5jbQHxSCTql7ICUspmPoR9aY9LCcUC2lE5zPRtiL5iXqHyzh4cQhdXWNZNMikjqe28AoyIkAEgygHguOMucbdG8HaAmVtS4luyM_4am4mNg;
51
+ path=/; expires=Sun, 18-May-25 13:56:09 GMT; domain=.api.bitget.com; HttpOnly;
52
+ Secure; SameSite=None
53
+ X-Frame-Options:
54
+ - SAMEORIGIN
55
+ Server:
56
+ - cloudflare
57
+ Cf-Ray:
58
+ - 941baf44eb54662c-AMS
59
+ body:
60
+ encoding: UTF-8
61
+ string: ''
62
+ recorded_at: Sun, 18 May 2025 13:26:09 GMT
63
+ recorded_with: VCR 6.3.1
@@ -0,0 +1,67 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.bitget.com/api/v2/spot/trade/current-plan-order?symbol=BTCUSDT
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ Access-Key:
17
+ - "<API_KEY>"
18
+ Access-Sign:
19
+ - m1XvvO+WnaJXa5vKpZ4Re8mw0Kx4Grtdv+wXxrnDXoQ=
20
+ Access-Timestamp:
21
+ - '1747574738172'
22
+ Access-Passphrase:
23
+ - "<API_PASSPHRASE>"
24
+ Content-Type:
25
+ - application/json
26
+ X-Channel-Api-Code:
27
+ - spot
28
+ response:
29
+ status:
30
+ code: 200
31
+ message: OK
32
+ headers:
33
+ Date:
34
+ - Sun, 18 May 2025 13:25:39 GMT
35
+ Content-Type:
36
+ - application/json
37
+ Transfer-Encoding:
38
+ - chunked
39
+ Connection:
40
+ - keep-alive
41
+ X-Mbx-Used-Remain-Limit:
42
+ - '19'
43
+ X-Xss-Protection:
44
+ - 1; mode=block
45
+ X-Content-Type-Options:
46
+ - nosniff
47
+ Access-Control-Allow-Origin:
48
+ - "*"
49
+ Access-Control-Allow-Methods:
50
+ - GET, POST, OPTIONS
51
+ Cf-Cache-Status:
52
+ - DYNAMIC
53
+ Set-Cookie:
54
+ - __cf_bm=dTF6FqUrcoJBsaoBpMyvn5KofkNRS3B.GsmdYfRpr7M-1747574739-1.0.1.1-LeMFMV7oSWxM7G8tYjoj9SIWS9Iw5aN3v7zm9x6m4umd8wyu.XSxsWucr.qnJx43oKrJsYCJm_bF0r6cYbjwCpMBnAAn.h5e7.PZeo0nkQQ;
55
+ path=/; expires=Sun, 18-May-25 13:55:39 GMT; domain=.api.bitget.com; HttpOnly;
56
+ Secure; SameSite=None
57
+ X-Frame-Options:
58
+ - SAMEORIGIN
59
+ Server:
60
+ - cloudflare
61
+ Cf-Ray:
62
+ - 941bae8949ded5a5-AMS
63
+ body:
64
+ encoding: ASCII-8BIT
65
+ string: '{"code":"00000","msg":"success","requestTime":1747574739537,"data":{"nextFlag":false,"idLessThan":"","orderList":[]}}'
66
+ recorded_at: Sun, 18 May 2025 13:25:39 GMT
67
+ recorded_with: VCR 6.3.1
@@ -0,0 +1,63 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.bitget.com/api/v2/spot/trade/fills?symbol=INVALID
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ Access-Key:
17
+ - "<API_KEY>"
18
+ Access-Sign:
19
+ - PDZ0VwK0RYmi54KSzKKeEqgxemnK+GkOhRs6rXEonSg=
20
+ Access-Timestamp:
21
+ - '1747574787857'
22
+ Access-Passphrase:
23
+ - "<API_PASSPHRASE>"
24
+ Content-Type:
25
+ - application/json
26
+ X-Channel-Api-Code:
27
+ - spot
28
+ response:
29
+ status:
30
+ code: 418
31
+ message: I'm a teapot
32
+ headers:
33
+ Date:
34
+ - Sun, 18 May 2025 13:26:29 GMT
35
+ Content-Type:
36
+ - application/json
37
+ Content-Length:
38
+ - '97'
39
+ Connection:
40
+ - keep-alive
41
+ X-Mbx-Used-Remain-Limit:
42
+ - '9'
43
+ Access-Control-Allow-Origin:
44
+ - "*"
45
+ Access-Control-Allow-Methods:
46
+ - GET, POST, OPTIONS
47
+ Cf-Cache-Status:
48
+ - DYNAMIC
49
+ Set-Cookie:
50
+ - __cf_bm=HFHPbroIrclqVGHrNvAHMu6bTGoGsp0k.R7Shasjw70-1747574789-1.0.1.1-FPCPYMQ5LrEn70Da2zJjGkTlK5rPcRm65Kqun6sS3IjpVdQJs5QSNFc8jHcx7XJgaHNdaAqyDm4qROwfSEM2wwYgOTKKkKFE5MVBEPoQ6gM;
51
+ path=/; expires=Sun, 18-May-25 13:56:29 GMT; domain=.api.bitget.com; HttpOnly;
52
+ Secure; SameSite=None
53
+ X-Frame-Options:
54
+ - SAMEORIGIN
55
+ Server:
56
+ - cloudflare
57
+ Cf-Ray:
58
+ - 941bafbfda3d299d-AMS
59
+ body:
60
+ encoding: UTF-8
61
+ string: ''
62
+ recorded_at: Sun, 18 May 2025 13:26:29 GMT
63
+ recorded_with: VCR 6.3.1