WALLET: Swap Currencies
The Swap/Convert system is an easy and efficient solution that allows for quick and cheap conversions between currencies and digital assets.
Note: This function is only available for the HYBRID wallet (trading wallet).
Important: When converting ordinary currencies (BTC, ETH, USD, EUR, etc.) to Tokens (from ICOs), the 'destination_token_uuid' field must always be added to precisely and correctly identify the token in context. if the 'destination_token_uuid' is omitted, the system will interpret the 'destination_currency' field as a symbol for a generally available crypto or fiat currency. When sending Tokens, the 'destination_currency' field can be omitted and is ignored.
The Swap/Convert system is an easy and efficient solution that allows for quick and cheap conversions between currencies and digital assets.
Note: This function is only available for the HYBRID wallet (trading wallet).
Important: When converting ordinary currencies (BTC, ETH, USD, EUR, etc.) to Tokens (from ICOs), the 'destination_token_uuid' field must always be added to precisely and correctly identify the token in context. if the 'destination_token_uuid' is omitted, the system will interpret the 'destination_currency' field as a symbol for a generally available crypto or fiat currency. When sending Tokens, the 'destination_currency' field can be omitted and is ignored.
(The list of availble ICO Tokens can be pulled from the "Get All Available ICO Tokens" Endpoint.)
{"source_currency":"USDT","destination_currency":"BTC","source_amount":10,"2fa_code":"123456"}OK
POST /api/v1/wallet/swap HTTP/1.1
Host: api.hybrid-chain.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 94
{
"source_currency": "USDT",
"destination_currency": "BTC",
"source_amount": 10,
"2fa_code": "123456"
}OK
{
"data": {
"dest_amount": 0.266633,
"exchange_rate": 2673,
"uuid": "b1e047e96e91436ba7daa9f0cdf7346a"
},
"message": "Conversion of 0.0001 ETH to USDC",
"success": true
}Last updated
Was this helpful?

