Skip to content

Commit

Permalink
v1.5.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
alplabin committed Apr 10, 2024
1 parent ca35a17 commit 09cd53d
Show file tree
Hide file tree
Showing 50 changed files with 1,620 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [2.6, 2.7, 3.0, 3.1]
ruby: [3.0, 3.1, 3.2, 3.3]

runs-on: ubuntu-latest

Expand Down
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,36 @@

## 1.5.0 - 2024-04-10

### Added
- Support Ruby 3.2 and 3.3
- New endpoint for Simple Earn:
- `GET /sapi/v1/simple-earn/flexible/list` to query available Simple Earn flexible product list
- `GET /sapi/v1/simple-earn/locked/list` to query available Simple Earn locked product list
- `POST /sapi/v1/simple-earn/flexible/subscribe` to subscribe to a flexible product
- `POST /sapi/v1/simple-earn/locked/subscribe` to subscribe to a locked product
- `POST /sapi/v1/simple-earn/flexible/redeem` to redeem a flexible product
- `POST /sapi/v1/simple-earn/locked/redeem` to redeem a locked product
- `GET /sapi/v1/simple-earn/flexible/position` to get a flexible product position
- `GET /sapi/v1/simple-earn/locked/position` to get a locked product position
- `GET /sapi/v1/simple-earn/account` to get a simple account balances
- `GET /sapi/v1/simple-earn/flexible/history/subscriptionRecord` to get flexible subscription records
- `GET /sapi/v1/simple-earn/locked/history/subscriptionRecord` to get locked subscription records
- `GET /sapi/v1/simple-earn/flexible/history/redemptionRecord` to retrieve flexible redemption records
- `GET /sapi/v1/simple-earn/locked/history/redemptionRecord` to retrieve locked redemption records
- `GET /sapi/v1/simple-earn/flexible/history/rewardsRecord` to get flexible rewards history
- `GET /sapi/v1/simple-earn/locked/history/rewardsRecord` to get locked rewards history
- `POST /sapi/v1/simple-earn/flexible/setAutoSubscribe` to set an auto-subscription to a flexible product
- `POST /sapi/v1/simple-earn/locked/setAutoSubscribe` to set an auto-subscription to a locked product
- `GET /sapi/v1/simple-earn/flexible/personalLeftQuota` to get flexible personal left quota
- `GET /sapi/v1/simple-earn/locked/personalLeftQuota` to get locked personal left quota
- `GET /sapi/v1/simple-earn/flexible/subscriptionPreview` to get flexible subscription preview
- `GET /sapi/v1/simple-earn/locked/subscriptionPreview` to get locked subscription previews
- `GET /sapi/v1/simple-earn/flexible/history/rateHistory` to get a rate history
- `GET /sapi/v1/simple-earn/flexible/history/collateralRecord` to get collateral records

### Changed
- Update dependencies
- Drop support of Ruby 2.6 and 2.7

### Removed
- Deprecated Savings endpoints:
Expand Down
12 changes: 12 additions & 0 deletions examples/spot/simple_earn/collateral_record.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift('./lib')

require 'binance'
require_relative '../../common'

logger = Common.setup_logger

client = Binance::Spot.new(key: '', secret: '')
logger.info(client.collateral_record)
12 changes: 12 additions & 0 deletions examples/spot/simple_earn/flexible_auto_subscribe.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift('./lib')

require 'binance'
require_relative '../../common'

logger = Common.setup_logger

client = Binance::Spot.new(key: '', secret: '')
logger.info(client.flexible_auto_subscribe(productId: '1234', autoSubscribe: true))
12 changes: 12 additions & 0 deletions examples/spot/simple_earn/flexible_personal_left_quota.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift('./lib')

require 'binance'
require_relative '../../common'

logger = Common.setup_logger

client = Binance::Spot.new(key: '', secret: '')
logger.info(client.flexible_personal_left_quota(productId: 'BTC001'))
12 changes: 12 additions & 0 deletions examples/spot/simple_earn/flexible_product_list.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift('./lib')

require 'binance'
require_relative '../../common'

logger = Common.setup_logger

client = Binance::Spot.new(key: '', secret: '')
logger.info(client.flexible_product_list)
12 changes: 12 additions & 0 deletions examples/spot/simple_earn/flexible_product_position.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift('./lib')

require 'binance'
require_relative '../../common'

logger = Common.setup_logger

client = Binance::Spot.new(key: '', secret: '')
logger.info(client.flexible_product_position)
12 changes: 12 additions & 0 deletions examples/spot/simple_earn/flexible_redeem_product.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift('./lib')

require 'binance'
require_relative '../../common'

logger = Common.setup_logger

client = Binance::Spot.new(key: '', secret: '')
logger.info(client.flexible_redeem_product(productId: 'BTC001'))
12 changes: 12 additions & 0 deletions examples/spot/simple_earn/flexible_redemption_record.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift('./lib')

require 'binance'
require_relative '../../common'

logger = Common.setup_logger

client = Binance::Spot.new(key: '', secret: '')
logger.info(client.flexible_redemption_record)
12 changes: 12 additions & 0 deletions examples/spot/simple_earn/flexible_rewards_history.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift('./lib')

