curl --request POST \
--url https://api.rheon.io/v1/deposit/transaction \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"quote": {
"provider": "sprinter",
"outAmount": "4999750",
"validUntil": 1788799278,
"payload": "<unknown>",
"rheonCorridor": {
"sourceChain": 42161,
"destChain": 42161
},
"rheonTransfer": {
"fromAddress": "0x1111111111111111111111111111111111111111",
"toAddress": "0x1111111111111111111111111111111111111111",
"sourceChain": 42161,
"sourceToken": "0x1111111111111111111111111111111111111111",
"destChain": 42161,
"destToken": "0x1111111111111111111111111111111111111111",
"amount": "4980000"
},
"rheonClient": "acme",
"rheonSig": "5cdc0af7861b267c45c0feec1cd2689278c94d70a53108c8c1226da055a6e25e",
"executionDurationSeconds": 123
}
}
'import requests
url = "https://api.rheon.io/v1/deposit/transaction"
payload = { "quote": {
"provider": "sprinter",
"outAmount": "4999750",
"validUntil": 1788799278,
"payload": "<unknown>",
"rheonCorridor": {
"sourceChain": 42161,
"destChain": 42161
},
"rheonTransfer": {
"fromAddress": "0x1111111111111111111111111111111111111111",
"toAddress": "0x1111111111111111111111111111111111111111",
"sourceChain": 42161,
"sourceToken": "0x1111111111111111111111111111111111111111",
"destChain": 42161,
"destToken": "0x1111111111111111111111111111111111111111",
"amount": "4980000"
},
"rheonClient": "acme",
"rheonSig": "5cdc0af7861b267c45c0feec1cd2689278c94d70a53108c8c1226da055a6e25e",
"executionDurationSeconds": 123
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
quote: {
provider: 'sprinter',
outAmount: '4999750',
validUntil: 1788799278,
payload: '<unknown>',
rheonCorridor: {sourceChain: 42161, destChain: 42161},
rheonTransfer: {
fromAddress: '0x1111111111111111111111111111111111111111',
toAddress: '0x1111111111111111111111111111111111111111',
sourceChain: 42161,
sourceToken: '0x1111111111111111111111111111111111111111',
destChain: 42161,
destToken: '0x1111111111111111111111111111111111111111',
amount: '4980000'
},
rheonClient: 'acme',
rheonSig: '5cdc0af7861b267c45c0feec1cd2689278c94d70a53108c8c1226da055a6e25e',
executionDurationSeconds: 123
}
})
};
fetch('https://api.rheon.io/v1/deposit/transaction', 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://api.rheon.io/v1/deposit/transaction",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'quote' => [
'provider' => 'sprinter',
'outAmount' => '4999750',
'validUntil' => 1788799278,
'payload' => '<unknown>',
'rheonCorridor' => [
'sourceChain' => 42161,
'destChain' => 42161
],
'rheonTransfer' => [
'fromAddress' => '0x1111111111111111111111111111111111111111',
'toAddress' => '0x1111111111111111111111111111111111111111',
'sourceChain' => 42161,
'sourceToken' => '0x1111111111111111111111111111111111111111',
'destChain' => 42161,
'destToken' => '0x1111111111111111111111111111111111111111',
'amount' => '4980000'
],
'rheonClient' => 'acme',
'rheonSig' => '5cdc0af7861b267c45c0feec1cd2689278c94d70a53108c8c1226da055a6e25e',
'executionDurationSeconds' => 123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.rheon.io/v1/deposit/transaction"
payload := strings.NewReader("{\n \"quote\": {\n \"provider\": \"sprinter\",\n \"outAmount\": \"4999750\",\n \"validUntil\": 1788799278,\n \"payload\": \"<unknown>\",\n \"rheonCorridor\": {\n \"sourceChain\": 42161,\n \"destChain\": 42161\n },\n \"rheonTransfer\": {\n \"fromAddress\": \"0x1111111111111111111111111111111111111111\",\n \"toAddress\": \"0x1111111111111111111111111111111111111111\",\n \"sourceChain\": 42161,\n \"sourceToken\": \"0x1111111111111111111111111111111111111111\",\n \"destChain\": 42161,\n \"destToken\": \"0x1111111111111111111111111111111111111111\",\n \"amount\": \"4980000\"\n },\n \"rheonClient\": \"acme\",\n \"rheonSig\": \"5cdc0af7861b267c45c0feec1cd2689278c94d70a53108c8c1226da055a6e25e\",\n \"executionDurationSeconds\": 123\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.rheon.io/v1/deposit/transaction")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"quote\": {\n \"provider\": \"sprinter\",\n \"outAmount\": \"4999750\",\n \"validUntil\": 1788799278,\n \"payload\": \"<unknown>\",\n \"rheonCorridor\": {\n \"sourceChain\": 42161,\n \"destChain\": 42161\n },\n \"rheonTransfer\": {\n \"fromAddress\": \"0x1111111111111111111111111111111111111111\",\n \"toAddress\": \"0x1111111111111111111111111111111111111111\",\n \"sourceChain\": 42161,\n \"sourceToken\": \"0x1111111111111111111111111111111111111111\",\n \"destChain\": 42161,\n \"destToken\": \"0x1111111111111111111111111111111111111111\",\n \"amount\": \"4980000\"\n },\n \"rheonClient\": \"acme\",\n \"rheonSig\": \"5cdc0af7861b267c45c0feec1cd2689278c94d70a53108c8c1226da055a6e25e\",\n \"executionDurationSeconds\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rheon.io/v1/deposit/transaction")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"quote\": {\n \"provider\": \"sprinter\",\n \"outAmount\": \"4999750\",\n \"validUntil\": 1788799278,\n \"payload\": \"<unknown>\",\n \"rheonCorridor\": {\n \"sourceChain\": 42161,\n \"destChain\": 42161\n },\n \"rheonTransfer\": {\n \"fromAddress\": \"0x1111111111111111111111111111111111111111\",\n \"toAddress\": \"0x1111111111111111111111111111111111111111\",\n \"sourceChain\": 42161,\n \"sourceToken\": \"0x1111111111111111111111111111111111111111\",\n \"destChain\": 42161,\n \"destToken\": \"0x1111111111111111111111111111111111111111\",\n \"amount\": \"4980000\"\n },\n \"rheonClient\": \"acme\",\n \"rheonSig\": \"5cdc0af7861b267c45c0feec1cd2689278c94d70a53108c8c1226da055a6e25e\",\n \"executionDurationSeconds\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"environment": "sandbox",
"tx": {
"to": "0x1111111111111111111111111111111111111111",
"data": "0xdeadbeef",
"value": "0",
"chainId": 42161
},
"approval": {
"to": "0x1111111111111111111111111111111111111111",
"data": "0xdeadbeef",
"value": "0",
"chainId": 42161
},
"orderId": "2d1a7b8e-6c1f-4f9a-9a7f-3f0c2e6d8b11"
}{
"environment": "sandbox",
"error": {
"code": "invalid_request",
"message": "amount must be a decimal string of the token's smallest unit.",
"fields": {
"applicantInfo.nationality": "iso3166_1_alpha2"
}
}
}{
"environment": "sandbox",
"error": {
"code": "invalid_request",
"message": "amount must be a decimal string of the token's smallest unit.",
"fields": {
"applicantInfo.nationality": "iso3166_1_alpha2"
}
}
}{
"environment": "sandbox",
"error": {
"code": "invalid_request",
"message": "amount must be a decimal string of the token's smallest unit.",
"fields": {
"applicantInfo.nationality": "iso3166_1_alpha2"
}
}
}{
"environment": "sandbox",
"error": {
"code": "invalid_request",
"message": "amount must be a decimal string of the token's smallest unit.",
"fields": {
"applicantInfo.nationality": "iso3166_1_alpha2"
}
}
}{
"environment": "sandbox",
"error": {
"code": "invalid_request",
"message": "amount must be a decimal string of the token's smallest unit.",
"fields": {
"applicantInfo.nationality": "iso3166_1_alpha2"
}
}
}Build the unsigned transaction for a quote
Verifies the quote is ours, unaltered, yours and unexpired, then returns the UNSIGNED transaction (and an ERC-20 approval when the allowance is insufficient) for the user’s wallet to sign. Rheon never signs. When order storage is configured the answer carries orderId.
curl --request POST \
--url https://api.rheon.io/v1/deposit/transaction \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"quote": {
"provider": "sprinter",
"outAmount": "4999750",
"validUntil": 1788799278,
"payload": "<unknown>",
"rheonCorridor": {
"sourceChain": 42161,
"destChain": 42161
},
"rheonTransfer": {
"fromAddress": "0x1111111111111111111111111111111111111111",
"toAddress": "0x1111111111111111111111111111111111111111",
"sourceChain": 42161,
"sourceToken": "0x1111111111111111111111111111111111111111",
"destChain": 42161,
"destToken": "0x1111111111111111111111111111111111111111",
"amount": "4980000"
},
"rheonClient": "acme",
"rheonSig": "5cdc0af7861b267c45c0feec1cd2689278c94d70a53108c8c1226da055a6e25e",
"executionDurationSeconds": 123
}
}
'import requests
url = "https://api.rheon.io/v1/deposit/transaction"
payload = { "quote": {
"provider": "sprinter",
"outAmount": "4999750",
"validUntil": 1788799278,
"payload": "<unknown>",
"rheonCorridor": {
"sourceChain": 42161,
"destChain": 42161
},
"rheonTransfer": {
"fromAddress": "0x1111111111111111111111111111111111111111",
"toAddress": "0x1111111111111111111111111111111111111111",
"sourceChain": 42161,
"sourceToken": "0x1111111111111111111111111111111111111111",
"destChain": 42161,
"destToken": "0x1111111111111111111111111111111111111111",
"amount": "4980000"
},
"rheonClient": "acme",
"rheonSig": "5cdc0af7861b267c45c0feec1cd2689278c94d70a53108c8c1226da055a6e25e",
"executionDurationSeconds": 123
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
quote: {
provider: 'sprinter',
outAmount: '4999750',
validUntil: 1788799278,
payload: '<unknown>',
rheonCorridor: {sourceChain: 42161, destChain: 42161},
rheonTransfer: {
fromAddress: '0x1111111111111111111111111111111111111111',
toAddress: '0x1111111111111111111111111111111111111111',
sourceChain: 42161,
sourceToken: '0x1111111111111111111111111111111111111111',
destChain: 42161,
destToken: '0x1111111111111111111111111111111111111111',
amount: '4980000'
},
rheonClient: 'acme',
rheonSig: '5cdc0af7861b267c45c0feec1cd2689278c94d70a53108c8c1226da055a6e25e',
executionDurationSeconds: 123
}
})
};
fetch('https://api.rheon.io/v1/deposit/transaction', 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://api.rheon.io/v1/deposit/transaction",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'quote' => [
'provider' => 'sprinter',
'outAmount' => '4999750',
'validUntil' => 1788799278,
'payload' => '<unknown>',
'rheonCorridor' => [
'sourceChain' => 42161,
'destChain' => 42161
],
'rheonTransfer' => [
'fromAddress' => '0x1111111111111111111111111111111111111111',
'toAddress' => '0x1111111111111111111111111111111111111111',
'sourceChain' => 42161,
'sourceToken' => '0x1111111111111111111111111111111111111111',
'destChain' => 42161,
'destToken' => '0x1111111111111111111111111111111111111111',
'amount' => '4980000'
],
'rheonClient' => 'acme',
'rheonSig' => '5cdc0af7861b267c45c0feec1cd2689278c94d70a53108c8c1226da055a6e25e',
'executionDurationSeconds' => 123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.rheon.io/v1/deposit/transaction"
payload := strings.NewReader("{\n \"quote\": {\n \"provider\": \"sprinter\",\n \"outAmount\": \"4999750\",\n \"validUntil\": 1788799278,\n \"payload\": \"<unknown>\",\n \"rheonCorridor\": {\n \"sourceChain\": 42161,\n \"destChain\": 42161\n },\n \"rheonTransfer\": {\n \"fromAddress\": \"0x1111111111111111111111111111111111111111\",\n \"toAddress\": \"0x1111111111111111111111111111111111111111\",\n \"sourceChain\": 42161,\n \"sourceToken\": \"0x1111111111111111111111111111111111111111\",\n \"destChain\": 42161,\n \"destToken\": \"0x1111111111111111111111111111111111111111\",\n \"amount\": \"4980000\"\n },\n \"rheonClient\": \"acme\",\n \"rheonSig\": \"5cdc0af7861b267c45c0feec1cd2689278c94d70a53108c8c1226da055a6e25e\",\n \"executionDurationSeconds\": 123\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.rheon.io/v1/deposit/transaction")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"quote\": {\n \"provider\": \"sprinter\",\n \"outAmount\": \"4999750\",\n \"validUntil\": 1788799278,\n \"payload\": \"<unknown>\",\n \"rheonCorridor\": {\n \"sourceChain\": 42161,\n \"destChain\": 42161\n },\n \"rheonTransfer\": {\n \"fromAddress\": \"0x1111111111111111111111111111111111111111\",\n \"toAddress\": \"0x1111111111111111111111111111111111111111\",\n \"sourceChain\": 42161,\n \"sourceToken\": \"0x1111111111111111111111111111111111111111\",\n \"destChain\": 42161,\n \"destToken\": \"0x1111111111111111111111111111111111111111\",\n \"amount\": \"4980000\"\n },\n \"rheonClient\": \"acme\",\n \"rheonSig\": \"5cdc0af7861b267c45c0feec1cd2689278c94d70a53108c8c1226da055a6e25e\",\n \"executionDurationSeconds\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rheon.io/v1/deposit/transaction")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"quote\": {\n \"provider\": \"sprinter\",\n \"outAmount\": \"4999750\",\n \"validUntil\": 1788799278,\n \"payload\": \"<unknown>\",\n \"rheonCorridor\": {\n \"sourceChain\": 42161,\n \"destChain\": 42161\n },\n \"rheonTransfer\": {\n \"fromAddress\": \"0x1111111111111111111111111111111111111111\",\n \"toAddress\": \"0x1111111111111111111111111111111111111111\",\n \"sourceChain\": 42161,\n \"sourceToken\": \"0x1111111111111111111111111111111111111111\",\n \"destChain\": 42161,\n \"destToken\": \"0x1111111111111111111111111111111111111111\",\n \"amount\": \"4980000\"\n },\n \"rheonClient\": \"acme\",\n \"rheonSig\": \"5cdc0af7861b267c45c0feec1cd2689278c94d70a53108c8c1226da055a6e25e\",\n \"executionDurationSeconds\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"environment": "sandbox",
"tx": {
"to": "0x1111111111111111111111111111111111111111",
"data": "0xdeadbeef",
"value": "0",
"chainId": 42161
},
"approval": {
"to": "0x1111111111111111111111111111111111111111",
"data": "0xdeadbeef",
"value": "0",
"chainId": 42161
},
"orderId": "2d1a7b8e-6c1f-4f9a-9a7f-3f0c2e6d8b11"
}{
"environment": "sandbox",
"error": {
"code": "invalid_request",
"message": "amount must be a decimal string of the token's smallest unit.",
"fields": {
"applicantInfo.nationality": "iso3166_1_alpha2"
}
}
}{
"environment": "sandbox",
"error": {
"code": "invalid_request",
"message": "amount must be a decimal string of the token's smallest unit.",
"fields": {
"applicantInfo.nationality": "iso3166_1_alpha2"
}
}
}{
"environment": "sandbox",
"error": {
"code": "invalid_request",
"message": "amount must be a decimal string of the token's smallest unit.",
"fields": {
"applicantInfo.nationality": "iso3166_1_alpha2"
}
}
}{
"environment": "sandbox",
"error": {
"code": "invalid_request",
"message": "amount must be a decimal string of the token's smallest unit.",
"fields": {
"applicantInfo.nationality": "iso3166_1_alpha2"
}
}
}{
"environment": "sandbox",
"error": {
"code": "invalid_request",
"message": "amount must be a decimal string of the token's smallest unit.",
"fields": {
"applicantInfo.nationality": "iso3166_1_alpha2"
}
}
}Authorizations
Your API key, issued by us and shown once at creation.
Body
The quote from /v1/deposit/quote, unchanged.
Show child attributes
Show child attributes
Response
What the user's wallet must sign.
Which environment answered. sandbox: at least one money upstream is the provider's sandbox - no real money moves there, and the card corridor is the sandbox's asset (read GET /v1/config), not the documented production one. production: every configured upstream is real. Derived from the configured upstream hosts at boot, never a flag.
sandbox, production "sandbox"
The transfer transaction to sign and submit.
Show child attributes
Show child attributes
An ERC-20 approval to sign and submit BEFORE tx. Present only when the current allowance is insufficient.
Show child attributes
Show child attributes
OUR order number for this build, the id GET /v1/orders/{id} answers by. Present when order storage is configured on the deployment.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"2d1a7b8e-6c1f-4f9a-9a7f-3f0c2e6d8b11"