tests/testthat/test_sub_account_api.R

# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate

context("Test SubAccountApi")

api.instance <- SubAccountApi$new()

test_that("SapiV1CapitalDepositSubAddressGet", {
  # tests for SapiV1CapitalDepositSubAddressGet
  # base path: https://api.binance.com
  # Sub-account Spot Assets Summary (For Master Account)
  # Fetch sub-account deposit address  Weight(IP): 1
  # @param email character Sub-account email
  # @param coin character Coin name
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param network character  (optional)
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [InlineResponse20053]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV1CapitalDepositSubHisrecGet", {
  # tests for SapiV1CapitalDepositSubHisrecGet
  # base path: https://api.binance.com
  # Sub-account Deposit History (For Master Account)
  # Fetch sub-account deposit history  Weight(IP): 1
  # @param email character Sub-account email
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param coin character Coin name (optional)
  # @param status integer 0(0:pending,6: credited but cannot withdraw, 1:success) (optional)
  # @param start.time integer UTC timestamp in ms (optional)
  # @param end.time integer UTC timestamp in ms (optional)
  # @param limit integer  (optional)
  # @param offset integer  (optional)
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [array[InlineResponse20054]]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV1ManagedSubaccountAssetGet", {
  # tests for SapiV1ManagedSubaccountAssetGet
  # base path: https://api.binance.com
  # Managed sub-account asset details(For Investor Master Account)
  # Weight(IP): 1
  # @param email character Sub-account email
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [array[InlineResponse20069]]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV1ManagedSubaccountDepositPost", {
  # tests for SapiV1ManagedSubaccountDepositPost
  # base path: https://api.binance.com
  # Deposit assets into the managed sub-account(For Investor Master Account)
  # Weight(IP): 1
  # @param to.email character Recipient email
  # @param asset character 
  # @param amount numeric 
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [InlineResponse20068]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV1ManagedSubaccountWithdrawPost", {
  # tests for SapiV1ManagedSubaccountWithdrawPost
  # base path: https://api.binance.com
  # Withdrawl assets from the managed sub-account(For Investor Master Account)
  # Weight(IP): 1
  # @param from.email character Sender email
  # @param asset character 
  # @param amount numeric 
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param transfer.date integer Withdrawals is automatically occur on the transfer date(UTC0). If a date is not selected, the withdrawal occurs right now (optional)
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [InlineResponse20068]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV1SubAccountBlvtEnablePost", {
  # tests for SapiV1SubAccountBlvtEnablePost
  # base path: https://api.binance.com
  # Enable Leverage Token for Sub-account (For Master Account)
  # Weight(IP): 1
  # @param email character Sub-account email
  # @param enable.blvt character Only true for now
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [InlineResponse20067]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV1SubAccountFuturesAccountGet", {
  # tests for SapiV1SubAccountFuturesAccountGet
  # base path: https://api.binance.com
  # Detail on Sub-account&#39;s Futures Account (For Master Account)
  # Weight(IP): 10
  # @param email character Sub-account email
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [InlineResponse20060]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV1SubAccountFuturesAccountSummaryGet", {
  # tests for SapiV1SubAccountFuturesAccountSummaryGet
  # base path: https://api.binance.com
  # Summary of Sub-account&#39;s Futures Account (For Master Account)
  # Weight(IP): 1
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [InlineResponse20061]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV1SubAccountFuturesEnablePost", {
  # tests for SapiV1SubAccountFuturesEnablePost
  # base path: https://api.binance.com
  # Enable Futures for Sub-account (For Master Account)
  # Weight(IP): 1
  # @param email character Sub-account email
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [InlineResponse20059]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV1SubAccountFuturesInternalTransferGet", {
  # tests for SapiV1SubAccountFuturesInternalTransferGet
  # base path: https://api.binance.com
  # Sub-account Futures Asset Transfer History (For Master Account)
  # Weight(IP): 1
  # @param email character Sub-account email
  # @param futures.type integer 1:USDT-margined Futures, 2: Coin-margined Futures
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param start.time integer UTC timestamp in ms (optional)
  # @param end.time integer UTC timestamp in ms (optional)
  # @param page integer Default 1 (optional)
  # @param limit integer Default value: 50, Max value: 500 (optional)
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [InlineResponse20049]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV1SubAccountFuturesInternalTransferPost", {
  # tests for SapiV1SubAccountFuturesInternalTransferPost
  # base path: https://api.binance.com
  # Sub-account Futures Asset Transfer (For Master Account)
  # - Master account can transfer max 2000 times a minute  Weight(IP): 1
  # @param from.email character Sender email
  # @param to.email character Recipient email
  # @param futures.type integer 1:USDT-margined Futures,2: Coin-margined Futures
  # @param asset character 
  # @param amount numeric 
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [InlineResponse20050]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV1SubAccountFuturesPositionRiskGet", {
  # tests for SapiV1SubAccountFuturesPositionRiskGet
  # base path: https://api.binance.com
  # Futures Position-Risk of Sub-account (For Master Account)
  # Weight(IP): 10
  # @param email character Sub-account email
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [array[InlineResponse20062]]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV1SubAccountFuturesTransferPost", {
  # tests for SapiV1SubAccountFuturesTransferPost
  # base path: https://api.binance.com
  # Transfer for Sub-account (For Master Account)
  # Weight(IP): 1
  # @param email character Sub-account email
  # @param asset character 
  # @param amount numeric 
  # @param type integer 1: transfer from subaccount's spot account to its USDT-margined futures account  2: transfer from subaccount's USDT-margined futures account to its spot account  3: transfer from subaccount's spot account to its COIN-margined futures account  4:transfer from subaccount's COIN-margined futures account to its spot account
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [InlineResponse20063]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV1SubAccountListGet", {
  # tests for SapiV1SubAccountListGet
  # base path: https://api.binance.com
  # Query Sub-account List (For Master Account)
  # Weight(IP): 1
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param email character Sub-account email (optional)
  # @param is.freeze character  (optional)
  # @param page integer Default 1 (optional)
  # @param limit integer Default 1; max 200 (optional)
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [InlineResponse20047]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV1SubAccountMarginAccountGet", {
  # tests for SapiV1SubAccountMarginAccountGet
  # base path: https://api.binance.com
  # Detail on Sub-account&#39;s Margin Account (For Master Account)
  # Weight(IP): 10
  # @param email character Sub-account email
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [InlineResponse20057]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV1SubAccountMarginAccountSummaryGet", {
  # tests for SapiV1SubAccountMarginAccountSummaryGet
  # base path: https://api.binance.com
  # Summary of Sub-account&#39;s Margin Account (For Master Account)
  # Weight(IP): 10
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [InlineResponse20058]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV1SubAccountMarginEnablePost", {
  # tests for SapiV1SubAccountMarginEnablePost
  # base path: https://api.binance.com
  # Enable Margin for Sub-account (For Master Account)
  # Weight(IP): 1
  # @param email character Sub-account email
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [InlineResponse20056]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV1SubAccountMarginTransferPost", {
  # tests for SapiV1SubAccountMarginTransferPost
  # base path: https://api.binance.com
  # Margin Transfer for Sub-account (For Master Account)
  # Weight(IP): 1
  # @param email character Sub-account email
  # @param asset character 
  # @param amount numeric 
  # @param type integer 1: transfer from subaccount's spot account to margin account  2: transfer from subaccount's margin account to its spot account
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [InlineResponse20063]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV1SubAccountSpotSummaryGet", {
  # tests for SapiV1SubAccountSpotSummaryGet
  # base path: https://api.binance.com
  # Sub-account Spot Assets Summary (For Master Account)
  # Get BTC valued asset summary of subaccounts.  Weight(IP): 1
  # @param email character Sub-account email
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param page integer Default 1 (optional)
  # @param size integer Default:10 Max:20 (optional)
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [InlineResponse20052]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV1SubAccountStatusGet", {
  # tests for SapiV1SubAccountStatusGet
  # base path: https://api.binance.com
  # Sub-account&#39;s Status on Margin/Futures (For Master Account)
  # - If no &#x60;email&#x60; sent, all sub-accounts&#39; information will be returned.  Weight(IP): 10
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param email character Sub-account email (optional)
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [array[InlineResponse20055]]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV1SubAccountSubTransferHistoryGet", {
  # tests for SapiV1SubAccountSubTransferHistoryGet
  # base path: https://api.binance.com
  # Sub-account Spot Asset Transfer History (For Master Account)
  # - fromEmail and toEmail cannot be sent at the same time. - Return fromEmail equal master account email by default.  Weight(IP): 1
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param from.email character Sub-account email (optional)
  # @param to.email character Sub-account email (optional)
  # @param start.time integer UTC timestamp in ms (optional)
  # @param end.time integer UTC timestamp in ms (optional)
  # @param page integer Default 1 (optional)
  # @param limit integer Default 1 (optional)
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [array[InlineResponse20048]]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV1SubAccountTransferSubToMasterPost", {
  # tests for SapiV1SubAccountTransferSubToMasterPost
  # base path: https://api.binance.com
  # Transfer to Master (For Sub-account)
  # Weight(IP): 1
  # @param asset character 
  # @param amount numeric 
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [InlineResponse20063]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV1SubAccountTransferSubToSubPost", {
  # tests for SapiV1SubAccountTransferSubToSubPost
  # base path: https://api.binance.com
  # Transfer to Sub-account of Same Master (For Sub-account)
  # Weight(IP): 1
  # @param to.email character Recipient email
  # @param asset character 
  # @param amount numeric 
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [InlineResponse20063]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV1SubAccountTransferSubUserHistoryGet", {
  # tests for SapiV1SubAccountTransferSubUserHistoryGet
  # base path: https://api.binance.com
  # Sub-account Transfer History (For Sub-account)
  # - If &#x60;type&#x60; is not sent, the records of type 2: transfer out will be returned by default. - If &#x60;startTime&#x60; and &#x60;endTime&#x60; are not sent, the recent 30-day data will be returned.  Weight(IP): 1
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param asset character  (optional)
  # @param type integer 1: transfer in  2:  transfer out (optional)
  # @param start.time integer UTC timestamp in ms (optional)
  # @param end.time integer UTC timestamp in ms (optional)
  # @param limit integer Default 500; max 1000. (optional)
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [array[InlineResponse20064]]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV1SubAccountUniversalTransferGet", {
  # tests for SapiV1SubAccountUniversalTransferGet
  # base path: https://api.binance.com
  # Universal Transfer History (For Master Account)
  # - fromEmail and toEmail cannot be sent at the same time. - Return fromEmail equal master account email by default. - Only get the latest history of past 30 days.  Weight(IP): 1
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param from.email character Sub-account email (optional)
  # @param to.email character Sub-account email (optional)
  # @param start.time integer UTC timestamp in ms (optional)
  # @param end.time integer UTC timestamp in ms (optional)
  # @param page integer Default 1 (optional)
  # @param limit character Default 500, Max 500 (optional)
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [array[InlineResponse20065]]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV1SubAccountUniversalTransferPost", {
  # tests for SapiV1SubAccountUniversalTransferPost
  # base path: https://api.binance.com
  # Universal Transfer (For Master Account)
  # - You need to enable \&quot;internal transfer\&quot; option for the api key which requests this endpoint. - Transfer from master account by default if fromEmail is not sent. - Transfer to master account by default if toEmail is not sent. - Transfer between futures accounts is not supported.  Weight(IP): 1
  # @param from.account.type character 
  # @param to.account.type character 
  # @param asset character 
  # @param amount numeric 
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param from.email character Sub-account email (optional)
  # @param to.email character Sub-account email (optional)
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [InlineResponse20066]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV1SubAccountVirtualSubAccountPost", {
  # tests for SapiV1SubAccountVirtualSubAccountPost
  # base path: https://api.binance.com
  # Create a Virtual Sub-account(For Master Account)
  # - This request will generate a virtual sub account under your master account. - You need to enable \&quot;trade\&quot; option for the api key which requests this endpoint.  Weight(IP): 1
  # @param sub.account.string character Please input a string. We will create a virtual email using that string for you to register
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [InlineResponse20046]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV2SubAccountFuturesAccountGet", {
  # tests for SapiV2SubAccountFuturesAccountGet
  # base path: https://api.binance.com
  # Detail on Sub-account&#39;s Futures Account V2 (For Master Account)
  # Weight(IP): 1
  # @param email character Sub-account email
  # @param futures.type integer 1:USDT Margined Futures  2:COIN Margined Futures
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [OneOfsubAccountUSDTFuturesDetailssubAccountCOINFuturesDetails]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV2SubAccountFuturesAccountSummaryGet", {
  # tests for SapiV2SubAccountFuturesAccountSummaryGet
  # base path: https://api.binance.com
  # Summary of Sub-account&#39;s Futures Account V2 (For Master Account)
  # Weight(IP): 10
  # @param futures.type integer 1:USDT Margined Futures  2:COIN Margined Futures
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param page integer Default 1 (optional)
  # @param limit character Default 10, Max 20 (optional)
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [OneOfsubAccountUSDTFuturesSummarysubAccountCOINFuturesSummary]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV2SubAccountFuturesPositionRiskGet", {
  # tests for SapiV2SubAccountFuturesPositionRiskGet
  # base path: https://api.binance.com
  # Futures Position-Risk of Sub-account V2 (For Master Account)
  # Weight(IP): 1
  # @param email character Sub-account email
  # @param futures.type integer 1:USDT Margined Futures  2:COIN Margined Futures
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [OneOfsubAccountUSDTFuturesPositionRisksubAccountCOINFuturesPositionRisk]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})

test_that("SapiV3SubAccountAssetsGet", {
  # tests for SapiV3SubAccountAssetsGet
  # base path: https://api.binance.com
  # Sub-account Assets (For Master Account)
  # Fetch sub-account assets  Weight(IP): 1
  # @param email character Sub-account email
  # @param timestamp integer UTC timestamp in ms
  # @param signature character Signature
  # @param recv.window integer The value cannot be greater than 60000 (optional)
  # @return [InlineResponse20051]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})
grahamjwhite/binanceRapi documentation built on Nov. 22, 2022, 9:37 p.m.