API bswap endpoints

Methods

bswapAddLiquidityPreview(poolId, type, quoteAsset, quoteQty, optionsopt)

Add Liquidity Preview (USER_DATA)

GET /sapi/v1/bswap/addLiquidityPreview

https://binance-docs.github.io/apidocs/spot/en/#add-liquidity-preview-user_data

Parameters:
NameTypeAttributesDescription
poolIdnumber
typestring

"SINGLE" for adding a single token;"COMBINATION" for adding dual tokens

quoteAssetstring
quoteQtynumber
optionsobject<optional>
Properties
NameTypeAttributesDescription
recvWindownumber<optional>

The value cannot be greater than 60000

bswapClaimRewards(optionsopt)

Claim rewards (TRADE)

POST /sapi/v1/bswap/claimRewards

https://binance-docs.github.io/apidocs/spot/en/#claim-rewards-trade

Parameters:
NameTypeAttributesDescription
optionsobject<optional>
Properties
NameTypeAttributesDescription
typenumber<optional>

0: Swap rewards,1:Liquidity rewards, default to 0

recvWindownumber<optional>

The value cannot be greater than 60000

bswapClaimedHistory(optionsopt)

Get Claimed History (USER_DATA)

GET /sapi/v1/bswap/claimedHistory

https://binance-docs.github.io/apidocs/spot/en/#get-claimed-history-user_data

Parameters:
NameTypeAttributesDescription
optionsobject<optional>
Properties
NameTypeAttributesDescription
poolIdnumber<optional>
assetRewardsstring<optional>
typenumber<optional>

0: Swap rewards,1:Liquidity rewards, default to 0

startTimenumber<optional>
endTimenumber<optional>
limitnumber<optional>

default 3, max 100

recvWindownumber<optional>

The value cannot be greater than 60000

bswapGetPoolConfig(optionsopt)

Get Pool Configure (USER_DATA)

GET /sapi/v1/bswap/poolConfigure

https://binance-docs.github.io/apidocs/spot/en/#get-pool-configure-user_data

Parameters:
NameTypeAttributesDescription
optionsobject<optional>
Properties
NameTypeAttributesDescription
poolIdnumber<optional>
recvWindownumber<optional>

The value cannot be greater than 60000

bswapLiquidity(optionsopt)

Get liquidity information of a pool (USER_DATA)

GET /sapi/v1/bswap/liquidity

https://binance-docs.github.io/apidocs/spot/en/#get-liquidity-information-of-a-pool-user_data

Parameters:
NameTypeAttributesDescription
optionsobject<optional>
Properties
NameTypeAttributesDescription
poolIdnumber<optional>
recvWindownumber<optional>

The value cannot be greater than 60000

bswapLiquidityAdd(poolId, asset, quantity, optionsopt)

Add Liquidity (TRADE)

POST /sapi/v1/bswap/liquidityAdd

https://binance-docs.github.io/apidocs/spot/en/#add-liquidity-trade

Parameters:
NameTypeAttributesDescription
poolIdnumber
assetstring
quantitynumber
optionsobject<optional>
Properties
NameTypeAttributesDescription
typestring<optional>

"Single" to add a single token; "Combination" to add dual tokens. Default "Single"

recvWindownumber<optional>

The value cannot be greater than 60000

bswapLiquidityOperationRecord(optionsopt)

Get Liquidity Operation Record (USER_DATA)

GET /sapi/v1/bswap/liquidityOps

https://binance-docs.github.io/apidocs/spot/en/#get-liquidity-operation-record-user_data

Parameters:
NameTypeAttributesDescription
optionsobject<optional>
Properties
NameTypeAttributesDescription
operationIdnumber<optional>
poolIdnumber<optional>
operationstring<optional>

ADD or REMOVE

startTimenumber<optional>
endTimenumber<optional>
limitnumber<optional>

default 3, max 100

recvWindownumber<optional>

The value cannot be greater than 60000

bswapLiquidityRemove(poolId, type, asset, shareAmount, optionsopt)

Remove Liquidity (TRADE)

POST /sapi/v1/bswap/liquidityRemove

https://binance-docs.github.io/apidocs/spot/en/#remove-liquidity-trade

Parameters:
NameTypeAttributesDescription
poolIdnumber
typestring

SINGLE for single asset removal, COMBINATION for combination of all coins removal

assetstring
shareAmountnumber
optionsobject<optional>
Properties
NameTypeAttributesDescription
recvWindownumber<optional>

The value cannot be greater than 60000

bswapPools()

List All Swap Pools (MARKET_DATA)

GET /sapi/v1/bswap/pools

Get metadata about all swap pools.

https://binance-docs.github.io/apidocs/spot/en/#list-all-swap-pools-market_data

bswapRemoveLiquidityPreview(poolId, type, quoteAsset, shareAmount, optionsopt)

Remove Liquidity Preview (USER_DATA)

GET /sapi/v1/bswap/removeLiquidityPreview

https://binance-docs.github.io/apidocs/spot/en/#remove-liquidity-preview-user_data

Parameters:
NameTypeAttributesDescription
poolIdnumber
typestring

Type is "SINGLE", remove and obtain a single token;Type is "COMBINATION", remove and obtain dual token.

quoteAssetstring
shareAmountnumber
optionsobject<optional>
Properties
NameTypeAttributesDescription
recvWindownumber<optional>

The value cannot be greater than 60000

bswapRequestQuote(quoteAsset, baseAsset, quoteQty, optionsopt)

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.

GET /sapi/v1/bswap/quote

https://binance-docs.github.io/apidocs/spot/en/#request-quote-user_data

Parameters:
NameTypeAttributesDescription
quoteAssetstring
baseAssetstring
quoteQtynumber
optionsobject<optional>
Properties
NameTypeAttributesDescription
recvWindownumber<optional>

The value cannot be greater than 60000

bswapSwap(quoteAsset, baseAsset, quoteQty, optionsopt)

Parameters:
NameTypeAttributesDescription
quoteAssetstring
baseAssetstring
quoteQtynumber
optionsobject<optional>
Properties
NameTypeAttributesDescription
recvWindownumber<optional>

The value cannot be greater than 60000

bswapSwapHistory(optionsopt)

Get Swap History (USER_DATA)

GET /sapi/v1/bswap/swap

https://binance-docs.github.io/apidocs/spot/en/#swap-trade

Parameters:
NameTypeAttributesDescription
optionsobject<optional>
Properties
NameTypeAttributesDescription
swapIdstring<optional>
startTimenumber<optional>
endTimenumber<optional>
statusnumber<optional>

0: pending for swap, 1: success, 2: failed

baseAssetstring<optional>
quoteAssetstring<optional>
limitnumber<optional>

default 3, max 100

recvWindownumber<optional>

The value cannot be greater than 60000

bswapUnclaimedRewards(optionsopt)

Get Unclaimed Rewards Record (USER_DATA)

GET /sapi/v1/bswap/unclaimedRewards

https://binance-docs.github.io/apidocs/spot/en/#get-unclaimed-rewards-record-user_data

Parameters:
NameTypeAttributesDescription
optionsobject<optional>
Properties
NameTypeAttributesDescription
typenumber<optional>

0: Swap rewards,1:Liquidity rewards, default to 0

recvWindownumber<optional>

The value cannot be greater than 60000