Redeem
curl --request GET \
--url https://deficarrot.dial.to/api/v0/crt/redeem/{poolToken}import requests
url = "https://deficarrot.dial.to/api/v0/crt/redeem/{poolToken}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://deficarrot.dial.to/api/v0/crt/redeem/{poolToken}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://deficarrot.dial.to/api/v0/crt/redeem/{poolToken}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://deficarrot.dial.to/api/v0/crt/redeem/{poolToken}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://deficarrot.dial.to/api/v0/crt/redeem/{poolToken}")
.asString();require 'uri'
require 'net/http'
url = URI("https://deficarrot.dial.to/api/v0/crt/redeem/{poolToken}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"title": "<string>",
"description": "<string>",
"label": "<string>",
"icon": "<string>",
"links": {
"actions": [
{
"href": "<string>",
"label": "<string>",
"parameters": [
{
"name": "<string>",
"type": "<string>",
"label": "<string>"
}
]
}
]
}
}Earn
Redeem
Get a blink for redeem operations. Please note that the amount you redeem will be the amount of the stable coin you input, not the amount of the CRT token you will receive. Also there might be a small difference in the amount you receive due to the price of the stable coin and the CRT token and a withdrawal fee. Please check protocol documentation for more details.
GET
/
v0
/
crt
/
redeem
/
{poolToken}
Redeem
curl --request GET \
--url https://deficarrot.dial.to/api/v0/crt/redeem/{poolToken}import requests
url = "https://deficarrot.dial.to/api/v0/crt/redeem/{poolToken}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://deficarrot.dial.to/api/v0/crt/redeem/{poolToken}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://deficarrot.dial.to/api/v0/crt/redeem/{poolToken}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://deficarrot.dial.to/api/v0/crt/redeem/{poolToken}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://deficarrot.dial.to/api/v0/crt/redeem/{poolToken}")
.asString();require 'uri'
require 'net/http'
url = URI("https://deficarrot.dial.to/api/v0/crt/redeem/{poolToken}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"title": "<string>",
"description": "<string>",
"label": "<string>",
"icon": "<string>",
"links": {
"actions": [
{
"href": "<string>",
"label": "<string>",
"parameters": [
{
"name": "<string>",
"type": "<string>",
"label": "<string>"
}
]
}
]
}
}Was this page helpful?
⌘I