Module: Binance::Spot::Subaccount
- Included in:
- Binance::Spot
- Defined in:
- lib/binance/spot/subaccount.rb
Overview
all sub-account endpoints
Instance Method Summary collapse
-
#create_virtual_sub_account(subAccountString:, **kwargs) ⇒ Object
Create a Virtual Sub-account(For Master Account).
-
#deposit_to_sub_account(toEmail:, asset:, amount:, **kwargs) ⇒ Object
Deposit assets into the managed sub-account (For Investor Master Account).
-
#get_sub_account_assets(email:, **kwargs) ⇒ Object
Query Sub-account Assets (For Master Account).
-
#get_sub_account_assets_v4(email:, **kwargs) ⇒ Object
Query Sub-account Assets (For Master Account)(USER_DATA).
-
#get_sub_account_futures_transfer_history(email:, futuresType:, **kwargs) ⇒ Object
Query Sub-account Futures Asset Transfer History (For Master Account).
-
#get_sub_account_list(**kwargs) ⇒ Object
Query Sub-account List (For Master Account).
-
#get_sub_account_spot_summary(**kwargs) ⇒ Object
Query Sub-account Spot Assets Summary (For Master Account).
-
#get_sub_account_spot_transfer_history(**kwargs) ⇒ Object
Query Sub-account Spot Asset Transfer History (For Master Account).
-
#sub_account_asset_details(email:, **kwargs) ⇒ Object
Query managed sub-account asset details (For Investor Master Account).
-
#sub_account_delete_ip_list(email:, subAccountApiKey:, ipAddress:, **kwargs) ⇒ Object
Delete IP List For a Sub-account API Key (For Master Account).
-
#sub_account_deposit_address(email:, coin:, **kwargs) ⇒ Object
Get Sub-account Deposit Address (For Master Account).
-
#sub_account_deposit_history(email:, **kwargs) ⇒ Object
Get Sub-account Deposit History (For Master Account).
-
#sub_account_enable_blvt(email:, enableBlvt:, **kwargs) ⇒ Object
Enable Leverage Token for Sub-account (For Master Account).
-
#sub_account_enable_futures(email:, **kwargs) ⇒ Object
Enable Futures for Sub-account (For Master Account).
-
#sub_account_enable_margin(email:, **kwargs) ⇒ Object
Enable Margin for Sub-account (For Master Account).
-
#sub_account_enable_options(email:, **kwargs) ⇒ Object
Enable Options for Sub-account(For Master Account)(USER_DATA).
-
#sub_account_futures_account(email:, futuresType:, **kwargs) ⇒ Object
Get Detail on Sub-account’s Futures Account (For Master Account).
-
#sub_account_futures_account_summary(futuresType:, **kwargs) ⇒ Object
Get Summary of Sub-account’s Futures Account (For Master Account).
-
#sub_account_futures_asset_details(email:, **kwargs) ⇒ Object
Query Managed Sub-account Futures Asset Details(For Investor Master Account)(USER_DATA).
-
#sub_account_futures_internal_transfer(fromEmail:, toEmail:, futuresType:, asset:, amount:, **kwargs) ⇒ Object
Sub-account Futures Asset Transfer (For Master Account).
-
#sub_account_futures_position_risk(email:, futuresType:, **kwargs) ⇒ Object
Get Futures Position-Risk of Sub-account (For Master Account).
-
#sub_account_futures_transfer(email:, asset:, amount:, type:, **kwargs) ⇒ Object
Futures Transfer for Sub-account(For Master Account).
-
#sub_account_ip_list(email:, subAccountApiKey:, **kwargs) ⇒ Object
Get IP Restriction for a Sub-account API Key (For Master Account).
-
#sub_account_list(**kwargs) ⇒ Object
Query Managed Sub-account List (For Investor)(USER_DATA).
-
#sub_account_margin_account(email:, **kwargs) ⇒ Object
Get Detail on Sub-account’s Margin Account (For Master Account).
-
#sub_account_margin_account_summary(**kwargs) ⇒ Object
Get Summary of Sub-account’s Margin Account (For Master Account).
-
#sub_account_margin_asset_details(email:, **kwargs) ⇒ Object
Query Managed Sub-account Margin Asset Details(For Investor Master Account)(USER_DATA).
-
#sub_account_margin_transfer(email:, asset:, amount:, type:, **kwargs) ⇒ Object
Margin Transfer for Sub-account(For Master Account).
-
#sub_account_status(**kwargs) ⇒ Object
Get Sub-account’s Status on Margin/Futures(For Master Account).
-
#sub_account_toggle_ip_restriction(email:, subAccountApiKey:, status:, **kwargs) ⇒ Object
Enable or Disable IP Restriction for a Sub-account API Key (For Master Account).
-
#sub_account_transaction_statistics(email:, **kwargs) ⇒ Object
Query Sub-account Transaction Statistics(For Master Account)(USER_DATA).
-
#sub_account_transfer_log(email:, startTime:, endTime:, page:, limit:, **kwargs) ⇒ Object
Query Managed Sub Account Transfer Log(For Trading Team Master Account)(USER_DATA).
-
#sub_account_transfer_log_investor(email:, startTime:, endTime:, page:, limit:, **kwargs) ⇒ Object
Query Managed Sub Account Transfer Log (For Investor Master Account)(USER_DATA).
-
#sub_account_transfer_log_sub_account(startTime:, endTime:, page:, limit:, **kwargs) ⇒ Object
Query Managed Sub Account Transfer Log (For Trading Team Sub Account)(USER_DATA).
-
#sub_account_transfer_sub_account_history(**kwargs) ⇒ Object
Sub-account Transfer History (For Sub-account).
-
#sub_account_transfer_to_master(asset:, amount:, **kwargs) ⇒ Object
Transfer to Sub-account of Same Master(For Sub-account).
-
#sub_account_transfer_to_sub(toEmail:, asset:, amount:, **kwargs) ⇒ Object
Transfer to Sub-account of Same Master(For Sub-account).
-
#universal_transfer(fromAccountType:, toAccountType:, asset:, amount:, **kwargs) ⇒ Object
Universal Transfer (For Master Account).
-
#universal_transfer_history(**kwargs) ⇒ Object
Query Universal Transfer History (For Master Account).
-
#withdraw_from_sub_account(fromEmail:, asset:, amount:, **kwargs) ⇒ Object
Withdrawl assets from the managed sub-account (For Investor Master Account).
Instance Method Details
#create_virtual_sub_account(subAccountString:, **kwargs) ⇒ Object
Create a Virtual Sub-account(For Master Account)
POST /sapi/v1/sub-account/virtualSubAccount
This request will generate a virtual sub account under your master account.
You need to enable “trade” option for the api key which requests this endpoint.
19 20 21 22 23 24 25 |
# File 'lib/binance/spot/subaccount.rb', line 19 def create_virtual_sub_account(subAccountString:, **kwargs) Binance::Utils::Validation.require_param('subAccountString', subAccountString) @session.sign_request(:post, '/sapi/v1/sub-account/virtualSubAccount', params: kwargs.merge( subAccountString: subAccountString )) end |
#deposit_to_sub_account(toEmail:, asset:, amount:, **kwargs) ⇒ Object
Deposit assets into the managed sub-account (For Investor Master Account)
POST /sapi/v1/managed-subaccount/deposit
549 550 551 552 553 554 555 556 557 558 559 |
# File 'lib/binance/spot/subaccount.rb', line 549 def deposit_to_sub_account(toEmail:, asset:, amount:, **kwargs) Binance::Utils::Validation.require_param('toEmail', toEmail) Binance::Utils::Validation.require_param('asset', asset) Binance::Utils::Validation.require_param('amount', amount) @session.sign_request(:post, '/sapi/v1/managed-subaccount/deposit', params: kwargs.merge( toEmail: toEmail, asset: asset, amount: amount )) end |
#get_sub_account_assets(email:, **kwargs) ⇒ Object
Query Sub-account Assets (For Master Account)
GET /sapi/v3/sub-account/assets
121 122 123 124 125 |
# File 'lib/binance/spot/subaccount.rb', line 121 def get_sub_account_assets(email:, **kwargs) Binance::Utils::Validation.require_param('email', email) @session.sign_request(:get, '/sapi/v3/sub-account/assets', params: kwargs.merge(email: email)) end |
#get_sub_account_assets_v4(email:, **kwargs) ⇒ Object
Query Sub-account Assets (For Master Account)(USER_DATA)
GET /sapi/v4/sub-account/assets
135 136 137 138 139 |
# File 'lib/binance/spot/subaccount.rb', line 135 def get_sub_account_assets_v4(email:, **kwargs) Binance::Utils::Validation.require_param('email', email) @session.sign_request(:get, '/sapi/v4/sub-account/assets', params: kwargs.merge(email: email)) end |
#get_sub_account_futures_transfer_history(email:, futuresType:, **kwargs) ⇒ Object
Query Sub-account Futures Asset Transfer History (For Master Account)
GET /sapi/v1/sub-account/futures/internalTransfer
75 76 77 78 79 80 81 82 83 |
# File 'lib/binance/spot/subaccount.rb', line 75 def get_sub_account_futures_transfer_history(email:, futuresType:, **kwargs) Binance::Utils::Validation.require_param('email', email) Binance::Utils::Validation.require_param('futuresType', futuresType) @session.sign_request(:get, '/sapi/v1/sub-account/futures/internalTransfer', params: kwargs.merge( email: email, futuresType: futuresType )) end |
#get_sub_account_list(**kwargs) ⇒ Object
Query Sub-account List (For Master Account)
GET /sapi/v1/sub-account/list
38 39 40 |
# File 'lib/binance/spot/subaccount.rb', line 38 def get_sub_account_list(**kwargs) @session.sign_request(:get, '/sapi/v1/sub-account/list', params: kwargs) end |
#get_sub_account_spot_summary(**kwargs) ⇒ Object
Query Sub-account Spot Assets Summary (For Master Account)
GET /sapi/v1/sub-account/spotSummary
Get BTC valued asset summary of subaccounts.
153 154 155 |
# File 'lib/binance/spot/subaccount.rb', line 153 def get_sub_account_spot_summary(**kwargs) @session.sign_request(:get, '/sapi/v1/sub-account/spotSummary', params: kwargs) end |
#get_sub_account_spot_transfer_history(**kwargs) ⇒ Object
Query Sub-account Spot Asset Transfer History (For Master Account)
GET /sapi/v1/sub-account/sub/transfer/history
fromEmail and toEmail cannot be sent at the same time.
Return fromEmail equal master account email by default.
58 59 60 |
# File 'lib/binance/spot/subaccount.rb', line 58 def get_sub_account_spot_transfer_history(**kwargs) @session.sign_request(:get, '/sapi/v1/sub-account/sub/transfer/history', params: kwargs) end |
#sub_account_asset_details(email:, **kwargs) ⇒ Object
Query managed sub-account asset details (For Investor Master Account)
GET /sapi/v1/managed-subaccount/asset
569 570 571 572 573 |
# File 'lib/binance/spot/subaccount.rb', line 569 def sub_account_asset_details(email:, **kwargs) Binance::Utils::Validation.require_param('email', email) @session.sign_request(:get, '/sapi/v1/managed-subaccount/asset', params: kwargs.merge(email: email)) end |
#sub_account_delete_ip_list(email:, subAccountApiKey:, ipAddress:, **kwargs) ⇒ Object
Delete IP List For a Sub-account API Key (For Master Account)
DELETE /sapi/v1/sub-account/subAccountApi/ipRestriction/ipList
774 775 776 777 778 779 780 781 782 783 784 |
# File 'lib/binance/spot/subaccount.rb', line 774 def sub_account_delete_ip_list(email:, subAccountApiKey:, ipAddress:, **kwargs) Binance::Utils::Validation.require_param('email', email) Binance::Utils::Validation.require_param('subAccountApiKey', subAccountApiKey) Binance::Utils::Validation.require_param('ipAddress', ipAddress) @session.sign_request(:delete, '/sapi/v1/sub-account/subAccountApi/ipRestriction/ipList', params: kwargs.merge( email: email, subAccountApiKey: subAccountApiKey, ipAddress: ipAddress )) end |
#sub_account_deposit_address(email:, coin:, **kwargs) ⇒ Object
Get Sub-account Deposit Address (For Master Account)
GET /sapi/v1/capital/deposit/subAddress
Fetch sub-account deposit address
169 170 171 172 173 174 175 176 177 |
# File 'lib/binance/spot/subaccount.rb', line 169 def sub_account_deposit_address(email:, coin:, **kwargs) Binance::Utils::Validation.require_param('email', email) Binance::Utils::Validation.require_param('coin', coin) @session.sign_request(:get, '/sapi/v1/capital/deposit/subAddress', params: kwargs.merge( email: email, coin: coin )) end |
#sub_account_deposit_history(email:, **kwargs) ⇒ Object
Get Sub-account Deposit History (For Master Account)
GET /sapi/v1/capital/deposit/subHisrec
Fetch sub-account deposit history
195 196 197 198 199 200 201 |
# File 'lib/binance/spot/subaccount.rb', line 195 def sub_account_deposit_history(email:, **kwargs) Binance::Utils::Validation.require_param('email', email) @session.sign_request(:get, '/sapi/v1/capital/deposit/subHisrec', params: kwargs.merge( email: email )) end |
#sub_account_enable_blvt(email:, enableBlvt:, **kwargs) ⇒ Object
Enable Leverage Token for Sub-account (For Master Account)
POST /sapi/v1/sub-account/blvt/enable
529 530 531 532 533 534 535 536 537 |
# File 'lib/binance/spot/subaccount.rb', line 529 def sub_account_enable_blvt(email:, enableBlvt:, **kwargs) Binance::Utils::Validation.require_param('email', email) Binance::Utils::Validation.require_param('enableBlvt', enableBlvt) @session.sign_request(:post, '/sapi/v1/sub-account/blvt/enable', params: kwargs.merge( email: email, enableBlvt: enableBlvt )) end |
#sub_account_enable_futures(email:, **kwargs) ⇒ Object
Enable Futures for Sub-account (For Master Account)
POST /sapi/v1/sub-account/futures/enable
282 283 284 285 286 287 288 |
# File 'lib/binance/spot/subaccount.rb', line 282 def sub_account_enable_futures(email:, **kwargs) Binance::Utils::Validation.require_param('email', email) @session.sign_request(:post, '/sapi/v1/sub-account/futures/enable', params: kwargs.merge( email: email )) end |
#sub_account_enable_margin(email:, **kwargs) ⇒ Object
Enable Margin for Sub-account (For Master Account)
POST /sapi/v1/sub-account/margin/enable
223 224 225 226 227 228 229 |
# File 'lib/binance/spot/subaccount.rb', line 223 def sub_account_enable_margin(email:, **kwargs) Binance::Utils::Validation.require_param('email', email) @session.sign_request(:post, '/sapi/v1/sub-account/margin/enable', params: kwargs.merge( email: email )) end |
#sub_account_enable_options(email:, **kwargs) ⇒ Object
Enable Options for Sub-account(For Master Account)(USER_DATA)
POST /sapi/v1/sub-account/eoptions/enable
239 240 241 242 243 244 245 |
# File 'lib/binance/spot/subaccount.rb', line 239 def (email:, **kwargs) Binance::Utils::Validation.require_param('email', email) @session.sign_request(:post, '/sapi/v1/sub-account/eoptions/enable', params: kwargs.merge( email: email )) end |
#sub_account_futures_account(email:, futuresType:, **kwargs) ⇒ Object
Get Detail on Sub-account’s Futures Account (For Master Account)
GET /sapi/v2/sub-account/futures/account
299 300 301 302 303 304 305 306 307 |
# File 'lib/binance/spot/subaccount.rb', line 299 def sub_account_futures_account(email:, futuresType:, **kwargs) Binance::Utils::Validation.require_param('email', email) Binance::Utils::Validation.require_param('futuresType', futuresType) @session.sign_request(:get, '/sapi/v2/sub-account/futures/account', params: kwargs.merge( email: email, futuresType: futuresType )) end |
#sub_account_futures_account_summary(futuresType:, **kwargs) ⇒ Object
Get Summary of Sub-account’s Futures Account (For Master Account)
GET /sapi/v2/sub-account/futures/accountSummary
319 320 321 322 323 324 325 |
# File 'lib/binance/spot/subaccount.rb', line 319 def sub_account_futures_account_summary(futuresType:, **kwargs) Binance::Utils::Validation.require_param('futuresType', futuresType) @session.sign_request(:get, '/sapi/v2/sub-account/futures/accountSummary', params: kwargs.merge( futuresType: futuresType )) end |
#sub_account_futures_asset_details(email:, **kwargs) ⇒ Object
Query Managed Sub-account Futures Asset Details(For Investor Master Account)(USER_DATA)
GET /sapi/v1/managed-subaccount/fetch-future-asset
597 598 599 600 601 |
# File 'lib/binance/spot/subaccount.rb', line 597 def sub_account_futures_asset_details(email:, **kwargs) Binance::Utils::Validation.require_param('email', email) @session.sign_request(:get, '/sapi/v1/managed-subaccount/fetch-future-asset', params: kwargs.merge(email: email)) end |
#sub_account_futures_internal_transfer(fromEmail:, toEmail:, futuresType:, asset:, amount:, **kwargs) ⇒ Object
Sub-account Futures Asset Transfer (For Master Account)
POST /sapi/v1/sub-account/futures/internalTransfer
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/binance/spot/subaccount.rb', line 97 def sub_account_futures_internal_transfer(fromEmail:, toEmail:, futuresType:, asset:, amount:, **kwargs) Binance::Utils::Validation.require_param('fromEmail', fromEmail) Binance::Utils::Validation.require_param('toEmail', toEmail) Binance::Utils::Validation.require_param('futuresType', futuresType) Binance::Utils::Validation.require_param('asset', asset) Binance::Utils::Validation.require_param('amount', amount) @session.sign_request(:post, '/sapi/v1/sub-account/futures/internalTransfer', params: kwargs.merge( fromEmail: fromEmail, toEmail: toEmail, futuresType: futuresType, asset: asset, amount: amount )) end |
#sub_account_futures_position_risk(email:, futuresType:, **kwargs) ⇒ Object
Get Futures Position-Risk of Sub-account (For Master Account)
GET /sapi/v2/sub-account/futures/positionRisk
336 337 338 339 340 341 342 343 344 |
# File 'lib/binance/spot/subaccount.rb', line 336 def sub_account_futures_position_risk(email:, futuresType:, **kwargs) Binance::Utils::Validation.require_param('email', email) Binance::Utils::Validation.require_param('futuresType', futuresType) @session.sign_request(:get, '/sapi/v2/sub-account/futures/positionRisk', params: kwargs.merge( email: email, futuresType: futuresType )) end |
#sub_account_futures_transfer(email:, asset:, amount:, type:, **kwargs) ⇒ Object
Futures Transfer for Sub-account(For Master Account)
POST /sapi/v1/sub-account/futures/transfer
376 377 378 379 380 381 382 383 384 385 386 387 388 |
# File 'lib/binance/spot/subaccount.rb', line 376 def sub_account_futures_transfer(email:, asset:, amount:, type:, **kwargs) Binance::Utils::Validation.require_param('email', email) Binance::Utils::Validation.require_param('asset', asset) Binance::Utils::Validation.require_param('amount', amount) Binance::Utils::Validation.require_param('type', type) @session.sign_request(:post, '/sapi/v1/sub-account/futures/transfer', params: kwargs.merge( email: email, asset: asset, amount: amount, type: type )) end |
#sub_account_ip_list(email:, subAccountApiKey:, **kwargs) ⇒ Object
Get IP Restriction for a Sub-account API Key (For Master Account)
GET /sapi/v1/sub-account/subAccountApi/ipRestriction
755 756 757 758 759 760 761 762 763 |
# File 'lib/binance/spot/subaccount.rb', line 755 def sub_account_ip_list(email:, subAccountApiKey:, **kwargs) Binance::Utils::Validation.require_param('email', email) Binance::Utils::Validation.require_param('subAccountApiKey', subAccountApiKey) @session.sign_request(:get, '/sapi/v1/sub-account/subAccountApi/ipRestriction', params: kwargs.merge( email: email, subAccountApiKey: subAccountApiKey )) end |
#sub_account_list(**kwargs) ⇒ Object
Query Managed Sub-account List (For Investor)(USER_DATA)
GET /sapi/v1/managed-subaccount/info
721 722 723 |
# File 'lib/binance/spot/subaccount.rb', line 721 def sub_account_list(**kwargs) @session.sign_request(:get, '/sapi/v1/managed-subaccount/info', params: kwargs) end |
#sub_account_margin_account(email:, **kwargs) ⇒ Object
Get Detail on Sub-account’s Margin Account (For Master Account)
GET /sapi/v1/sub-account/margin/account
255 256 257 258 259 260 261 |
# File 'lib/binance/spot/subaccount.rb', line 255 def sub_account_margin_account(email:, **kwargs) Binance::Utils::Validation.require_param('email', email) @session.sign_request(:get, '/sapi/v1/sub-account/margin/account', params: kwargs.merge( email: email )) end |
#sub_account_margin_account_summary(**kwargs) ⇒ Object
Get Summary of Sub-account’s Margin Account (For Master Account)
GET /sapi/v1/sub-account/margin/accountSummary
270 271 272 |
# File 'lib/binance/spot/subaccount.rb', line 270 def sub_account_margin_account_summary(**kwargs) @session.sign_request(:get, '/sapi/v1/sub-account/margin/accountSummary', params: kwargs) end |
#sub_account_margin_asset_details(email:, **kwargs) ⇒ Object
Query Managed Sub-account Margin Asset Details(For Investor Master Account)(USER_DATA)
GET /sapi/v1/managed-subaccount/marginAsset
583 584 585 586 587 |
# File 'lib/binance/spot/subaccount.rb', line 583 def sub_account_margin_asset_details(email:, **kwargs) Binance::Utils::Validation.require_param('email', email) @session.sign_request(:get, '/sapi/v1/managed-subaccount/marginAsset', params: kwargs.merge(email: email)) end |
#sub_account_margin_transfer(email:, asset:, amount:, type:, **kwargs) ⇒ Object
Margin Transfer for Sub-account(For Master Account)
POST /sapi/v1/sub-account/margin/transfer
402 403 404 405 406 407 408 409 410 411 412 413 414 |
# File 'lib/binance/spot/subaccount.rb', line 402 def sub_account_margin_transfer(email:, asset:, amount:, type:, **kwargs) Binance::Utils::Validation.require_param('email', email) Binance::Utils::Validation.require_param('asset', asset) Binance::Utils::Validation.require_param('amount', amount) Binance::Utils::Validation.require_param('type', type) @session.sign_request(:post, '/sapi/v1/sub-account/margin/transfer', params: kwargs.merge( email: email, asset: asset, amount: amount, type: type )) end |
#sub_account_status(**kwargs) ⇒ Object
Get Sub-account’s Status on Margin/Futures(For Master Account)
GET /sapi/v1/sub-account/status
211 212 213 |
# File 'lib/binance/spot/subaccount.rb', line 211 def sub_account_status(**kwargs) @session.sign_request(:get, '/sapi/v1/sub-account/status', params: kwargs) end |
#sub_account_toggle_ip_restriction(email:, subAccountApiKey:, status:, **kwargs) ⇒ Object
Enable or Disable IP Restriction for a Sub-account API Key (For Master Account)
POST /sapi/v2/sub-account/subAccountApi/ipRestriction
735 736 737 738 739 740 741 742 743 744 745 |
# File 'lib/binance/spot/subaccount.rb', line 735 def sub_account_toggle_ip_restriction(email:, subAccountApiKey:, status:, **kwargs) Binance::Utils::Validation.require_param('email', email) Binance::Utils::Validation.require_param('subAccountApiKey', subAccountApiKey) Binance::Utils::Validation.require_param('status', status) @session.sign_request(:post, '/sapi/v2/sub-account/subAccountApi/ipRestriction', params: kwargs.merge( email: email, subAccountApiKey: subAccountApiKey, status: status )) end |
#sub_account_transaction_statistics(email:, **kwargs) ⇒ Object
Query Sub-account Transaction Statistics(For Master Account)(USER_DATA)
GET /sapi/v1/sub-account/transaction-statistics
354 355 356 357 358 359 360 |
# File 'lib/binance/spot/subaccount.rb', line 354 def sub_account_transaction_statistics(email:, **kwargs) Binance::Utils::Validation.require_param('email', email) @session.sign_request(:get, '/sapi/v1/sub-account/transaction-statistics', params: kwargs.merge( email: email )) end |
#sub_account_transfer_log(email:, startTime:, endTime:, page:, limit:, **kwargs) ⇒ Object
Query Managed Sub Account Transfer Log(For Trading Team Master Account)(USER_DATA)
GET /sapi/v1/managed-subaccount/queryTransLogForTradeParent
639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 |
# File 'lib/binance/spot/subaccount.rb', line 639 def sub_account_transfer_log(email:, startTime:, endTime:, page:, limit:, **kwargs) Binance::Utils::Validation.require_param('email', email) Binance::Utils::Validation.require_param('startTime', startTime) Binance::Utils::Validation.require_param('endTime', endTime) Binance::Utils::Validation.require_param('page', page) Binance::Utils::Validation.require_param('limit', limit) @session.sign_request(:get, '/sapi/v1/managed-subaccount/queryTransLogForTradeParent', params: kwargs.merge( email: email, startTime: startTime, endTime: endTime, page: page, limit: limit )) end |
#sub_account_transfer_log_investor(email:, startTime:, endTime:, page:, limit:, **kwargs) ⇒ Object
Query Managed Sub Account Transfer Log (For Investor Master Account)(USER_DATA)
GET /sapi/v1/managed-subaccount/queryTransLogForInvestor
695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 |
# File 'lib/binance/spot/subaccount.rb', line 695 def sub_account_transfer_log_investor(email:, startTime:, endTime:, page:, limit:, **kwargs) Binance::Utils::Validation.require_param('email', email) Binance::Utils::Validation.require_param('startTime', startTime) Binance::Utils::Validation.require_param('endTime', endTime) Binance::Utils::Validation.require_param('page', page) Binance::Utils::Validation.require_param('limit', limit) @session.sign_request(:get, '/sapi/v1/managed-subaccount/queryTransLogForInvestor', params: kwargs.merge( email: email, startTime: startTime, endTime: endTime, page: page, limit: limit )) end |
#sub_account_transfer_log_sub_account(startTime:, endTime:, page:, limit:, **kwargs) ⇒ Object
Query Managed Sub Account Transfer Log (For Trading Team Sub Account)(USER_DATA)
GET /sapi/v1/managed-subaccount/query-trans-log
668 669 670 671 672 673 674 675 676 677 678 679 680 |
# File 'lib/binance/spot/subaccount.rb', line 668 def sub_account_transfer_log_sub_account(startTime:, endTime:, page:, limit:, **kwargs) Binance::Utils::Validation.require_param('startTime', startTime) Binance::Utils::Validation.require_param('endTime', endTime) Binance::Utils::Validation.require_param('page', page) Binance::Utils::Validation.require_param('limit', limit) @session.sign_request(:get, '/sapi/v1/managed-subaccount/query-trans-log', params: kwargs.merge( startTime: startTime, endTime: endTime, page: page, limit: limit )) end |
#sub_account_transfer_sub_account_history(**kwargs) ⇒ Object
Sub-account Transfer History (For Sub-account)
GET /sapi/v1/sub-account/transfer/subUserHistory
469 470 471 |
# File 'lib/binance/spot/subaccount.rb', line 469 def sub_account_transfer_sub_account_history(**kwargs) @session.sign_request(:get, '/sapi/v1/sub-account/transfer/subUserHistory', params: kwargs) end |
#sub_account_transfer_to_master(asset:, amount:, **kwargs) ⇒ Object
Transfer to Sub-account of Same Master(For Sub-account)
POST /sapi/v1/sub-account/transfer/subToMaster
447 448 449 450 451 452 453 454 455 |
# File 'lib/binance/spot/subaccount.rb', line 447 def sub_account_transfer_to_master(asset:, amount:, **kwargs) Binance::Utils::Validation.require_param('asset', asset) Binance::Utils::Validation.require_param('amount', amount) @session.sign_request(:post, '/sapi/v1/sub-account/transfer/subToMaster', params: kwargs.merge( asset: asset, amount: amount )) end |
#sub_account_transfer_to_sub(toEmail:, asset:, amount:, **kwargs) ⇒ Object
Transfer to Sub-account of Same Master(For Sub-account)
POST /sapi/v1/sub-account/transfer/subToSub
426 427 428 429 430 431 432 433 434 435 436 |
# File 'lib/binance/spot/subaccount.rb', line 426 def sub_account_transfer_to_sub(toEmail:, asset:, amount:, **kwargs) Binance::Utils::Validation.require_param('toEmail', toEmail) Binance::Utils::Validation.require_param('asset', asset) Binance::Utils::Validation.require_param('amount', amount) @session.sign_request(:post, '/sapi/v1/sub-account/transfer/subToSub', params: kwargs.merge( toEmail: toEmail, asset: asset, amount: amount )) end |
#universal_transfer(fromAccountType:, toAccountType:, asset:, amount:, **kwargs) ⇒ Object
Universal Transfer (For Master Account)
POST /sapi/v1/sub-account/universalTransfer
You need to enable “internal transfer” option for the api key which requests this endpoint.
Transfer between futures accounts is not supported.
489 490 491 492 493 494 495 496 497 498 499 500 501 |
# File 'lib/binance/spot/subaccount.rb', line 489 def universal_transfer(fromAccountType:, toAccountType:, asset:, amount:, **kwargs) Binance::Utils::Validation.require_param('fromAccountType', fromAccountType) Binance::Utils::Validation.require_param('toAccountType', toAccountType) Binance::Utils::Validation.require_param('asset', asset) Binance::Utils::Validation.require_param('amount', amount) @session.sign_request(:post, '/sapi/v1/sub-account/universalTransfer', params: kwargs.merge( fromAccountType: fromAccountType, toAccountType: toAccountType, asset: asset, amount: amount )) end |
#universal_transfer_history(**kwargs) ⇒ Object
Query Universal Transfer History (For Master Account)
GET /sapi/v1/sub-account/universalTransfer
516 517 518 |
# File 'lib/binance/spot/subaccount.rb', line 516 def universal_transfer_history(**kwargs) @session.sign_request(:get, '/sapi/v1/sub-account/universalTransfer', params: kwargs) end |
#withdraw_from_sub_account(fromEmail:, asset:, amount:, **kwargs) ⇒ Object
Withdrawl assets from the managed sub-account (For Investor Master Account)
POST /sapi/v1/managed-subaccount/withdraw
614 615 616 617 618 619 620 621 622 623 624 |
# File 'lib/binance/spot/subaccount.rb', line 614 def withdraw_from_sub_account(fromEmail:, asset:, amount:, **kwargs) Binance::Utils::Validation.require_param('fromEmail', fromEmail) Binance::Utils::Validation.require_param('asset', asset) Binance::Utils::Validation.require_param('amount', amount) @session.sign_request(:post, '/sapi/v1/managed-subaccount/withdraw', params: kwargs.merge( fromEmail: fromEmail, asset: asset, amount: amount )) end |