Swap channel
Swap
A swap is an agreement or a derivative contract between two parties for a financial exchange
To access detailed information about a specific swap from the Tulu Switch API, you can utilize a POST request directed at the swap endpoint. Below is an example employing cURL:
let headersList = {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXV
CJ9.eyJyb2xlaWQiOiI2NDEiLCJ1c2VySWQiOiI4MzR
kNDVmZS0xZjVkLTQ1YTItYmRiZi05ZmQ3NTFkNTliMT
YiLCJpYXQiOjE3MTAxNDEwOTIsImV4cCI6MTcxMDIyN
zQ5Mn0.Uheu2Sf3spkA1i9e6t97oMb8spwsmjSkjLvu
vGYO1GM",
"Content-Type": "application/json"
}
let bodyContent = JSON.stringify({
"from_channel":"fiat",
"from_currency":"ngn",
"from_amount": 200,
"exchange_rate":762,
"to_channel":"cryptocurrency",
"to_currency":"usdt",
"to_amount":4000
});
let response = await
fetch("http://api.switch.tulupay.com/transactions/swap", {
method: "POST",
body: bodyContent,
headers: headersList
});
let data = await response.text();
console.log(data);
Request details
Response details
After a successful response, you'll receive a simple JSON object with swap details. Here's an example:
{
"statusCode": "02",
"status": "Invalid swap",
"message": "insufficient funds"
}
Contact Us for Developer Support
Contact our dedicated developer support team for assistance, guidance, or any questions you have regarding Tuluswitch API integration. We're here to ensure your development experience is smooth and successful.
Read Our Developer Blog for Insights
Master the Tuluswitch API with our Developer Blog! Get expert insights, advanced tips, and industry trends beyond the documentation. Stay connected with the developer community to build exceptional payment platforms. Visit the blog now and unlock your full potential!