Module: Binance::Spot::Wallet
- Included in:
- Binance::Spot
- Defined in:
- lib/binance/spot/wallet.rb
Overview
all wallet endpoints
Instance Method Summary collapse
-
#account_snapshot(type:, **kwargs) ⇒ Object
Daily Account Snapshot (USER_DATA).
-
#account_status(**kwargs) ⇒ Object
Account Status (USER_DATA).
-
#api_key_permission(**kwargs) ⇒ Object
Get API Key Permission (USER_DATA).
-
#api_trading_status(**kwargs) ⇒ Object
Account API Trading Status (USER_DATA).
-
#asset_detail(**kwargs) ⇒ Object
Asset Detail (USER_DATA).
-
#asset_devidend_record(**kwargs) ⇒ Object
Asset Dividend Record (USER_DATA).
-
#coin_info(**kwargs) ⇒ Object
All Coins’ Information (USER_DATA).
-
#deposit_address(coin:, **kwargs) ⇒ Object
Deposit Address (supporting network) (USER_DATA).
-
#deposit_history(**kwargs) ⇒ Object
Deposit History (supporting network) (USER_DATA).
-
#disable_fast_withdraw(**kwargs) ⇒ Object
Disable Fast Withdraw Switch (USER_DATA).
-
#dust_log(**kwargs) ⇒ Object
DustLog (USER_DATA).
-
#dust_transfer(asset:, **kwargs) ⇒ Object
Dust Transfer (USER_DATA).
-
#enable_fast_withdraw(**kwargs) ⇒ Object
Enable Fast Withdraw Switch (USER_DATA).
-
#funding_wallet(**kwargs) ⇒ Object
Funding Wallet (USER_DATA).
-
#get_user_asset(**kwargs) ⇒ Object
User Asset (USER_DATA).
-
#system_status ⇒ Object
System Status (System).
-
#trade_fee(**kwargs) ⇒ Object
Trade Fee (USER_DATA).
-
#user_universal_transfer(type:, asset:, amount:, **kwargs) ⇒ Object
User Universal Transfer (USER_DATA).
-
#user_universal_transfer_history(type:, **kwargs) ⇒ Object
Query User Universal Transfer History (USER_DATA).
-
#withdraw(coin:, address:, amount:, **kwargs) ⇒ Object
Withdraw [SAPI].
-
#withdraw_history(**kwargs) ⇒ Object
Withdraw History (supporting network) (USER_DATA).
Instance Method Details
#account_snapshot(type:, **kwargs) ⇒ Object
Daily Account Snapshot (USER_DATA)
GET /sapi/v1/accountSnapshot
43 44 45 46 47 48 49 |
# File 'lib/binance/spot/wallet.rb', line 43 def account_snapshot(type:, **kwargs) Binance::Utils::Validation.require_param('type', type) @session.sign_request(:get, '/sapi/v1/accountSnapshot', params: kwargs.merge( type: type )) end |
#account_status(**kwargs) ⇒ Object
Account Status (USER_DATA)
GET /sapi/v1/account/status
Fetch account status detail.
161 162 163 |
# File 'lib/binance/spot/wallet.rb', line 161 def account_status(**kwargs) @session.sign_request(:get, '/sapi/v1/account/status', params: kwargs) end |
#api_key_permission(**kwargs) ⇒ Object
Get API Key Permission (USER_DATA)
GET /sapi/v1/account/apiRestrictions
311 312 313 |
# File 'lib/binance/spot/wallet.rb', line 311 def (**kwargs) @session.sign_request(:get, '/sapi/v1/account/apiRestrictions', params: kwargs) end |
#api_trading_status(**kwargs) ⇒ Object
Account API Trading Status (USER_DATA)
GET /sapi/v1/account/apiTradingStatus
Fetch account api trading status detail.
174 175 176 |
# File 'lib/binance/spot/wallet.rb', line 174 def api_trading_status(**kwargs) @session.sign_request(:get, '/sapi/v1/account/apiTradingStatus', params: kwargs) end |
#asset_detail(**kwargs) ⇒ Object
Asset Detail (USER_DATA)
GET /sapi/v1/asset/assetDetail
232 233 234 |
# File 'lib/binance/spot/wallet.rb', line 232 def asset_detail(**kwargs) @session.sign_request(:get, '/sapi/v1/asset/assetDetail', params: kwargs) end |
#asset_devidend_record(**kwargs) ⇒ Object
Asset Dividend Record (USER_DATA)
GET /sapi/v1/asset/assetDividend
220 221 222 |
# File 'lib/binance/spot/wallet.rb', line 220 def asset_devidend_record(**kwargs) @session.sign_request(:get, '/sapi/v1/asset/assetDividend', params: kwargs) end |
#coin_info(**kwargs) ⇒ Object
All Coins’ Information (USER_DATA)
GET /sapi/v1/capital/config/getall
Get information of coins (available for deposit and withdraw) for user.
28 29 30 |
# File 'lib/binance/spot/wallet.rb', line 28 def coin_info(**kwargs) @session.sign_request(:get, '/sapi/v1/capital/config/getall', params: kwargs) end |
#deposit_address(coin:, **kwargs) ⇒ Object
Deposit Address (supporting network) (USER_DATA)
GET /sapi/v1/capital/deposit/address
144 145 146 147 148 149 150 |
# File 'lib/binance/spot/wallet.rb', line 144 def deposit_address(coin:, **kwargs) Binance::Utils::Validation.require_param('coin', coin) @session.sign_request(:get, '/sapi/v1/capital/deposit/address', params: kwargs.merge( coin: coin )) end |
#deposit_history(**kwargs) ⇒ Object
Deposit History (supporting network) (USER_DATA)
GET /sapi/v1/capital/deposit/hisrec
113 114 115 |
# File 'lib/binance/spot/wallet.rb', line 113 def deposit_history(**kwargs) @session.sign_request(:get, '/sapi/v1/capital/deposit/hisrec', params: kwargs) end |
#disable_fast_withdraw(**kwargs) ⇒ Object
Disable Fast Withdraw Switch (USER_DATA)
POST /sapi/v1/account/disableFastWithdrawSwitch
58 59 60 |
# File 'lib/binance/spot/wallet.rb', line 58 def disable_fast_withdraw(**kwargs) @session.sign_request(:post, '/sapi/v1/account/disableFastWithdrawSwitch', params: kwargs) end |
#dust_log(**kwargs) ⇒ Object
DustLog (USER_DATA)
GET /sapi/v1/asset/dribblet
187 188 189 |
# File 'lib/binance/spot/wallet.rb', line 187 def dust_log(**kwargs) @session.sign_request(:get, '/sapi/v1/asset/dribblet', params: kwargs) end |
#dust_transfer(asset:, **kwargs) ⇒ Object
Dust Transfer (USER_DATA)
POST /sapi/v1/asset/dust
Convert dust assets to BNB.
201 202 203 204 205 206 207 |
# File 'lib/binance/spot/wallet.rb', line 201 def dust_transfer(asset:, **kwargs) Binance::Utils::Validation.require_param('asset', asset) @session.sign_request(:post, '/sapi/v1/asset/dust', params: kwargs.merge( asset: asset )) end |
#enable_fast_withdraw(**kwargs) ⇒ Object
Enable Fast Withdraw Switch (USER_DATA)
POST /sapi/v1/account/enableFastWithdrawSwitch
69 70 71 |
# File 'lib/binance/spot/wallet.rb', line 69 def enable_fast_withdraw(**kwargs) @session.sign_request(:post, '/sapi/v1/account/enableFastWithdrawSwitch', params: kwargs) end |
#funding_wallet(**kwargs) ⇒ Object
Funding Wallet (USER_DATA)
POST /sapi/v1/asset/get-funding-asset
300 301 302 |
# File 'lib/binance/spot/wallet.rb', line 300 def funding_wallet(**kwargs) @session.sign_request(:post, '/sapi/v1/asset/get-funding-asset', params: kwargs) end |
#get_user_asset(**kwargs) ⇒ Object
User Asset (USER_DATA)
POST /sapi/v3/asset/getUserAsset
324 325 326 |
# File 'lib/binance/spot/wallet.rb', line 324 def get_user_asset(**kwargs) @session.sign_request(:post, '/sapi/v3/asset/getUserAsset', params: kwargs) end |
#system_status ⇒ Object
System Status (System)
GET /sapi/v1/system/status
Fetch system status.
15 16 17 |
# File 'lib/binance/spot/wallet.rb', line 15 def system_status @session.public_request(path: '/sapi/v1/system/status') end |
#trade_fee(**kwargs) ⇒ Object
Trade Fee (USER_DATA)
GET /sapi/v1/asset/tradeFee
244 245 246 |
# File 'lib/binance/spot/wallet.rb', line 244 def trade_fee(**kwargs) @session.sign_request(:get, '/sapi/v1/asset/tradeFee', params: kwargs) end |
#user_universal_transfer(type:, asset:, amount:, **kwargs) ⇒ Object
User Universal Transfer (USER_DATA)
POST /sapi/v1/asset/transfer
260 261 262 263 264 265 266 267 268 269 270 |
# File 'lib/binance/spot/wallet.rb', line 260 def user_universal_transfer(type:, asset:, amount:, **kwargs) Binance::Utils::Validation.require_param('type', type) Binance::Utils::Validation.require_param('asset', asset) Binance::Utils::Validation.require_param('amount', amount) @session.sign_request(:post, '/sapi/v1/asset/transfer', params: kwargs.merge( type: type, asset: asset, amount: amount )) end |
#user_universal_transfer_history(type:, **kwargs) ⇒ Object
Query User Universal Transfer History (USER_DATA)
GET /sapi/v1/asset/transfer
286 287 288 289 |
# File 'lib/binance/spot/wallet.rb', line 286 def user_universal_transfer_history(type:, **kwargs) Binance::Utils::Validation.require_param('type', type) @session.sign_request(:get, '/sapi/v1/asset/transfer', params: kwargs.merge(type: type)) end |
#withdraw(coin:, address:, amount:, **kwargs) ⇒ Object
Withdraw [SAPI]
POST /sapi/v1/capital/withdraw/apply
88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/binance/spot/wallet.rb', line 88 def withdraw(coin:, address:, amount:, **kwargs) Binance::Utils::Validation.require_param('coin', coin) Binance::Utils::Validation.require_param('address', address) Binance::Utils::Validation.require_param('amount', amount) @session.sign_request(:post, '/sapi/v1/capital/withdraw/apply', params: kwargs.merge( coin: coin, address: address, amount: amount )) end |
#withdraw_history(**kwargs) ⇒ Object
Withdraw History (supporting network) (USER_DATA)
GET /sapi/v1/capital/withdraw/history
131 132 133 |
# File 'lib/binance/spot/wallet.rb', line 131 def withdraw_history(**kwargs) @session.sign_request(:get, '/sapi/v1/capital/withdraw/history', params: kwargs) end |