# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
context("Test MarginApi")
api.instance <- MarginApi$new()
test_that("SapiV1BnbBurnGet", {
# tests for SapiV1BnbBurnGet
# base path: https://api.binance.com
# Get All Isolated Margin Symbol(USER_DATA)
# 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 [BnbBurnStatus]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1BnbBurnPost", {
# tests for SapiV1BnbBurnPost
# base path: https://api.binance.com
# Toggle BNB Burn On Spot Trade And Margin Interest (USER_DATA)
# - \"spotBNBBurn\" and \"interestBNBBurn\" should be sent at least one. Weight(IP): 1
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param spot.bnb.burn character Determines whether to use BNB to pay for trading fees on SPOT (optional)
# @param interest.bnb.burn character Determines whether to use BNB to pay for margin loan's interest (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [BnbBurnStatus]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginAccountGet", {
# tests for SapiV1MarginAccountGet
# base path: https://api.binance.com
# Query Cross Margin Account Details (USER_DATA)
# 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 [InlineResponse20019]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginAllAssetsGet", {
# tests for SapiV1MarginAllAssetsGet
# base path: https://api.binance.com
# Get All Margin Assets (MARKET_DATA)
# Weight(IP): 1
# @return [array[InlineResponse20014]]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginAllOrderListGet", {
# tests for SapiV1MarginAllOrderListGet
# base path: https://api.binance.com
# Query Margin Account's all OCO (USER_DATA)
# Retrieves all OCO for a specific margin account based on provided optional parameters Weight(IP): 200
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param is.isolated character For isolated margin or not, 'TRUE', 'FALSE', default 'FALSE' (optional)
# @param symbol character Mandatory for isolated margin, not supported for cross margin (optional)
# @param from.id character If supplied, neither `startTime` or `endTime` can be provided (optional)
# @param start.time integer UTC timestamp in ms (optional)
# @param end.time integer UTC timestamp in ms (optional)
# @param limit integer Default Value: 500; Max Value: 1000 (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [array[InlineResponse2006]]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginAllOrdersGet", {
# tests for SapiV1MarginAllOrdersGet
# base path: https://api.binance.com
# Query Margin Account's All Orders (USER_DATA)
# - If `orderId` is set, it will get orders >= that orderId. Otherwise most recent orders are returned. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. Weight(IP): 200 Request Limit: 60 times/min per IP
# @param symbol character Trading symbol, e.g. BNBUSDT
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param is.isolated character For isolated margin or not, 'TRUE', 'FALSE', default 'FALSE' (optional)
# @param order.id integer Order id (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[MarginOrderDetail]]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginAllPairsGet", {
# tests for SapiV1MarginAllPairsGet
# base path: https://api.binance.com
# Get All Cross Margin Pairs (MARKET_DATA)
# Weight(IP): 1
# @return [array[InlineResponse20015]]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginAssetGet", {
# tests for SapiV1MarginAssetGet
# base path: https://api.binance.com
# Query Margin Asset (MARKET_DATA)
# Weight(IP): 10
# @param asset character
# @return [InlineResponse20012]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginForceLiquidationRecGet", {
# tests for SapiV1MarginForceLiquidationRecGet
# base path: https://api.binance.com
# Get Force Liquidation Record (USER_DATA)
# - Response in descending order Weight(IP): 1
# @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 isolated.symbol character Isolated symbol (optional)
# @param current integer Current querying page. Start from 1. Default:1 (optional)
# @param size integer Default:10 Max:100 (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [InlineResponse20018]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginInterestHistoryGet", {
# tests for SapiV1MarginInterestHistoryGet
# base path: https://api.binance.com
# Get Interest History (USER_DATA)
# - Response in descending order - If `isolatedSymbol` is not sent, crossed margin data will be returned - Set `archived` to `true` to query data from 6 months ago - `type` in response has 4 enums: - `PERIODIC` interest charged per hour - `ON_BORROW` first interest charged on borrow - `PERIODIC_CONVERTED` interest charged per hour converted into BNB - `ON_BORROW_CONVERTED` first interest charged on borrow converted into BNB Weight(IP): 1
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param asset character (optional)
# @param isolated.symbol character Isolated symbol (optional)
# @param start.time integer UTC timestamp in ms (optional)
# @param end.time integer UTC timestamp in ms (optional)
# @param current integer Current querying page. Start from 1. Default:1 (optional)
# @param size integer Default:10 Max:100 (optional)
# @param archived character Default: false. Set to true for archived data from 6 months ago (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [InlineResponse20017]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginInterestRateHistoryGet", {
# tests for SapiV1MarginInterestRateHistoryGet
# base path: https://api.binance.com
# Margin Interest Rate History (USER_DATA)
# Weight(IP): 1
# @param asset character
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param vip.level integer Defaults to user's vip level (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[InlineResponse20028]]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginIsolatedAccountDelete", {
# tests for SapiV1MarginIsolatedAccountDelete
# base path: https://api.binance.com
# Disable Isolated Margin Account (TRADE)
# Disable isolated margin account for a specific symbol. Each trading pair can only be deactivated once every 24 hours . Weight(UID): 300
# @param symbol character Trading symbol, e.g. BNBUSDT
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [InlineResponse20025]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginIsolatedAccountGet", {
# tests for SapiV1MarginIsolatedAccountGet
# base path: https://api.binance.com
# Query Isolated Margin Account Info (USER_DATA)
# - If \"symbols\" is not sent, all isolated assets will be returned. - If \"symbols\" is sent, only the isolated assets of the sent symbols will be returned. Weight(IP): 10
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param symbols character Max 5 symbols can be sent; separated by ',' (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [IsolatedMarginAccountInfo]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginIsolatedAccountLimitGet", {
# tests for SapiV1MarginIsolatedAccountLimitGet
# base path: https://api.binance.com
# Query Enabled Isolated Margin Account Limit (USER_DATA)
# Query enabled isolated margin account limit. 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 [InlineResponse20026]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginIsolatedAccountPost", {
# tests for SapiV1MarginIsolatedAccountPost
# base path: https://api.binance.com
# Enable Isolated Margin Account (TRADE)
# Enable isolated margin account for a specific symbol. Weight(UID): 300
# @param symbol character Trading symbol, e.g. BNBUSDT
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [InlineResponse20025]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginIsolatedAllPairsGet", {
# tests for SapiV1MarginIsolatedAllPairsGet
# base path: https://api.binance.com
# Get All Isolated Margin Symbol(USER_DATA)
# 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 [array[InlineResponse20027]]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginIsolatedPairGet", {
# tests for SapiV1MarginIsolatedPairGet
# base path: https://api.binance.com
# Query Isolated Margin Symbol (USER_DATA)
# Weight(IP): 10
# @param symbol character Trading symbol, e.g. BNBUSDT
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [InlineResponse20027]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginIsolatedTransferGet", {
# tests for SapiV1MarginIsolatedTransferGet
# base path: https://api.binance.com
# Get Isolated Margin Transfer History (USER_DATA)
# Weight(IP): 1
# @param symbol character Trading symbol, e.g. BNBUSDT
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param asset character (optional)
# @param trans.from character (optional)
# @param trans.to character (optional)
# @param start.time integer UTC timestamp in ms (optional)
# @param end.time integer UTC timestamp in ms (optional)
# @param current integer Current querying page. Start from 1. Default:1 (optional)
# @param size integer Default:10 Max:100 (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [MarginTransferDetails]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginIsolatedTransferPost", {
# tests for SapiV1MarginIsolatedTransferPost
# base path: https://api.binance.com
# Isolated Margin Account Transfer (MARGIN)
# Weight(UID): 600
# @param asset character
# @param symbol character Trading symbol, e.g. BNBUSDT
# @param amount numeric
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param trans.from character (optional)
# @param trans.to character (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [object]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginLoanGet", {
# tests for SapiV1MarginLoanGet
# base path: https://api.binance.com
# Query Loan Record (USER_DATA)
# - `txId` or `startTime` must be sent. `txId` takes precedence. - Response in descending order - If `isolatedSymbol` is not sent, crossed margin data will be returned - Set `archived` to `true` to query data from 6 months ago Weight(IP): 10
# @param asset character
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param isolated.symbol character Isolated symbol (optional)
# @param tx.id integer the tranId in `POST /sapi/v1/margin/loan` (optional)
# @param start.time integer UTC timestamp in ms (optional)
# @param end.time integer UTC timestamp in ms (optional)
# @param current integer Current querying page. Start from 1. Default:1 (optional)
# @param size integer Default:10 Max:100 (optional)
# @param archived character Default: false. Set to true for archived data from 6 months ago (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [InlineResponse20010]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginLoanPost", {
# tests for SapiV1MarginLoanPost
# base path: https://api.binance.com
# Margin Account Borrow (MARGIN)
# Apply for a loan. - If \"isIsolated\" = \"TRUE\", \"symbol\" must be sent - \"isIsolated\" = \"FALSE\" for crossed margin loan Weight(UID): 3000
# @param asset character
# @param amount numeric
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param is.isolated character For isolated margin or not, 'TRUE', 'FALSE', default 'FALSE' (optional)
# @param symbol character Trading symbol, e.g. BNBUSDT (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [Transaction]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginMaxBorrowableGet", {
# tests for SapiV1MarginMaxBorrowableGet
# base path: https://api.binance.com
# Query Max Borrow (USER_DATA)
# - If `isolatedSymbol` is not sent, crossed margin data will be sent. - `borrowLimit` is also available from https://www.binance.com/en/margin-fee Weight(IP): 50
# @param asset character
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param isolated.symbol character Isolated symbol (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [InlineResponse20023]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginMaxTransferableGet", {
# tests for SapiV1MarginMaxTransferableGet
# base path: https://api.binance.com
# Query Max Transfer-Out Amount (USER_DATA)
# - If `isolatedSymbol` is not sent, crossed margin data will be sent. Weight(IP): 50
# @param asset character
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param isolated.symbol character Isolated symbol (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [InlineResponse20024]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginMyTradesGet", {
# tests for SapiV1MarginMyTradesGet
# base path: https://api.binance.com
# Query Margin Account's Trade List (USER_DATA)
# - If `fromId` is set, it will get orders >= that `fromId`. Otherwise most recent trades are returned. Weight(IP): 10
# @param symbol character Trading symbol, e.g. BNBUSDT
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param is.isolated character For isolated margin or not, 'TRUE', 'FALSE', default 'FALSE' (optional)
# @param start.time integer UTC timestamp in ms (optional)
# @param end.time integer UTC timestamp in ms (optional)
# @param from.id integer Trade id to fetch from. Default gets most recent trades. (optional)
# @param limit integer Default 500; max 1000. (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [array[MarginTrade]]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginOpenOrderListGet", {
# tests for SapiV1MarginOpenOrderListGet
# base path: https://api.binance.com
# Query Margin Account's Open OCO (USER_DATA)
# Weight(IP): 10
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param is.isolated character For isolated margin or not, 'TRUE', 'FALSE', default 'FALSE' (optional)
# @param symbol character Mandatory for isolated margin, not supported for cross margin (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [array[InlineResponse20022]]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginOpenOrdersDelete", {
# tests for SapiV1MarginOpenOrdersDelete
# base path: https://api.binance.com
# Margin Account Cancel all Open Orders on a Symbol (TRADE)
# - Cancels all active orders on a symbol for margin account. - This includes OCO orders. Weight(IP): 1
# @param symbol character Trading symbol, e.g. BNBUSDT
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param is.isolated character For isolated margin or not, 'TRUE', 'FALSE', default 'FALSE' (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [array[AnyOfcanceledMarginOrderDetailmarginOcoOrder]]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginOpenOrdersGet", {
# tests for SapiV1MarginOpenOrdersGet
# base path: https://api.binance.com
# Query Margin Account's Open Orders (USER_DATA)
# - If the `symbol` is not sent, orders for all symbols will be returned in an array. - When all symbols are returned, the number of requests counted against the rate limiter is equal to the number of symbols currently trading on the exchange - If isIsolated =\"TRUE\", symbol must be sent. Weight(IP): 10
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param symbol character Trading symbol, e.g. BNBUSDT (optional)
# @param is.isolated character For isolated margin or not, 'TRUE', 'FALSE', default 'FALSE' (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [array[MarginOrderDetail]]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginOrderDelete", {
# tests for SapiV1MarginOrderDelete
# base path: https://api.binance.com
# Margin Account Cancel Order (TRADE)
# Cancel an active order for margin account. Either `orderId` or `origClientOrderId` must be sent. Weight(IP): 10
# @param symbol character Trading symbol, e.g. BNBUSDT
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param is.isolated character For isolated margin or not, 'TRUE', 'FALSE', default 'FALSE' (optional)
# @param order.id integer Order id (optional)
# @param orig.client.order.id character Order id from client (optional)
# @param new.client.order.id character Used to uniquely identify this cancel. Automatically generated by default (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [MarginOrder]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginOrderGet", {
# tests for SapiV1MarginOrderGet
# base path: https://api.binance.com
# Query Margin Account's Order (USER_DATA)
# - Either `orderId` or `origClientOrderId` must be sent. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. Weight(IP): 10
# @param symbol character Trading symbol, e.g. BNBUSDT
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param is.isolated character For isolated margin or not, 'TRUE', 'FALSE', default 'FALSE' (optional)
# @param order.id integer Order id (optional)
# @param orig.client.order.id character Order id from client (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [MarginOrderDetail]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginOrderListDelete", {
# tests for SapiV1MarginOrderListDelete
# base path: https://api.binance.com
# Margin Account Cancel OCO (TRADE)
# Cancel an entire Order List for a margin account - Canceling an individual leg will cancel the entire OCO - Either `orderListId` or `listClientOrderId` must be provided Weight(UID): 1
# @param symbol character Trading symbol, e.g. BNBUSDT
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param is.isolated character For isolated margin or not, 'TRUE', 'FALSE', default 'FALSE' (optional)
# @param order.list.id integer Order list id (optional)
# @param list.client.order.id character A unique Id for the entire orderList (optional)
# @param new.client.order.id character Used to uniquely identify this cancel. Automatically generated by default (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [MarginOcoOrder]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginOrderListGet", {
# tests for SapiV1MarginOrderListGet
# base path: https://api.binance.com
# Query Margin Account's OCO (USER_DATA)
# Retrieves a specific OCO based on provided optional parameters - Either `orderListId` or `origClientOrderId` must be provided Weight(IP): 10
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param is.isolated character For isolated margin or not, 'TRUE', 'FALSE', default 'FALSE' (optional)
# @param symbol character Mandatory for isolated margin, not supported for cross margin (optional)
# @param order.list.id integer Order list id (optional)
# @param orig.client.order.id character Order id from client (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [InlineResponse20021]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginOrderOcoPost", {
# tests for SapiV1MarginOrderOcoPost
# base path: https://api.binance.com
# Margin Account New OCO (TRADE)
# Send in a new OCO for a margin account - Price Restrictions: - SELL: Limit Price > Last Price > Stop Price - BUY: Limit Price < Last Price < Stop Price - Quantity Restrictions: - Both legs must have the same quantity - ICEBERG quantities however do not have to be the same. - Order Rate Limit - OCO counts as 2 orders against the order rate limit. Weight(UID): 6
# @param symbol character Trading symbol, e.g. BNBUSDT
# @param side character SELL or BUY
# @param quantity numeric
# @param price numeric Order price
# @param stop.price numeric
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param is.isolated character For isolated margin or not, 'TRUE', 'FALSE', default 'FALSE' (optional)
# @param list.client.order.id character A unique Id for the entire orderList (optional)
# @param limit.client.order.id character A unique Id for the limit order (optional)
# @param limit.iceberg.qty numeric (optional)
# @param stop.client.order.id character A unique Id for the stop loss/stop loss limit leg (optional)
# @param stop.limit.price numeric If provided, stopLimitTimeInForce is required. (optional)
# @param stop.iceberg.qty numeric (optional)
# @param stop.limit.time.in.force character (optional)
# @param new.order.resp.type character Set the response JSON. (optional)
# @param side.effect.type character Default NO_SIDE_EFFECT (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [InlineResponse20020]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginOrderPost", {
# tests for SapiV1MarginOrderPost
# base path: https://api.binance.com
# Margin Account New Order (TRADE)
# Post a new order for margin account. Weight(UID): 6
# @param symbol character Trading symbol, e.g. BNBUSDT
# @param side character SELL or BUY
# @param type character Order type
# @param quantity numeric
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param is.isolated character For isolated margin or not, 'TRUE', 'FALSE', default 'FALSE' (optional)
# @param quote.order.qty numeric Quote quantity (optional)
# @param price numeric Order price (optional)
# @param stop.price numeric Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. (optional)
# @param new.client.order.id character Used to uniquely identify this cancel. Automatically generated by default (optional)
# @param iceberg.qty numeric Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. (optional)
# @param new.order.resp.type character Set the response JSON. (optional)
# @param side.effect.type character Default NO_SIDE_EFFECT (optional)
# @param time.in.force character Order time in force (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [OneOfmarginOrderResponseAckmarginOrderResponseResultmarginOrderResponseFull]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginPairGet", {
# tests for SapiV1MarginPairGet
# base path: https://api.binance.com
# Query Cross Margin Pair (MARKET_DATA)
# Weight(IP): 10
# @param symbol character Trading symbol, e.g. BNBUSDT
# @return [InlineResponse20013]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginPriceIndexGet", {
# tests for SapiV1MarginPriceIndexGet
# base path: https://api.binance.com
# Query Margin PriceIndex (MARKET_DATA)
# Weight(IP): 10
# @param symbol character Trading symbol, e.g. BNBUSDT
# @return [InlineResponse20016]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginRepayGet", {
# tests for SapiV1MarginRepayGet
# base path: https://api.binance.com
# Query Repay Record (USER_DATA)
# - `txId` or `startTime` must be sent. `txId` takes precedence. - Response in descending order - If `isolatedSymbol` is not sent, crossed margin data will be returned - Set `archived` to `true` to query data from 6 months ago Weight(IP): 10
# @param asset character
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param isolated.symbol character Isolated symbol (optional)
# @param tx.id integer the tranId in `POST /sapi/v1/margin/repay` (optional)
# @param start.time integer UTC timestamp in ms (optional)
# @param end.time integer UTC timestamp in ms (optional)
# @param current integer Current querying page. Start from 1. Default:1 (optional)
# @param size integer Default:10 Max:100 (optional)
# @param archived character Default: false. Set to true for archived data from 6 months ago (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [InlineResponse20011]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginRepayPost", {
# tests for SapiV1MarginRepayPost
# base path: https://api.binance.com
# Margin Account Repay (MARGIN)
# Repay loan for margin account. - If \"isIsolated\" = \"TRUE\", \"symbol\" must be sent - \"isIsolated\" = \"FALSE\" for crossed margin repay Weight(IP): 3000
# @param asset character
# @param amount numeric
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param is.isolated character For isolated margin or not, 'TRUE', 'FALSE', default 'FALSE' (optional)
# @param symbol character Trading symbol, e.g. BNBUSDT (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [Transaction]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginTransferGet", {
# tests for SapiV1MarginTransferGet
# base path: https://api.binance.com
# Get Cross Margin Transfer History (USER_DATA)
# - Response in descending order - Returns data for last 7 days by default - Set `archived` to `true` to query data from 6 months ago Weight(IP): 1
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param asset character (optional)
# @param type character Tranfer Type (optional)
# @param start.time integer UTC timestamp in ms (optional)
# @param end.time integer UTC timestamp in ms (optional)
# @param current integer Current querying page. Start from 1. Default:1 (optional)
# @param size integer Default:10 Max:100 (optional)
# @param archived character Default: false. Set to true for archived data from 6 months ago (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [InlineResponse2009]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1MarginTransferPost", {
# tests for SapiV1MarginTransferPost
# base path: https://api.binance.com
# Cross Margin Account Transfer (MARGIN)
# Execute transfer between spot account and cross margin account. Weight(IP): 600
# @param asset character
# @param amount numeric
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param type integer 1 -> transfer from main account to margin account \\ 2 -> transfer from margin account to main account (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [Transaction]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.