<aside> ⚠️

This is a comprehensive API reference that covers all our B2B endpoints. However, we recommend using one of our available SDKs whenever possible, to avoid introducing points of failure and doing extra work.

</aside>

Listing currencies

Request

GET <https://b2b.swapduck.space/currencies/list>

Response

Key Type Remarks
data.currencies[].id.name string
data.currencies[].id.network string
data.currencies[].createdAt number UNIX timestamp
data.currencies[].isActive boolean
data.currencies[].bestchangeId string ID for the BestChange XML file
data.currencies[].precisionDecimals number
data.currencies[].logoUrl string
data.currencies[].type string CRYPTO
CASH
PAYSYS
BANK
data.currencies[].isMemo boolean Marker whether the currency requires memo for deposits/withdrawals
data.currencies[].description string Additional info about the currency

Getting a rate estimation

Request

POST <https://b2b.swapduck.space/rates/estimate>
Key Type Remarks
amountLeft string Amount of currency to be exchanged
currencyLeftName string Deposit currency
currencyLeftNetwork string
currencyRightName string Withdrawal currency
currencyRightNetwork string
partnerID string Your partner ID

Response

Key Type Remarks
data.amountLeft string Amount of currency to be exchanged
data.amountRight string Estimated amount to be received
data.amountLeftUsdt string
data.amountRightUsdt string
data.exchangeStrategyId string Rate calculation reference, can be passed to us for debug purposes
data.appliedNetworkFee string
data.hash string Optional for B2B API
data.minAmount string Min amount of currency to be exchanged
data.maxAmount string Max amount of currency to be exchanged
data.quotes.sellQuote.baseValue string
data.quotes.sellQuote.quoteValue string
data.quotes.buyQuote.baseValue string
data.quotes.buyQuote.quoteValue string

Creating an order

Request

POST <https://b2b.swapduck.space/order/create>
Key Type Remarks
currencyLeft.name string
currencyLeft.network string
currencyRight.name string
currencyRight.network string
exchangeStrategyId string Can be mapped from estimation.exchangeStrategyId
estimatedRate string Estimation info: JSON.stringify({ appliedNetworkFee, amountLeft, amountRight, quotes })
estimatedAmountLeft string Can be mapped from estimation.amountLeft
estimatedAmountRight string Can be mapped from estimation.amountRight
estimatedNetworkFee string Can be mapped from estimation.appliedNetworkFee
partnerId string
withdrawalAddress string Please make sure to save this value on your side - it will be required to access order info later
withdrawalAddressMemo string, optional
notificationEmail string, optional
markupPercentage string, optional More about markup here

Response

Key Type Remarks
data.id string Your newly created order ID

Getting order info

Request