require 'binance'
require_relative '../../common'

logger = Common.setup_logger

client = Binance::Spot.new(key: '', secret: '')
logger.info(client.flexible_rewards_history(type: 'BONUS'))
12 changes: 12 additions & 0 deletions examples/spot/simple_earn/flexible_subscribe.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift('./lib')

require 'binance'
require_relative '../../common'

logger = Common.setup_logger

client = Binance::Spot.new(key: '', secret: '')
logger.info(client.flexible_subscribe(productId: 'BTC001', amount: 0.01))
12 changes: 12 additions & 0 deletions examples/spot/simple_earn/flexible_subscription_preview.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift('./lib')

require 'binance'
require_relative '../../common'

logger = Common.setup_logger

client = Binance::Spot.new(key: '', secret: '')
logger.info(client.flexible_subscription_preview(productId: 'BTC001', amount: 1.0))
12 changes: 12 additions & 0 deletions examples/spot/simple_earn/flexible_subscription_record.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift('./lib')

require 'binance'
require_relative '../../common'

logger = Common.setup_logger

client = Binance::Spot.new(key: '', secret: '')
logger.info(client.flexible_subscription_record)
12 changes: 12 additions & 0 deletions examples/spot/simple_earn/locked_auto_subscribe.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift('./lib')

require 'binance'
require_relative '../../common'

logger = Common.setup_logger

client = Binance::Spot.new(key: '', secret: '')
logger.info(client.locked_auto_subscribe(positionId: '1234', autoSubscribe: true))
12 changes: 12 additions & 0 deletions examples/spot/simple_earn/locked_personal_left_quota.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift('./lib')

require 'binance'
require_relative '../../common'

logger = Common.setup_logger

client = Binance::Spot.new(key: '', secret: '')
logger.info(client.locked_personal_left_quota(projectId: 'Bnb*120'))
12 changes: 12 additions & 0 deletions examples/spot/simple_earn/locked_product_list.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift('./lib')

require 'binance'
require_relative '../../common'

logger = Common.setup_logger

client = Binance::Spot.new(key: '', secret: '')
logger.info(client.locked_product_list)
12 changes: 12 additions & 0 deletions examples/spot/simple_earn/locked_product_position.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift('./lib')

require 'binance'
require_relative '../../common'

logger = Common.setup_logger

client = Binance::Spot.new(key: '', secret: '')
logger.info(client.locked_product_position)
12 changes: 12 additions & 0 deletions examples/spot/simple_earn/locked_redeem_product.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift('./lib')

require 'binance'
require_relative '../../common'

logger = Common.setup_logger

client = Binance::Spot.new(key: '', secret: '')
logger.info(client.locked_redeem_product(positionId: '1234'))
12 changes: 12 additions & 0 deletions examples/spot/simple_earn/locked_redemption_record.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift('./lib')

require 'binance'
require_relative '../../common'

logger = Common.setup_logger

client = Binance::Spot.new(key: '', secret: '')
logger.info(client.locked_redemption_record)
12 changes: 12 additions & 0 deletions examples/spot/simple_earn/locked_rewards_history.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift('./lib')

require 'binance'
require_relative '../../common'

logger = Common.setup_logger

client = Binance::Spot.new(key: '', secret: '')
logger.info(client.locked_rewards_history)
12 changes: 12 additions & 0 deletions examples/spot/simple_earn/locked_subscribe.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift('./lib')

require 'binance'
require_relative '../../common'

logger = Common.setup_logger

client = Binance::Spot.new(key: '', secret: '')
logger.info(client.locked_subscribe(projectId: 'Bnb*120', amount: 1.0))
12 changes: 12 additions & 0 deletions examples/spot/simple_earn/locked_subscription_preview.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift('./lib')

require 'binance'
require_relative '../../common'

logger = Common.setup_logger

client = Binance::Spot.new(key: '', secret: '')
logger.info(client.locked_subscription_preview(projectId: 'Bnb*120', amount: 1.0))
12 changes: 12 additions & 0 deletions examples/spot/simple_earn/locked_subscription_record.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift('./lib')

require 'binance'
require_relative '../../common'

logger = Common.setup_logger

client = Binance::Spot.new(key: '', secret: '')
logger.info(client.locked_subscription_record)
12 changes: 12 additions & 0 deletions examples/spot/simple_earn/rate_history.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift('./lib')

require 'binance'
require_relative '../../common'

logger = Common.setup_logger

client = Binance::Spot.new(key: '', secret: '')
logger.info(client.rate_history(productId: 'BTC001'))
12 changes: 12 additions & 0 deletions examples/spot/simple_earn/simple_earn_account.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift('./lib')

require 'binance'
require_relative '../../common'

logger = Common.setup_logger

client = Binance::Spot.new(key: '', secret: '')
logger.info(client.simple_earn_account)
1 change: 1 addition & 0 deletions lib/binance/spot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module Binance
# - Margin
# - Market
# - Mining
# - SimpleEarn
# - Stream
# - Subaccount
# - Trade
Expand Down
Loading

0 comments on commit 09cd53d

Please sign in to comment.