From 065823842fc18179981e5ea4f3ed6a8e0c416a21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20V=C3=ADlchez=20L=C3=B3pez?= Date: Fri, 26 Jan 2024 21:33:11 +0100 Subject: [PATCH 1/5] Very simple earn begining --- lib/binance/spot/simple_earn.rb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lib/binance/spot/simple_earn.rb diff --git a/lib/binance/spot/simple_earn.rb b/lib/binance/spot/simple_earn.rb new file mode 100644 index 0000000..21e1ba3 --- /dev/null +++ b/lib/binance/spot/simple_earn.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module Binance + class Spot + # all wallet endpoints + # @see https://binance-docs.github.io/apidocs/spot/en/#wallet-endpoints + module SimpleEarn + + # Account Status (System) + # + # GET /sapi/v1/system/status + # + # Fetch account status. + # + # @see https://binance-docs.github.io/apidocs/spot/en/#simple-account-user_data + def user_data + @session.public_request(path: '/sapi/v1/simple-earn/account') + end + + + end + end +end From cb9dc58f24a92ad3fe828b333ae0bad6e9e8eb8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20V=C3=ADlchez=20L=C3=B3pez?= Date: Fri, 26 Jan 2024 21:37:02 +0100 Subject: [PATCH 2/5] Improving name conventions --- lib/binance/spot/simple_earn.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/binance/spot/simple_earn.rb b/lib/binance/spot/simple_earn.rb index 21e1ba3..10587b5 100644 --- a/lib/binance/spot/simple_earn.rb +++ b/lib/binance/spot/simple_earn.rb @@ -13,7 +13,7 @@ module SimpleEarn # Fetch account status. # # @see https://binance-docs.github.io/apidocs/spot/en/#simple-account-user_data - def user_data + def simple_earn_account @session.public_request(path: '/sapi/v1/simple-earn/account') end From d8f0e9bb2c3b4e038eb56b947f7ea8dbc04c0cd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20V=C3=ADlchez=20L=C3=B3pez?= Date: Fri, 26 Jan 2024 21:50:19 +0100 Subject: [PATCH 3/5] bug fixed --- lib/binance/spot/simple_earn.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/binance/spot/simple_earn.rb b/lib/binance/spot/simple_earn.rb index 10587b5..6e4b25e 100644 --- a/lib/binance/spot/simple_earn.rb +++ b/lib/binance/spot/simple_earn.rb @@ -6,17 +6,18 @@ class Spot # @see https://binance-docs.github.io/apidocs/spot/en/#wallet-endpoints module SimpleEarn - # Account Status (System) + # All Coins' Information on 'simple earn' (USER_DATA) # - # GET /sapi/v1/system/status + # GET /sapi/v1/simple-earn/account' # - # Fetch account status. + # Get information of coins (in simple earn) for user. # + # @param kwargs [Hash] + # @option kwargs [Integer] :recvWindow The value cannot be greater than 60000 # @see https://binance-docs.github.io/apidocs/spot/en/#simple-account-user_data - def simple_earn_account - @session.public_request(path: '/sapi/v1/simple-earn/account') + def simple_earn_account(**kwargs) + @session.sign_request(:get, '/sapi/v1/simple-earn/account', params: kwargs) end - end end From d418e88eb4f9dabf9450cf7bcc8871f8520ba204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20V=C3=ADlchez=20L=C3=B3pez?= Date: Fri, 26 Jan 2024 21:52:23 +0100 Subject: [PATCH 4/5] New minus version --- lib/binance/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/binance/version.rb b/lib/binance/version.rb index 2ffa9a5..415c98d 100644 --- a/lib/binance/version.rb +++ b/lib/binance/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Binance - VERSION = '1.4.0' + VERSION = '1.4.1' end From f502f0097d1f697cd9e7b4513be866de462d3079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20V=C3=ADlchez=20L=C3=B3pez?= Date: Sun, 4 Feb 2024 14:57:27 +0100 Subject: [PATCH 5/5] Necessary changes --- lib/binance/spot.rb | 2 ++ lib/binance/spot/simple_earn.rb | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/binance/spot.rb b/lib/binance/spot.rb index 31b6770..d906471 100644 --- a/lib/binance/spot.rb +++ b/lib/binance/spot.rb @@ -16,6 +16,7 @@ require 'binance/spot/market' require 'binance/spot/mining' require 'binance/spot/savings' +require 'binance/spot/simple_earn' require 'binance/spot/staking' require 'binance/spot/stream' require 'binance/spot/subaccount' @@ -53,6 +54,7 @@ class Spot include Binance::Spot::Market include Binance::Spot::Mining include Binance::Spot::Savings + include Binance::Spot::SimpleEarn include Binance::Spot::Staking include Binance::Spot::Stream include Binance::Spot::Subaccount diff --git a/lib/binance/spot/simple_earn.rb b/lib/binance/spot/simple_earn.rb index 6e4b25e..a39df17 100644 --- a/lib/binance/spot/simple_earn.rb +++ b/lib/binance/spot/simple_earn.rb @@ -5,7 +5,6 @@ class Spot # all wallet endpoints # @see https://binance-docs.github.io/apidocs/spot/en/#wallet-endpoints module SimpleEarn - # All Coins' Information on 'simple earn' (USER_DATA) # # GET /sapi/v1/simple-earn/account'