Create Auto Swap Address for End User
Endpoint that allows the creation of a auto swap deposit address for a given end user. This endpoint behaves idempontently for a given user and any of the networks from a network family.
Auto Swap is a feature that allows you to create a deposit address, and any deposit you make will be automatically swapped for a pre-defined asset (contact the admin to set this value) and then withdrawn to the desired target address.
Important Notes:
- The swap will be executed at the best market price obtained after your deposit is confirmed. In other words, this is an open-price model, so there are no guarantees or held-quotes on the final price obtained before the deposit happens.
- Trading and withdrawal fees will be deducted before the converted funds are sent to your target address.
Authorizations
B2B’s White Label API uses OAuth2. Currently there is only one supported authentication flow:
- clientCredentials allows you to access your own B2B account (First-Party Integration) and performs transactions against the public API. This oauth2 flow is well suited for this API, as it allows machine-to-machine communication.
Every call to the API has to be authenticated with an OAuth2 Token. In order to request this token, you will need to have sandbox or production API Keys (client id and client secret) that will be needed to generate a credential in order to negotiate an ephemeral access token.
Every request must be accompianed by an Authorization
header with a value that follows the following schema: Bearer ACCESS_TOKEN
Path Parameters
End user's external ref, usually a uuid.
Body
Represents the crypto network that will be used to create an address.
BITCOIN
, BITCOIN_TESTNET
, ETHEREUM
, ETHEREUM_SEPOLIA
Represents the desired address to send the funds after a successful swap.
Response
BITCOIN
, ETHEREUM
, BITCOIN_TESTNET
, ETHEREUM_SEPOLIA
, POLYGON
, POLYGON_MUMBAI
End user's external ref, usually a uuid.
Address where the assets for AutoSwap should be sent.
Address where assets will be sent after AutoSwap process.
Last six characters of The Extended Public Key.
Address derivation path, for addresses generated before April 2025, this value will be null.
Was this page helpful?