# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
context("Test BSwapApi")
api.instance <- BSwapApi$new()
test_that("SapiV1BswapAddLiquidityPreviewGet", {
# tests for SapiV1BswapAddLiquidityPreviewGet
# base path: https://api.binance.com
# Add Liquidity Preview (USER_DATA)
# Calculate expected share amount for adding liquidity in single or dual token. Weight(IP): 150
# @param pool.id integer
# @param type character \"SINGLE\" for adding a single token;\"COMBINATION\" for adding dual tokens
# @param quote.asset character
# @param quote.qty 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 [OneOfbswapAddLiquidityPreviewCombinationbswapAddLiquidityPreviewSingle]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1BswapLiquidityAddPost", {
# tests for SapiV1BswapLiquidityAddPost
# base path: https://api.binance.com
# Add Liquidity (TRADE)
# Add liquidity to a pool. Weight(UID): 1000 (Additional: 3 times one second)
# @param pool.id integer
# @param asset character
# @param quantity 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 [InlineResponse200105]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1BswapLiquidityGet", {
# tests for SapiV1BswapLiquidityGet
# base path: https://api.binance.com
# Liquidity information of a pool (USER_DATA)
# Get liquidity information and user share of a pool. Weight(IP):\\ `1` for one pool;\\ `10` when the poolId parameter is omitted;
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param pool.id integer (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [array[InlineResponse200104]]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1BswapLiquidityOpsGet", {
# tests for SapiV1BswapLiquidityOpsGet
# base path: https://api.binance.com
# Liquidity Operation Record (USER_DATA)
# Get liquidity operation (add/remove) records. Weight(UID): 3000
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param operation.id integer (optional)
# @param pool.id integer (optional)
# @param operation character (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[InlineResponse200106]]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1BswapLiquidityRemovePost", {
# tests for SapiV1BswapLiquidityRemovePost
# base path: https://api.binance.com
# Remove Liquidity (TRADE)
# Remove liquidity from a pool, `type` include `SINGLE` and `COMBINATION`, asset is mandatory for single asset removal Weight(UID): 1000 (Additional: 3 times one second)
# @param pool.id integer
# @param type character Can be `SINGLE` for single asset removal, `COMBINATION` for combination of all coins removal
# @param share.amount numeric
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param asset character Mandatory for single asset removal (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [InlineResponse200105]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1BswapPoolConfigureGet", {
# tests for SapiV1BswapPoolConfigureGet
# base path: https://api.binance.com
# Pool Configure (USER_DATA)
# Weight(IP): 150
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param pool.id integer (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [array[InlineResponse200110]]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1BswapPoolsGet", {
# tests for SapiV1BswapPoolsGet
# base path: https://api.binance.com
# List All Swap Pools (MARKET_DATA)
# Get metadata about all swap pools. Weight(IP): 1
# @return [array[InlineResponse200103]]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1BswapQuoteGet", {
# tests for SapiV1BswapQuoteGet
# base path: https://api.binance.com
# Request Quote (USER_DATA)
# Request a quote for swap quote asset (selling asset) for base asset (buying asset), essentially price/exchange rates. quoteQty is quantity of quote asset (to sell). Please be noted the quote is for reference only, the actual price will change as the liquidity changes, it's recommended to swap immediate after request a quote for slippage prevention. Weight(UID): 150
# @param quote.asset character
# @param base.asset character
# @param quote.qty 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 [InlineResponse200107]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1BswapRemoveLiquidityPreviewGet", {
# tests for SapiV1BswapRemoveLiquidityPreviewGet
# base path: https://api.binance.com
# Remove Liquidity Preview (USER_DATA)
# Calculate the expected asset amount of single token redemption or dual token redemption. Weight(IP): 150
# @param pool.id integer
# @param type character Type is \"SINGLE\", remove and obtain a single token;Type is \"COMBINATION\", remove and obtain dual token.
# @param quote.asset character
# @param share.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 [OneOfbswapRmvLiquidityPreviewCombinationbswapRmvLiquidityPreviewSingle]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1BswapSwapGet", {
# tests for SapiV1BswapSwapGet
# base path: https://api.binance.com
# Swap History (USER_DATA)
# Get swap history. Weight(UID): 3000
# @param timestamp integer UTC timestamp in ms
# @param signature character Signature
# @param swap.id integer (optional)
# @param start.time integer UTC timestamp in ms (optional)
# @param end.time integer UTC timestamp in ms (optional)
# @param status integer 0: pending for swap, 1: success, 2: failed (optional)
# @param quote.asset character (optional)
# @param base.asset character (optional)
# @param limit integer default 3, max 100 (optional)
# @param recv.window integer The value cannot be greater than 60000 (optional)
# @return [array[InlineResponse200108]]
# uncomment below to test the operation
#expect_equal(result, "EXPECTED_RESULT")
})
test_that("SapiV1BswapSwapPost", {
# tests for SapiV1BswapSwapPost
# base path: https://api.binance.com
# Swap (TRADE)
# Swap `quoteAsset` for `baseAsset`. Weight(UID): 1000 (Additional: 3 times one second)
# @param quote.asset character
# @param base.asset character
# @param quote.qty 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 [InlineResponse200109]
# 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.